- # experiment (does NOT work) to fix $ svn checkout ... # and VC19 incremental linker
 - diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
 - index 8143840..53b3754 100644
 - --- a/sys/nfs41_driver.c
 - +++ b/sys/nfs41_driver.c
 - @@ -467,6 +467,7 @@ typedef struct _NFS41_FOBX {
 - BOOLEAN write_thru;
 - BOOLEAN nocache;
 - BOOLEAN timebasedcoherency;
 - + LONGLONG writes_in_progress;
 - } NFS41_FOBX, *PNFS41_FOBX;
 - #define NFS41GetFobxExtension(pFobx) \
 - (((pFobx) == NULL) ? NULL : (PNFS41_FOBX)((pFobx)->Context))
 - @@ -4486,6 +4487,7 @@ retry_on_link:
 - print_std_info(1, &nfs41_fcb->StandardInfo);
 - #endif
 - +#if 0
 - /* aglo: 05/10/2012. it seems like always have to invalid the cache if the
 - * file has been opened before and being opened again for data access.
 - * If the file was opened before, RDBSS might have cached (unflushed) data
 - @@ -4502,6 +4504,7 @@ retry_on_link:
 - #endif
 - RxChangeBufferingState((PSRV_OPEN)SrvOpen, ULongToPtr(flag), 1);
 - }
 - +#endif
 - if (!nfs41_fcb->StandardInfo.Directory &&
 - isDataAccess(params->DesiredAccess)) {
 - nfs41_fobx->deleg_type = entry->u.Open.deleg_type;
 - @@ -4751,6 +4754,17 @@ static NTSTATUS nfs41_CloseSrvOpen(
 - DbgEn();
 - print_debug_header(RxContext);
 - #endif
 - +
 - +#if 1
 - + LONGLONG writes_in_progress;
 - + LARGE_INTEGER poll_delay = { .QuadPart=1000 };
 - +
 - + while ((writes_in_progress = InterlockedOr64(&nfs41_fobx->writes_in_progress, 0LL)) != 0LL) {
 - + DbgP("nfs41_CloseSrvOpen: waiting for writes_in_progress=%lld: FOBX=0x%p\n",
 - + writes_in_progress, (void *)nfs41_fobx);
 - + (void)KeDelayExecutionThread(KernelMode, FALSE, &poll_delay);
 - + }
 - +#endif
 - if (!nfs41_fobx->deleg_type && !nfs41_fcb->StandardInfo.Directory &&
 - !RxContext->pFcb->OpenCount) {
 - @@ -4800,6 +4814,23 @@ static NTSTATUS nfs41_Flush(
 - DbgP("nfs41_Flush: FileName='%wZ'\n",
 - GET_ALREADY_PREFIXED_NAME_FROM_CONTEXT(RxContext));
 - +#if 1
 - + __notnull PMRX_SRV_OPEN SrvOpen = RxContext->pRelevantSrvOpen;
 - + ULONG flag = DISABLE_CACHING;
 - + RxChangeBufferingState((PSRV_OPEN)SrvOpen, ULongToPtr(flag), 1);
 - +#endif
 - +#if 1
 - + __notnull PNFS41_FOBX nfs41_fobx = NFS41GetFobxExtension(RxContext->pFobx);
 - + LONGLONG writes_in_progress;
 - + LARGE_INTEGER poll_delay = { .QuadPart=10000 };
 - +
 - + while ((writes_in_progress = InterlockedOr64(&nfs41_fobx->writes_in_progress, 0LL)) != 0LL) {
 - + DbgP("nfs41_Flush: waiting for writes_in_progress=%lld: FOBX=0x%p\n",
 - + writes_in_progress, (void *)nfs41_fobx);
 - + (void)KeDelayExecutionThread(KernelMode, FALSE, &poll_delay);
 - + }
 - +#endif
 - +
 - return STATUS_SUCCESS;
 - }
 - @@ -6831,6 +6862,10 @@ static NTSTATUS nfs41_Write(
 - print_readwrite_args(RxContext);
 - #endif
 - +
 - +#if 1
 - + (void)InterlockedIncrement64(&nfs41_fobx->writes_in_progress);
 - +#endif
 - status = check_nfs41_write_args(RxContext);
 - if (status) goto out;
 - @@ -6897,6 +6932,9 @@ static NTSTATUS nfs41_Write(
 - }
 - nfs41_UpcallDestroy(entry);
 - out:
 - +#if 1
 - + (void)InterlockedDecrement64(&nfs41_fobx->writes_in_progress);
 - +#endif
 - #ifdef ENABLE_TIMINGS
 - t2 = KeQueryPerformanceCounter(NULL);
 - InterlockedIncrement(&write.tops);
 
experiment (does NOT work) to fix $ svn checkout ... # and VC19 incremental linker
Posted by Anonymous on Mon 30th Sep 2024 12:00
raw | new post
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.
 nrubsig.kpaste.net RSS