2.3.65 FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT Request

The FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT request message requests that the server perform a specific stream snapshot operation on a given data stream contained in a file. The operation performed is dependent on the value defined in REFS_STREAM_SNAPSHOT_OPERATION. The request message takes the form of a REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER structure.

The REFS_STREAM_SNAPSHOT_MANAGEMENT_INPUT_BUFFER is as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Operation

SnapshotNameLength

OperationInputBufferLength

Reserved

...

...

...

NameAndInputBuffer (variable)

...

Operation (4 bytes): This field specifies the operation and MUST contain one of the following values:

Value

Meaning

REFS_STREAM_SNAPSHOT_OPERATION_INVALID

0x00000000

All requests with this operational code MUST be failed by the server.

REFS_STREAM_SNAPSHOT_OPERATION_CREATE

0x00000001

This request message requests the server create a new snapshot of the UNICODE name contained within NameAndInputBuffer, saving a point-in-time view of the data stream represented by the handle the request is being sent on.

REFS_STREAM_SNAPSHOT_OPERATION_LIST

0x00000002

This request message requests the server return a list of all snapshots of the set containing the data stream represented by the handle the request is being sent on, and matching a given regular expression query string contained in NameAndInputBuffer.

REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS 

0x00000003

This request message requests the server return a list of all metadata extents that have incurred modifying operations between the data stream represented by the handle the request is being sent on, and the data stream represented by the UNICODE name contained in NameAndInputBuffer. The data stream represented by the handle must be of a newer creation time than the data stream represented by the UNICODE name.

REFS_STREAM_SNAPSHOT_OPERATION_REVERT

0x00000004

This request message requests the server revert the data stream represented by the handle the request is being sent on to a point-in-time snapshot view represented by the UNICODE name contained within NameAndInputBuffer.

REFS_STREAM_SNAPSHOT_OPERATION_SET_SHADOW_BTREE 

0x00000005

This request message requests the server create a shadow data stream on the data stream represented by the handle the request is being sent on.

REFS_STREAM_SNAPSHOT_OPERATION_CLEAR_SHADOW_BTREE

0x00000006

This request message requests the server remove a shadow data stream on the data stream represented by the handle the request is being sent on.

REFS_STREAM_SNAPSHOT_OPERATION_MAX

0x00000006

The maximum operational code supported by the server. All operational codes larger than this numerical value will be failed.

SnapshotNameLength (2 bytes): An unsigned integer representing the length in bytes of the unicode name contained within NameAndInputBuffer field. If no such name is present in the message, then this value is set to zero.

OperationInputBufferLength (2 bytes): An unsigned integer representing the length in bytes of the operational control structure present in the message and contained within NameAndInputBuffer field. If no such control structure is present in the message, then this value is set to zero.

Reserved (16 bytes): This field MUST be set to zero and MUST be ignored.

NameAndInputBuffer (variable): An array of bytes optionally containing a unicode name as well as an operational control buffer. When a unicode name is present, it is located immediately within the first byte of NameAndInputBuffer. When an operational control buffer is present, it is located at the next quad aligned boundary past the end of the unicode name. If no such unicode name is present, then the operational control buffer is located at the first byte of NameAndInputBuffer.

The following Operation codes require a unicode name to be present:

  • REFS_STREAM_SNAPSHOT_OPERATION_CREATE

  • REFS_STREAM_SNAPSHOT_OPERATION_LIST

  • REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS

  • REFS_STREAM_SNAPSHOT_OPERATION_REVERT

The following Operation code requires a control structure of the following type:

  • REFS_STREAM_SNAPSHOT_OPERATION_QUERY_DELTAS requires a REFS_STREAM_SNAPSHOT_QUERY_DELTAS_INPUT_BUFFER to be present.