setsize_warn_t

Contains information about an FSHOOK_TYPE_SETDATASIZE_WARN event.

Service:
Defined In:fshooks.h

Structure

  typedef struct
  {
     uint32_t    enterExitID;
     uint32_t    slotID;
     zkey_t      key;
     uint64_t    curEOF;
     uint64_t    newEOF;
     uint32_t    setSizeFlags;
  } setsize_warn_t;
  

Fields

enterExitID

Associates the warn and report events of the operation and is same value on the warn and report events of the same operation, but unique across operations.

slotID

Contains the connection number of the entity that caused the event.

key

Contains the key to an opened file, whose size is going to change.

curEOF

Contains the byte offset of the current end of file.

newEOF

Contains the logical byte offset in the file object at which the new end of file is to be set.

setSizeFlags

Specifies a bit mask, identifying various modes for setting the data size.

Flag

Value

Description

FSHOOKS_SETSIZE_ NON_SPARSE_FILE

0x00000001

If this bit is not set and the file size is being expanded, the file is expanded in a sparse manner with no data blocks being physically allocated to the file.If this bit is set and the file size is being expanded, the file will be expanded in a non-sparse manner, with data blocks being physically allocated to the file. The data block will also be zeroed unless the FSHOOKS_SETSIZE_NO_ZERO_FILL bit is also set.

FSHOOKS_SETSIZE_ NO_ZERO_FILL

0x00000002

If this bit is not set and the file size is being expanded in a non-sparse manner, zero-filled data blocks are physically written to the file starting at the current end of file and ending at the new end of file.If this bit is set and the file size is being expanded in a non-sparse manner, the new disk blocks allocated to the file are not zero-filled. The blocks are physically allocated to the file, but they are not initialized.

FSHOOKS_SETSIZE_ UNDO_ON_ERR

0x00000004

If the file size is being expanded and an error occurs anywhere during the expansion process, this bit is checked to determine the next action.If this bit is set, an error is returned and the file is restored to its original size as if no expansion took place.If this bit is not set, an error is returned and any partially completed expansion is left as part of the file.

FSHOOKS_SETSIZE_ PHYSICAL_ONLY

0x00000008

If this bit is set, only the physical end of file is changed; the logical end of file will be untouched.

If the file is expanded with this option set, it is done in a non-sparse manner as if the FSHOOKS_SETSIZE_NON_SPARSE_FILE bit were set.

If the file is truncated with this bit set, the file is physically truncated, but the logical end of file remains unchanged.

FSHOOKS_SETSIZE_ LOGICAL_ONLY

0x00000010

If this bit is set, zSetEOF does not touch physical storage, either to expand it or to truncate it. It only changes the logical end of file and leaves the physical storage that is allocated to the file unchanged.

Remarks

You can use the fs_getslotinfo function to obtain more information about who caused the event and the RxIdentifyCode function to obtain more information about the file system object that is the target of the event.