PMRX_EXTENDFILE_CALLDOWN callback function (mrx.h)

The MRxExtendForCache routine is called by RDBSS to request that a network mini-redirector extend a file when the file is being cached by the cache manager.

Syntax

PMRX_EXTENDFILE_CALLDOWN PmrxExtendfileCalldown;

ULONG PmrxExtendfileCalldown(
  IN OUT PRX_CONTEXT RxContext,
  IN OUT PLARGE_INTEGER NewFileSize,
  OUT PLARGE_INTEGER NewAllocationSize
)
{...}

Parameters

RxContext

[in, out] A pointer to the RX_CONTEXT structure. This parameter contains the IRP that is requesting the operation.

NewFileSize

[in, out] A pointer to the LARGE_INTEGER structure indicating the byte count of the new file size.

NewAllocationSize

[out] A pointer to the LARGE_INTEGER structure for storing the new allocation size when MRxExtendForCache returns.

Return value

MRxExtendForCache returns STATUS_SUCCESS on success or an error code on failure.

Remarks

MRxExtendForCache handles network requests to extend the file for cached I/O.

Before calling MRxExtendForCache, RDBSS modifies the following members in the RX_CONTEXT structure pointed to by the RxContext parameter:

  • LowIoContext.Operation is set to LOWIO_OP_WRITE
  • LowIoContext.ParamsFor.ReadWrite.Flags has the LOWIO_READWRITEFLAG_EXTENDING_FILESIZE bit set

A network mini-redirector that caches file or directory information may need to invalidate its cache information when the file is extended.

Requirements

Requirement Value
Target Platform Desktop
Header mrx.h (include Mrx.h)

See also

MRxAreFilesAliased

MRxCleanupFobx

MRxCloseSrvOpen

MRxCollapseOpen

MRxCreate

MRxDeallocateForFcb

MRxDeallocateForFobx

MRxExtendForNonCache

MRxFlush

MRxForceClosed

MRxIsLockRealizable

MRxShouldTryToCollapseThisOpen

MRxTruncate

MRxZeroExtend