Bewerken

Delen via


CcUnpinRepinnedBcb function (ntifs.h)

The CcUnpinRepinnedBcb routine unpins a repinned buffer control block (BCB).

Syntax

void CcUnpinRepinnedBcb(
  [in]  PVOID            Bcb,
  [in]  BOOLEAN          WriteThrough,
  [out] PIO_STATUS_BLOCK IoStatus
);

Parameters

[in] Bcb

Pointer to the repinned BCB.

[in] WriteThrough

Set to TRUE if the BCB should be written through.

[out] IoStatus

Pointer to an IO_STATUS_BLOCK structure. If the call to CcUnpinRepinnedBcb succeeds, IoStatus.Status is set to STATUS_SUCCESS. Otherwise, it is set to an appropriate NTSTATUS error code. IoStatus.Information is set to the actual number of bytes that were successfully flushed to disk.

Return value

None

Remarks

File systems call CcUnpinRepinnedBcb to write a previously pinned buffer through to disk.

Every call to CcRepinBcb must be matched by a subsequent call to CcUnpinRepinnedBcb.

Because CcUnpinRepinnedBcb acquires the BCB resource exclusively, the caller must be extremely careful to avoid deadlocks. If possible, the caller should own no resources. Otherwise the caller must guarantee that it has nothing else pinned in the same cached file. Normally CcUnpinRepinnedBcb is called during request completion, after all other resources have been released.

CcUnpinRepinnedBcb synchronously writes the buffer (for write-through requests) and unpins the BCB repinned by the earlier call to CcRepinBcb.

Requirements

Requirement Value
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe

See also

CcRepinBcb