pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: Patches for collapseopen fixes, 32bit-only build, tests+misc, 2025-12-16-002
Posted by Anonymous on Wed 17th Dec 2025 10:31
raw | new post

  1. From d7c9fbfc814803317308694fb3104deafc1adf3c Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Tue, 16 Dec 2025 13:34:57 +0100
  4. Subject: [PATCH 1/4] tests: Fix nfsbuildtest gcc build.* make error
  5.  
  6. Fix nfsbuildtest gcc build.* make error.
  7.  
  8. Reported-by: Cedric Blancher <cedric.blancher@gmail.com>
  9. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  10. ---
  11. tests/nfsbuildtest/nfsbuildtest.ksh93 | 2 +-
  12.  1 file changed, 1 insertion(+), 1 deletion(-)
  13.  
  14. diff --git a/tests/nfsbuildtest/nfsbuildtest.ksh93 b/tests/nfsbuildtest/nfsbuildtest.ksh93
  15. index 11671ca..0def5f7 100644
  16. --- a/tests/nfsbuildtest/nfsbuildtest.ksh93
  17. +++ b/tests/nfsbuildtest/nfsbuildtest.ksh93
  18. @@ -251,7 +251,7 @@ function gcc_build
  19.  
  20.                 if (( build_parallel == 1 )) ; then
  21.                         make_options+=(
  22. -                               '--load-average 32'
  23. +                               '--load-average' '32'
  24.                                 '-j16'
  25.                         )
  26.                 else
  27. --
  28. 2.51.0
  29.  
  30. From 0c5f7e0d3ba7bb88d466acba2781f00af3f46d6c Mon Sep 17 00:00:00 2001
  31. From: Roland Mainz <roland.mainz@nrubsig.org>
  32. Date: Tue, 16 Dec 2025 13:36:40 +0100
  33. Subject: [PATCH 2/4] sys: |nfs41_Create()| should enable
  34.  |FCB_STATE_COLLAPSING_ENABLED|
  35.  
  36. |nfs41_Create()| should enable |FCB_STATE_COLLAPSING_ENABLED| (for
  37. files).
  38.  
  39. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  40. ---
  41. sys/nfs41sys_openclose.c | 4 ++++
  42.  1 file changed, 4 insertions(+)
  43.  
  44. diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
  45. index 79b7e8a..93c95b1 100644
  46. --- a/sys/nfs41sys_openclose.c
  47. +++ b/sys/nfs41sys_openclose.c
  48. @@ -1187,6 +1187,10 @@ retry_on_link:
  49.          (void)RxFlushFcbInSystemCache((PFCB)RxContext->pFcb, TRUE);
  50.      }
  51.  
  52. +    if (!nfs41_fcb->StandardInfo.Directory) {
  53. +        SrvOpen->BufferingFlags |= FCB_STATE_COLLAPSING_ENABLED;
  54. +    }
  55. +
  56.      if (!nfs41_fcb->StandardInfo.Directory &&
  57.          isAttributeOnlyDesiredAccess(params)) {
  58.          SrvOpen->Flags |= SRVOPEN_FLAG_NO_BUFFERING_STATE_CHANGE;
  59. --
  60. 2.51.0
  61.  
  62. From 0a329b5921ed692ef39f284aea04714409a042ee Mon Sep 17 00:00:00 2001
  63. From: Roland Mainz <roland.mainz@nrubsig.org>
  64. Date: Tue, 16 Dec 2025 18:14:27 +0100
  65. Subject: [PATCH 3/4] sys: Decrease |MaximumNumberOfCloseDelayedFiles| to |63|
  66.  
  67. Decrease |MaximumNumberOfCloseDelayedFiles| to |63| and document
  68. the value+usage.
  69.  
  70. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  71. ---
  72. sys/nfs41sys_driver.c | 10 ++++++++--
  73.  1 file changed, 8 insertions(+), 2 deletions(-)
  74.  
  75. diff --git a/sys/nfs41sys_driver.c b/sys/nfs41sys_driver.c
  76. index 82e6719..6e2c583 100644
  77. --- a/sys/nfs41sys_driver.c
  78. +++ b/sys/nfs41sys_driver.c
  79. @@ -792,10 +792,16 @@ NTSTATUS nfs41_CreateSrvCall(
  80.       * FIXME: This should be a tuneable
  81.       *
  82.       * Notes:
  83. -     * - Windows 10 limit is 1023 per
  84. +     * - This has only an effect if |nfs41_Create()| enables
  85. +     * |SrvOpen->BufferingFlags |= FCB_STATE_COLLAPSING_ENABLED|
  86. +     * - A large value like |8191| will almost double the build time of a parallel
  87. +     * bash build
  88. +     * - Windows 10 limit is |1023| per
  89.       * $ powershell -Command 'Get-SmbClientConfiguration | Select DormantFileLimit'
  90. +     * - It seems most RDBSS users use |2^n-1| values, but we do not know yet
  91. +     * *WHY* they use this formula.
  92.       */
  93. -    pSrvCall->MaximumNumberOfCloseDelayedFiles = 8192;
  94. +    pSrvCall->MaximumNumberOfCloseDelayedFiles = 64-1;
  95.  #endif /* ENABLE_COLLAPSEOPEN */
  96.  
  97.      if (IoGetCurrentProcess() == RxGetRDBSSProcess()) {
  98. --
  99. 2.51.0
  100.  
  101. From 7471f4269e76560e112653c3972bd4cb65e3b89a Mon Sep 17 00:00:00 2001
  102. From: Cedric Blancher <cedric.blancher@gmail.com>
  103. Date: Tue, 16 Dec 2025 20:51:23 +0100
  104. Subject: [PATCH 4/4] cygwin,tests: Fix 32bit-only build
  105.  
  106. Fix 32bit-only build.
  107.  
  108. Signed-off-by: Roland Mainz <roland.mainz@nrubsig.org>
  109. ---
  110. cygwin/Makefile.install      | 4 +++-
  111.  tests/lssparse/Makefile      | 8 ++++++++
  112.  tests/winfsinfo1/winfsinfo.c | 2 +-
  113.  3 files changed, 12 insertions(+), 2 deletions(-)
  114.  
  115. diff --git a/cygwin/Makefile.install b/cygwin/Makefile.install
  116. index 1db56fc..064b417 100644
  117. --- a/cygwin/Makefile.install
  118. +++ b/cygwin/Makefile.install
  119. @@ -173,7 +173,9 @@ installdest:
  120.         cp "$(PROJECT_BASEDIR_DIR)/tests/winrunassystem/winrunassystem.i686.exe" $(DESTDIR)/sbin/winrunassystem.i686.exe
  121.         cp "$(PROJECT_BASEDIR_DIR)/tests/winrunassystem/nfs_globalmount.x86_64.exe" $(DESTDIR)/sbin/nfs_globalmount.x86_64.exe
  122.         cp "$(PROJECT_BASEDIR_DIR)/tests/winrunassystem/nfs_globalmount.i686.exe" $(DESTDIR)/sbin/nfs_globalmount.i686.exe
  123. -       cp "$(PROJECT_BASEDIR_DIR)/tests/lssparse/lssparse.x86_64.exe" $(DESTDIR)/bin/lssparse.x86_64.exe
  124. +       if [[ "$$(uname -m)" != 'i686' ]] ; then \
  125. +               cp "$(PROJECT_BASEDIR_DIR)/tests/lssparse/lssparse.x86_64.exe" $(DESTDIR)/bin/lssparse.x86_64.exe ; \
  126. +       fi
  127.         cp "$(PROJECT_BASEDIR_DIR)/tests/winsg/winsg.x86_64.exe" $(DESTDIR)/bin/winsg.x86_64.exe
  128.         cp "$(PROJECT_BASEDIR_DIR)/tests/winsg/winsg.i686.exe" $(DESTDIR)/bin/winsg.i686.exe
  129.         cp "$(PROJECT_BASEDIR_DIR)/tests/ea/nfs_ea.x86_64.exe" $(DESTDIR)/bin/nfs_ea.x86_64.exe
  130. diff --git a/tests/lssparse/Makefile b/tests/lssparse/Makefile
  131. index d87d40c..97ee532 100644
  132. --- a/tests/lssparse/Makefile
  133. +++ b/tests/lssparse/Makefile
  134. @@ -5,7 +5,15 @@
  135.  # signtool.exe can be in either '/cygdrive/c/Program Files/' or '/cygdrive/c/Program Files (x86)/'
  136.  SIGNTOOL := $(shell ls -1 '/cygdrive/c/Program Files'*'/Microsoft SDKs/ClickOnce/SignTool/signtool.exe' | head -n 1)
  137.  
  138. +# Cygwin stopped supporting 32bit with Cygwin release 3.3, so no 32bit version
  139. +# has SEEK_HOLE/SEEK_DATA support
  140. +GETCONF_LONG_BIT := $(strip $(shell getconf LONG_BIT 2>/dev/null || echo 0))
  141. +
  142. +ifeq ($(GETCONF_LONG_BIT),64)
  143.  all: lssparse.x86_64.exe lssparse.exe
  144. +else
  145. +all:
  146. +endif
  147.  
  148.  # Cygwin 3.6 does not support 32bit builds anymore
  149.  #lssparse.i686.exe: lssparse.c
  150. diff --git a/tests/winfsinfo1/winfsinfo.c b/tests/winfsinfo1/winfsinfo.c
  151. index e81e0b4..edc3255 100644
  152. --- a/tests/winfsinfo1/winfsinfo.c
  153. +++ b/tests/winfsinfo1/winfsinfo.c
  154. @@ -1187,7 +1187,7 @@ int get_file_remote_protocol_info(const char *progname, const char *filename)
  155.          (void)printf("\t\t\tcompound Share=(\n");
  156.          (void)printf("\t\t\t\tCapabilities=0x%lx\n",
  157.              (unsigned long)frpi.ProtocolSpecific.Smb2.Share.Capabilities);
  158. -#if NTDDI_VERSION >= NTDDI_WIN10_NI
  159. +#if defined(RPI_SMB2_SHAREFLAG_ENCRYPT_DATA)
  160.          (void)printf("\t\t\t\tShareFlags=0x%lx\n",
  161.              (unsigned long)frpi.ProtocolSpecific.Smb2.Share.ShareFlags);
  162.  #else
  163. --
  164. 2.51.0

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