ClfsAddLogContainerSet function (wdm.h)
The ClfsAddLogContainerSet routine atomically adds a set of containers to a CLFS log.
Syntax
CLFSUSER_API NTSTATUS ClfsAddLogContainerSet(
[in] PLOG_FILE_OBJECT plfoLog,
[in] USHORT cContainers,
[in, optional] PULONGLONG pcbContainer,
[in] PUNICODE_STRING rguszContainerPath
);
Parameters
[in] plfoLog
A pointer to a LOG_FILE_OBJECT structure that represents the log to which the containers will be added. The caller previously obtained this pointer by calling ClfsCreateLogFile.
[in] cContainers
The number of containers in the set. This is the number of elements in the rguszContainerPath array.
[in, optional] pcbContainer
A pointer to a ULONGLONG-typed variable. The role of this parameter depends on whether the log currently has at least one container.
- If the log currently has no containers, the caller supplies a positive integer that is the requested size, in bytes, of an individual container. CLFS creates containers that are the requested size rounded up to a multiple of 512KB (for a dedicated log) or 1MB (for a multiplexed log).
- If the log currently has at least one container and this parameter is the NULL pointer, CLFS creates new containers that are the same size as the existing containers. (All containers in a log must be the same size.)
- If the log currently has at least one container and this parameter is a valid pointer, the caller supplies a positive integer that is the requested size, in bytes, of an individual container. The requested size is rounded up to a multiple of 512KB (for a dedicated log) or 1MB (for a shared log). If the rounded-up size is at least as large as the existing container size, CLFS creates new containers that are the same size as the existing containers. On successful return, this parameter receives the existing container size. If the rounded-up size is less than the existing container size, ClfsAddLogContainerSet fails.
[in] rguszContainerPath
A pointer to an array of UNICODE_STRING structures. Each string supplies the path name for one of the new containers. The number of elements in the array is given by cContainers. A given path can be absolute or relative to the location of the base log file. Paths that are relative to the base log file must begin with CLFS_CONTAINER_RELATIVE_PREFIX, which is the string literal (L"%BLF%\").
Return value
ClfsAddLogContainer returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h.
Remarks
A container is a contiguous extent on stable storage. For example, a container could be a contiguous file on disk. A log is a set of containers along with a base log file. For more information about containers, see CLFS Stable Storage.
A container specified by a path that is relative to the base log file must be in the same directory as the base log file or a subdirectory of the base log file. The directories "." and ".." are not allowed in a relative path.
A log can have some containers with absolute paths and other containers with relative paths.
Containers are created in a non-compressed mode and are initialized with zeros.
A log must have at least two containers before any I/O can be performed on it.
For an explanation of CLFS concepts and terminology, see Common Log File System.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available in Windows Server 2003 R2, Windows Vista, and later versions of Windows. |
Target Platform | Desktop |
Header | wdm.h (include Wdm.h) |
Library | Clfs.lib |
DLL | Clfs.sys |
IRQL | <= APC_LEVEL |