pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


|nfs41_SetZeroData()| use |RxPurgeFcbInSystemCache()|
Posted by Anonymous on Wed 12th Mar 2025 16:32
raw | new post

  1. diff --git a/sys/nfs41sys_fsctl.c b/sys/nfs41sys_fsctl.c
  2. index ede33e3..8cdb5f2 100644
  3. --- a/sys/nfs41sys_fsctl.c
  4. +++ b/sys/nfs41sys_fsctl.c
  5. @@ -482,17 +482,14 @@ NTSTATUS nfs41_SetZeroData(
  6.          (long long)setzerodatabuffer->BeyondFinalZero.QuadPart);
  7.  
  8.      /*
  9. -     * Disable caching because NFSv4.2 DEALLOCATE is basically a
  10. -     * "write" operation. AFAIK we should flush the cache and wait
  11. -     * for the kernel lazy writer (which |RxChangeBufferingState()|
  12. -     * AFAIK does) before doing the DEALLOCATE, to avoid that we
  13. +     * NFSv4.2 DEALLOCATE is basically a
  14. +     * "write" operation. AFAIK we should purge the filesystem cache
  15. +     * before doing the DEALLOCATE, to avoid that we
  16.       * have outstanding writes in the kernel cache at the same
  17.       * location where the DEALLOCATE should do it's work
  18.       */
  19. -    ULONG flag = DISABLE_CACHING;
  20. -    DbgP("nfs41_SetZeroData: disableing caching for file '%wZ'\n",
  21. -        SrvOpen->pAlreadyPrefixedName);
  22. -    RxChangeBufferingState((PSRV_OPEN)SrvOpen, ULongToPtr(flag), 1);
  23. +    (void)RxPurgeFcbInSystemCache((PFCB)RxContext->pFcb,
  24. +        NULL, 0UL, TRUE, TRUE);
  25.  
  26.      status = nfs41_UpcallCreate(NFS41_SYSOP_FSCTL_SET_ZERO_DATA,
  27.          &nfs41_fobx->sec_ctx,

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at