pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: Patch for nfs41_ExtendForCache() issue, 2025-03-18
Posted by Anonymous on Tue 18th Mar 2025 05:03
raw | new post

  1. From 7bb6f9e4f2ee6f0a9352f7541310db4b5542eb2b Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Tue, 18 Mar 2025 05:33:59 +0100
  4. Subject: [PATCH] sys: |nfs41_ExtendForCache()| should not add 8192 to
  5.  |newAllocationSize|
  6.  
  7. |nfs41_ExtendForCache()| should not add 8192 to |newAllocationSize| -
  8. the RDBSS is managing this itself, and this doesn't work for sparse
  9. files anyway.
  10.  
  11. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  12. ---
  13. sys/nfs41sys_readwrite.c | 4 ++--
  14.  1 file changed, 2 insertions(+), 2 deletions(-)
  15.  
  16. diff --git a/sys/nfs41sys_readwrite.c b/sys/nfs41sys_readwrite.c
  17. index 4afa8e4..d1a3ba7 100644
  18. --- a/sys/nfs41sys_readwrite.c
  19. +++ b/sys/nfs41sys_readwrite.c
  20. @@ -1,6 +1,6 @@
  21.  /* NFSv4.1 client for Windows
  22.   * Copyright (C) 2012 The Regents of the University of Michigan
  23. - * Copyright (C) 2023-2024 Roland Mainz <roland.mainz@nrubsig.org>
  24. + * Copyright (C) 2023-2025 Roland Mainz <roland.mainz@nrubsig.org>
  25.   *
  26.   * Olga Kornievskaia <aglo@umich.edu>
  27.   * Casey Bodley <cbodley@umich.edu>
  28. @@ -461,7 +461,7 @@ ULONG nfs41_ExtendForCache(
  29.          (long long)pNewFileSize->QuadPart,
  30.          (long long)pNewAllocationSize->QuadPart);
  31.  #endif
  32. -    pNewAllocationSize->QuadPart = pNewFileSize->QuadPart + 8192;
  33. +    pNewAllocationSize->QuadPart = pNewFileSize->QuadPart;
  34.      nfs41_fcb->StandardInfo.AllocationSize.QuadPart =
  35.          pNewAllocationSize->QuadPart;
  36.      nfs41_fcb->StandardInfo.EndOfFile.QuadPart = pNewFileSize->QuadPart;
  37. --
  38. 2.45.1

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