ClfsReadPreviousRestartArea routine

The ClfsReadPreviousRestartArea routine reads the previous restart record relative to the current record in a read context.

Syntax


NTSTATUS ClfsReadPreviousRestartArea(
  _In_  PVOID     pvReadContext,
  _Out_ PVOID     *ppvRestartBuffer,
  _Out_ PULONG    pcbRestartBuffer,
  _Out_ PCLFS_LSN plsnRestart
);

Parameters

pvReadContext [in]

A pointer to a read context obtained by a previous call to ClfsReadRestartArea.

ppvRestartBuffer [out]

A pointer to a variable that receives a pointer to the data buffer of the restart record that is read.

pcbRestartBuffer [out]

A pointer to a ULONG-typed variable that receives the size, in bytes, of the buffer pointed to by *ppvRestartBuffer. This is the length of the data buffer of the restart record that is read.

plsnRestart [out]

A pointer to a CLFS_LSN structure that receives the previous LSN of the restart record that was read.

Return value

ClfsReadPreviousRestartArea returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h. If there are no previous restart areas, the return value is STATUS_LOG_START_OF_LOG.

Remarks

For an explanation of CLFS concepts and terminology, see Common Log File System.

For information about reading records from CLFS streams, see Reading Data Records from a CLFS Stream and Reading Restart Records from a CLFS Stream.

Read contexts are not thread-safe. Clients are responsible for serializing access to read contexts.

Clients append restart records to a CLFS log by calling ClfsWriteRestartArea.

With the ReadPreviousLogRestartArea routine, clients can implement a form of fuzzy checkpointing. For example, the checkpoint state could consist of the log records delimited by two or more restart records.

Requirements

Target platform

Version

Available in Windows Server 2003 R2, Windows Vista, and later versions of Windows.

Header

Wdm.h (include Wdm.h)

Library

Clfs.lib

DLL

Clfs.sys

IRQL

<= APC_LEVEL

See also

CLFS_LSN
ClfsReadRestartArea
ClfsWriteRestartArea

 

 

Send comments about this topic to Microsoft

Show: