Platform SDK: Hardware

USN_JOURNAL_DATA

The USN_JOURNAL_DATA structure contains information on a change journal, its records, and its capacity. The FSCTL_QUERY_USN_JOURNAL operation for the DeviceIoControl function uses USN_JOURNAL_DATA.

typedef struct {
  DWORDLONG UsnJournalID;
  USN FirstUsn;
  USN NextUsn;
  USN LowestValidUsn;
  USN MaxUsn;
  DWORDLONG MaximumSize;
  DWORDLONG AllocationDelta;
} USN_JOURNAL_DATA, *PUSN_JOURNAL_DATA;

Members

UsnJournalID
Current journal identifier. A journal is assigned a new identifier on creation and can be stamped with a new identifier in the course of its existence. NTFS uses this identifier for an integrity check.
FirstUsn
Number of first record that can be read from the journal.
NextUsn
Number of next record to be written to the journal.
LowestValidUsn
First record that was written into the journal for this journal instance. Enumerating the files or directories on a volume can return a USN lower than this value (in other words, a FirstUsn member value less than the LowestValidUsn member value). If it does, the journal has been stamped with a new identifier since the last USN was written. In this case, LowestValidUsn may indicate a discontinuity in the journal, in which changes to some or all files or directories on the volume may have occurred that are not recorded in the change journal.
MaxUsn
Largest USN that the change journal supports. An administrator must delete the change journal as the value of NextUsn approaches this value.
MaximumSize
Target maximum size for the change journal, in bytes. The change journal can grow larger than this value, but it is then truncated at the next NTFS checkpoint to less than this value.
AllocationDelta
Number of bytes of disk memory added to the end and removed from the beginning of the change journal each time memory is allocated or deallocated. In other words, allocation and deallocation take place in units of this size. An integer multiple of a cluster size is a reasonable value for this member.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Winioctl.h.

See Also

Device Input and Output Overview, Device Input and Output Structures, DeviceIoControl, FSCTL_QUERY_USN_JOURNAL