The ClfsAddLogContainer routine adds a container to a CLFS log.
CLFSUSER_API NTSTATUS ClfsAddLogContainer( PLOG_FILE_OBJECT plfoLog, PULONGLONG pcbContainer, PUNICODE_STRING puszContainerPath );
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 the new container. CLFS creates a container that is 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 a new container that is 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 the new container. The requested size is rounded up to a multiple of 512KB (for a dedicated log) or 1MB (for a multiplexed log). If the rounded-up size is at least as large as the existing container size, CLFS creates a new container that is 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, ClfsAddLogContainer fails.
A pointer to a UNICODE_STRING structure that supplies the path name for the new container. The 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%\").
ClfsAddLogContainer returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h.
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.
|Windows version||Available in Windows Server 2003 R2, Windows Vista, and later versions of Windows.|
|Header||wdm.h (include Wdm.h)|