The server provides: <93>
Open: An Open of a DataStream or DirectoryStream.
OutputBufferSize: The maximum number of bytes to return in OutputBuffer.
On completion, the object store MUST return:
OutputBuffer: An array of bytes that will return a RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER as defined in [MS-FSCC] section 2.3.34.
BytesReturned: The number of bytes returned to the caller.
Status: An NTSTATUS code that specifies the result.
Pseudocode for the operation is as follows:
Phase 1 -- Verify Parameters
If the size of StartingVcnBuffer is less than sizeof(STARTING_VCN_INPUT_BUFFER), the operation MUST be failed with STATUS_INVALID_PARAMETER.
If OutputBufferSize is smaller than sizeof(RETRIEVAL_POINTERS_AND_REFCOUNT_BUFFER), the operation MUST be failed with STATUS_BUFFER_TOO_SMALL.
If StartingVcnBuffer.StartingVcn is negative, the operation MUST be failed with STATUS_INVALID_PARAMETER.
If StartingVcnBuffer.StartingVcn is greater than or equal to Open.Stream.AllocationSize divided by Open.File.Volume.ClusterSize, the operation MUST be failed with STATUS_END_OF_FILE.
Phase 2 -- Locate and copy the extents into OutputBuffer.
Find the first ExtentAndRefCount in Open.Stream.ExtentAndRefCountList where Extent.NextVcn is greater than StartingVcnBuffer.StartingVcn.
Set OutputBuffer.StartingVcn to the previous element's NextVcn. If the element is the first one in Open.Stream.ExtentAndRefCountList, set OutputBuffer.StartVcn to zero.
Copy as many EXTENT_AND_REFCOUNTS elements from Open.Stream.ExtentAndRefCountList starting with ExtentAndRefCount as will fit into the remaining space in OutputBuffer, at offset OutputBuffer.Extents.
Set OutputBuffer.ExtentCount to the number of EXTENT_AND_REFCOUNTS elements copied.
Upon successful completion of the operation, the object store MUST return:
BytesReturned set to the number of bytes written to OutputBuffer.
Status set to STATUS_SUCCESS if all of the elements in Open.Stream.ExtentList were copied into OutputBuffer.Extents, else STATUS_BUFFER_OVERFLOW.