pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


delete_waitforlazywriter_experiment20250806_001.diff
Posted by Anonymous on Wed 6th Aug 2025 12:12
raw | new post

  1. diff --git a/sys/nfs41sys_fileinfo.c b/sys/nfs41sys_fileinfo.c
  2. index d7dc5e7..4f2acbe 100644
  3. --- a/sys/nfs41sys_fileinfo.c
  4. +++ b/sys/nfs41sys_fileinfo.c
  5. @@ -668,6 +668,10 @@ NTSTATUS nfs41_SetFileInformation(
  6.              PFILE_DISPOSITION_INFORMATION dinfo =
  7.                  (PFILE_DISPOSITION_INFORMATION)RxContext->Info.Buffer;
  8.              if (dinfo->DeleteFile) {
  9. +#if 1
  10. +                nfs41_fcb->DeletePending = TRUE;
  11. +                nfs41_fcb->StandardInfo.DeletePending = TRUE;
  12. +#else
  13.                  nfs41_fcb->DeletePending = TRUE;
  14.                  // we can delete directories right away
  15.                  if (nfs41_fcb->StandardInfo.Directory)
  16. @@ -682,6 +686,7 @@ NTSTATUS nfs41_SetFileInformation(
  17.                      nfs41_fcb->Renamed = TRUE;
  18.                      break;
  19.                  }
  20. +#endif
  21.              } else {
  22.                  /* section 4.3.3 of [FSBO]
  23.                   * "file system behavior in the microsoft windows environment"
  24. diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
  25. index 9a4431f..d10a999 100644
  26. --- a/sys/nfs41sys_openclose.c
  27. +++ b/sys/nfs41sys_openclose.c
  28. @@ -957,12 +957,26 @@ retry_on_link:
  29.      if (Fcb->OpenCount > 0 && (isDataAccess(params->DesiredAccess) ||
  30.              nfs41_fcb->changeattr != entry->ChangeTime) &&
  31.                  !nfs41_fcb->StandardInfo.Directory) {
  32. +#if 0
  33.          ULONG flag = DISABLE_CACHING;
  34. +#endif
  35.  #ifdef DEBUG_OPEN
  36.          DbgP("nfs41_Create: reopening (changed) file '%wZ'\n",
  37.              SrvOpen->pAlreadyPrefixedName);
  38.  #endif
  39. +#if 0
  40.          RxChangeBufferingState((PSRV_OPEN)SrvOpen, ULongToPtr(flag), 1);
  41. +#else
  42. +#pragma warning( push )
  43. +/*
  44. + * C4127: "conditional expression is constant"
  45. + */
  46. +#pragma warning (disable : 4127)
  47. +        /* Wait for lazywriter */
  48. +        RxAcquirePagingIoResource(NULL, Fcb);
  49. +        RxReleasePagingIoResource(NULL, Fcb);
  50. +#pragma warning( pop )
  51. +#endif
  52.      }
  53.  
  54.      if (!nfs41_fcb->StandardInfo.Directory &&

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