- From c75325806ec7287fdb69f844ef1dd5199ca7a4fd Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 8 Jan 2026 19:35:47 +0100
- Subject: [PATCH 1/7] tests: Clarify that multisparsefiletest.ksh should only
- use POSIX/SUS/Cygwin-APIs
- Clarify that multisparsefiletest.ksh should only use POSIX/SUS/Cygwin-APIs.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- tests/sparsefiles/multisparsefiletest.ksh | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
- diff --git a/tests/sparsefiles/multisparsefiletest.ksh b/tests/sparsefiles/multisparsefiletest.ksh
- index b8106e4..4ad6fcc 100644
- --- a/tests/sparsefiles/multisparsefiletest.ksh
- +++ b/tests/sparsefiles/multisparsefiletest.ksh
- @@ -3,7 +3,7 @@
- #
- # MIT License
- #
- -# Copyright (c) 2025 Roland Mainz <roland.mainz@nrubsig.org>
- +# Copyright (c) 2025-2026 Roland Mainz <roland.mainz@nrubsig.org>
- #
- # Permission is hereby granted, free of charge, to any person obtaining a copy
- # of this software and associated documentation files (the "Software"), to deal
- @@ -26,6 +26,7 @@
- #
- # multisparsefiletest1.ksh - test many combinations of sparse file layouts
- +# via POSIX/SUS/Cygwin-only APIs (e.g. no fsutil)
- #
- # Written by Roland Mainz <roland.mainz@nrubsig.org>
- #
- --
- 2.51.0
- From 20a69e98948245d1263ef0d9d9f298bbacf78857 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 8 Jan 2026 20:02:36 +0100
- Subject: [PATCH 2/7] cygwin,tests: Add new test script for sparse Win32 named
- streams
- Add new test script for sparse Win32 named streams.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/Makefile.install | 1 +
- tests/sparsefiles/winsparsestream1.ksh | 102 +++++++++++++++++++++++++
- 2 files changed, 103 insertions(+)
- create mode 100644 tests/sparsefiles/winsparsestream1.ksh
- diff --git a/cygwin/Makefile.install b/cygwin/Makefile.install
- index 064b417..c003e1e 100644
- --- a/cygwin/Makefile.install
- +++ b/cygwin/Makefile.install
- @@ -189,6 +189,7 @@ installdest:
- cp $(PROJECT_BASEDIR_DIR)/tests/sparsefiles/testsparsefile1.ksh $(DESTDIR)/usr/share/msnfs41client/tests/sparsefiles/testsparsefile1.ksh
- cp $(PROJECT_BASEDIR_DIR)/tests/sparsefiles/testsparseexe1.ksh $(DESTDIR)/usr/share/msnfs41client/tests/sparsefiles/testsparseexe1.ksh
- cp $(PROJECT_BASEDIR_DIR)/tests/sparsefiles/multisparsefiletest.ksh $(DESTDIR)/usr/share/msnfs41client/tests/sparsefiles/multisparsefiletest.ksh
- + cp $(PROJECT_BASEDIR_DIR)/tests/sparsefiles/winsparsestream1.ksh $(DESTDIR)/usr/share/msnfs41client/tests/sparsefiles/winsparsestream1.ksh
- cp $(PROJECT_BASEDIR_DIR)/tests/fstest_make_numtree1/fstest_make_numtree1.ksh93 $(DESTDIR)/usr/share/msnfs41client/tests/misc/fstest_make_numtree1.ksh93
- cp $(PROJECT_BASEDIR_DIR)/tests/wintartests/wintartest_comparewinvsgnu001.bash $(DESTDIR)/usr/share/msnfs41client/tests/misc/wintartest_comparewinvsgnu001.bash
- cp $(PROJECT_BASEDIR_DIR)/tests/wintartests/wintartest_seq001.bash $(DESTDIR)/usr/share/msnfs41client/tests/misc/wintartest_seq001.bash
- diff --git a/tests/sparsefiles/winsparsestream1.ksh b/tests/sparsefiles/winsparsestream1.ksh
- new file mode 100644
- index 0000000..897fdcd
- --- /dev/null
- +++ b/tests/sparsefiles/winsparsestream1.ksh
- @@ -0,0 +1,102 @@
- +#!/bin/ksh93
- +
- +#
- +# MIT License
- +#
- +# Copyright (c) 2025-2026 Roland Mainz <roland.mainz@nrubsig.org>
- +#
- +# Permission is hereby granted, free of charge, to any person obtaining a copy
- +# of this software and associated documentation files (the "Software"), to deal
- +# in the Software without restriction, including without limitation the rights
- +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- +# copies of the Software, and to permit persons to whom the Software is
- +# furnished to do so, subject to the following conditions:
- +#
- +# The above copyright notice and this permission notice shall be included in all
- +# copies or substantial portions of the Software.
- +#
- +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- +# SOFTWARE.
- +#
- +
- +#
- +# winsparsestream.ksh - test many combinations of sparse streams via Windows
- +# (non-Cygwin) APIs
- +#
- +# Written by Roland Mainz <roland.mainz@nrubsig.org>
- +#
- +
- +function test_sparse_streams
- +{
- + set -o xtrace
- + set -o errexit
- + set -o nounset
- +
- + compound fsutilout
- +
- + rm -f ii
- + touch ii
- + #
- + # $ icacls ".\\ii" /grant "$(logname):(X,DC)" # is required for fsutil
- + # on NTFS, otherwise we get a "Permission denied"
- + #
- + icacls ".\\ii" /grant "$(logname):(X,DC)"
- +
- + for streamname in "ii:yyy6" "ii:yyy7" "ii:yyy8" "ii:yyy9" ; do
- + powershell -Command "Remove-Item -Path .\\${streamname} -ErrorAction SilentlyContinue" || true
- +
- + fsutil file createnew ${streamname} 0
- + fsutil sparse setflag ${streamname} 1
- + cmd /C "C:\cygwin64\bin\printf.exe \"MARK1\\n\" >>${streamname}"
- +
- + fsutil file seteof ${streamname} 0x100000000
- + cmd /C "C:\cygwin64\bin\printf.exe \"MARK2\\n\" >>${streamname}"
- +
- + fsutil file seteof ${streamname} 0x200000000
- + cmd /C "C:\cygwin64\bin\printf.exe \"MARK3\\n\" >>${streamname}"
- +
- + fsutil file seteof ${streamname} 0x300000000
- + cmd /C "C:\cygwin64\bin\printf.exe \"MARK4\\n\" >>${streamname}"
- +
- + fsutil file seteof ${streamname} 0x400000000
- + cmd /C "C:\cygwin64\bin\printf.exe \"EOF.\\n\" >>${streamname}"
- +
- + # check whether we really have five data sections
- + fsutilout.stderr="${ fsutilout.stdout="${ fsutil sparse queryrange ${streamname} || true ; }" 2>&1 ; }"
- + #print -v fsutilout
- + if (( $(wc -l <<<"${fsutilout.stdout}") != 5 )) ; then
- + print -u2 -f $"Test failed, expected 5 lines of output\n"
- + return 1
- + fi
- +
- + # punch a hole over the data section containing "MARK3" ...
- + fsutil sparse setrange ${streamname} $((0x200000000-0x100000)) $((2*0x100000))
- +
- + # ... and verify that we now only have four data sections left:
- + fsutilout.stderr="${ fsutilout.stdout="${ fsutil sparse queryrange ${streamname} || true ; }" 2>&1 ; }"
- + #print -v fsutilout
- + if (( $(wc -l <<<"${fsutilout.stdout}") != 4 )) ; then
- + print -u2 -f $"Test failed, expected 4 lines of output\n"
- + return 1
- + fi
- + done
- +
- + printf '#\n# TEST OK\n#\n'
- + return 0
- +}
- +
- +
- +#
- +# main
- +#
- +
- +builtin wc
- +
- +test_sparse_streams
- +
- +#EOF.
- --
- 2.51.0
- From 82ca2474b21d67bf67274cf006cb0c11b61d5c00 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 8 Jan 2026 20:30:14 +0100
- Subject: [PATCH 3/7] tests: winfsinfo should use the public userland API for
- getting Win32 named stream information
- winfsinfo should use the public userland API (i.e.
- |GetFileInformationByHandleEx(..., FileStreamInfo, ...)| for getting Win32
- named stream information.
- Reported-by: Cedric Blancher <cedric.blancher@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- tests/winfsinfo1/winfsinfo.c | 29 +++++++++++++----------------
- 1 file changed, 13 insertions(+), 16 deletions(-)
- diff --git a/tests/winfsinfo1/winfsinfo.c b/tests/winfsinfo1/winfsinfo.c
- index 74ac2b7..a1c12b5 100644
- --- a/tests/winfsinfo1/winfsinfo.c
- +++ b/tests/winfsinfo1/winfsinfo.c
- @@ -1522,9 +1522,8 @@ static
- int get_filestreaminfo(const char *progname, const char *filename)
- {
- int res = EXIT_FAILURE;
- - NTSTATUS status;
- - IO_STATUS_BLOCK iostatus;
- - PFILE_STREAM_INFORMATION fsi = NULL;
- + bool ok;
- + PFILE_STREAM_INFO fsi = NULL;
- HANDLE fileHandle = CreateFileA(filename,
- GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
- @@ -1540,8 +1539,8 @@ int get_filestreaminfo(const char *progname, const char *filename)
- #define MAX_STREAM_INFOS (16)
- #define FSI_MAXCHARS (256)
- - fsi = calloc(1,
- - (sizeof(FILE_STREAM_INFORMATION)+sizeof(wchar_t)*FSI_MAXCHARS)*MAX_STREAM_INFOS);
- + size_t fsi_size = (sizeof(FILE_STREAM_INFO)+sizeof(wchar_t)*FSI_MAXCHARS)*MAX_STREAM_INFOS;
- + fsi = calloc(1, fsi_size);
- if (fsi == NULL) {
- (void)fprintf(stderr,
- "%s: Out of memory.\n",
- @@ -1549,23 +1548,21 @@ int get_filestreaminfo(const char *progname, const char *filename)
- return EXIT_FAILURE;
- }
- - status = ZwQueryInformationFile(fileHandle,
- - &iostatus,
- - fsi,
- - ((sizeof(FILE_STREAM_INFORMATION)+sizeof(wchar_t)*FSI_MAXCHARS)*MAX_STREAM_INFOS),
- - FileStreamInformation);
- + ok = GetFileInformationByHandleEx(fileHandle,
- + FileStreamInfo,
- + fsi, fsi_size);
- - if (status != STATUS_SUCCESS) {
- - (void)fprintf(stderr, "%s: ZwQueryInformationFile() "
- - "error. status==0x%lx.\n",
- + if (!ok) {
- + (void)fprintf(stderr, "%s: GetFileInformationByHandleEx() "
- + "error, lasterr=%d.\n",
- progname,
- - (long)status);
- + (int)GetLastError());
- res = EXIT_FAILURE;
- goto done;
- }
- int streamindex;
- - FILE_STREAM_INFORMATION *stream;
- + const FILE_STREAM_INFO *stream;
- (void)printf("(\n");
- (void)printf("\tfilename='%s'\n", filename);
- @@ -1584,7 +1581,7 @@ int get_filestreaminfo(const char *progname, const char *filename)
- if (stream->NextEntryOffset == 0)
- break;
- - stream = (FILE_STREAM_INFORMATION *)((char *)stream + stream->NextEntryOffset);
- + stream = (const FILE_STREAM_INFO *)((char *)stream + stream->NextEntryOffset);
- }
- (void)printf("\t)\n");
- --
- 2.51.0
- From 3c30962d2afc1fec7aaac660c637076d0dd2a8fe Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 8 Jan 2026 22:14:56 +0100
- Subject: [PATCH 4/7] README.md,docs: Update docs for file cloning and offload
- copy about Win32 named streams
- Update docs for file cloning and offload copy about Win32 named streams.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- README.md | 14 +++++++++-----
- docs/README.xml | 9 ++++++---
- 2 files changed, 15 insertions(+), 8 deletions(-)
- diff --git a/README.md b/README.md
- index 49ce9c3..5e9f717 100644
- --- a/README.md
- +++ b/README.md
- @@ -136,8 +136,9 @@ NFSv4.2/NFSv4.1 filesystem driver for Windows 10/11 & Windows Server
- itself supports an unlimited number of data ranges)
- - `/cygdrive/c/Windows/system32/xcopy /sparse` can be used to copy
- - sparse files. Requires on Win11 \>= 22H2 because it relies on
- - `|CopyFile2()|` flag `|COPY_FILE_ENABLE_SPARSE_COPY|`.
- + sparse files+sparse named streams. Requires on Win11 \>= 22H2
- + because it relies on `|CopyFile2()|` flag
- + `|COPY_FILE_ENABLE_SPARSE_COPY|`.
- - Windows "named streams"/[Alternate Data
- Stream](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/c54dec26-1551-4d3a-a0ea-4fa40f848eb3)
- @@ -149,6 +150,8 @@ NFSv4.2/NFSv4.1 filesystem driver for Windows 10/11 & Windows Server
- `|FSCTL_QUERY_ALLOCATED_RANGES|`, `|FSCTL_SET_SPARSE|`,
- `|FSCTL_SET_ZERO_DATA|` etc. on Win32 named streams)
- + - Supports Win32 named streams on directories.
- +
- - Requires NFSv4.1 server which supports the NFSv4.1 named attributes.
- - Case-insensitive filesystem support
- @@ -165,7 +168,8 @@ NFSv4.2/NFSv4.1 filesystem driver for Windows 10/11 & Windows Server
- - Requires NFSv4.2 server which supports the NFSv4.2 operations
- "COPY", "DEALLOCATE", "SEEK"
- - - Sparse files are correctly copied including all hole and data ranges
- + - Sparse files+sparse Win32 named streams are correctly copied
- + including all hole and data ranges
- - Windows 10 `|CopyFile2()|` API uses
- `|FSCTL_OFFLOAD_READ|`+`|FSCTL_OFFLOAD_WRITE|` by default
- @@ -183,8 +187,8 @@ NFSv4.2/NFSv4.1 filesystem driver for Windows 10/11 & Windows Server
- "CLONE", "DEALLOCATE", "SEEK", and exports a filesystem which
- supports block cloning (e.g. Linux BTRFS+XFS, but NOT Linux tmpfs)
- - - Sparse files are correctly cloned, including all hole and data
- - ranges
- + - Sparse files+sparse Win32 named streams are correctly cloned,
- + including all hole and data ranges
- - `/usr/bin/winclonefile.exe` can be used to clone a file
- diff --git a/docs/README.xml b/docs/README.xml
- index fc8b96e..541cef7 100644
- --- a/docs/README.xml
- +++ b/docs/README.xml
- @@ -136,7 +136,7 @@
- <para><filename>/cygdrive/c/Windows/system32/fsutil sparse queryrange myfile.dat</filename> can be used to enumerate ranges where data are allocated (BUG: Win10+Win11 fsutil only support 64 data ranges, the filesystem itself supports an unlimited number of data ranges)</para>
- </listitem>
- <listitem>
- - <para><filename>/cygdrive/c/Windows/system32/xcopy /sparse</filename> can be used to copy sparse files. Requires on Win11 >= 22H2 because it relies on <literal>|CopyFile2()|</literal> flag <literal>|COPY_FILE_ENABLE_SPARSE_COPY|</literal>.</para>
- + <para><filename>/cygdrive/c/Windows/system32/xcopy /sparse</filename> can be used to copy sparse files+sparse named streams. Requires on Win11 >= 22H2 because it relies on <literal>|CopyFile2()|</literal> flag <literal>|COPY_FILE_ENABLE_SPARSE_COPY|</literal>.</para>
- </listitem>
- </itemizedlist>
- </para>
- @@ -150,6 +150,9 @@
- <listitem>
- <para>Supports sparse streams (e.g. supports Win32 APIs <literal>|FSCTL_QUERY_ALLOCATED_RANGES|</literal>, <literal>|FSCTL_SET_SPARSE|</literal>, <literal>|FSCTL_SET_ZERO_DATA|</literal> etc. on Win32 named streams)</para>
- </listitem>
- + <listitem>
- + <para>Supports Win32 named streams on directories.</para>
- + </listitem>
- <listitem>
- <para>Requires NFSv4.1 server which supports the NFSv4.1 named attributes.</para>
- </listitem>
- @@ -175,7 +178,7 @@
- <para>Requires NFSv4.2 server which supports the NFSv4.2 operations "COPY", "DEALLOCATE", "SEEK"</para>
- </listitem>
- <listitem>
- - <para>Sparse files are correctly copied including all hole and data ranges</para>
- + <para>Sparse files+sparse Win32 named streams are correctly copied including all hole and data ranges</para>
- </listitem>
- <listitem>
- <para>Windows 10 <literal>|CopyFile2()|</literal> API uses <literal>|FSCTL_OFFLOAD_READ|</literal>+<literal>|FSCTL_OFFLOAD_WRITE|</literal> by default</para>
- @@ -196,7 +199,7 @@
- <para>Requires NFSv4.2 server which supports the NFSv4.2 operations "CLONE", "DEALLOCATE", "SEEK", and exports a filesystem which supports block cloning (e.g. Linux BTRFS+XFS, but NOT Linux tmpfs)</para>
- </listitem>
- <listitem>
- - <para>Sparse files are correctly cloned, including all hole and data ranges</para>
- + <para>Sparse files+sparse Win32 named streams are correctly cloned, including all hole and data ranges</para>
- </listitem>
- <listitem>
- <para><filename>/usr/bin/winclonefile.exe</filename> can be used to clone a file</para>
- --
- 2.51.0
- From d5616ba0e62c4701e8c4830268feed855917979d Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 8 Jan 2026 22:21:37 +0100
- Subject: [PATCH 5/7] daemon: Fix state leak if ACL mapping for file/dir
- creation fails
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- Fix state leak if ACL mapping for file/dir creation fails.
- Reported-by: Aurelien Couderc <aurelien.couderc2002@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/open.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
- diff --git a/daemon/open.c b/daemon/open.c
- index a86824c..585245c 100644
- --- a/daemon/open.c
- +++ b/daemon/open.c
- @@ -920,7 +920,7 @@ static int handle_open(void *daemon_context, nfs41_upcall *upcall)
- eprintf("handle_open: "
- "GetSecurityDescriptorDacl() failed, lasterr=%d\n",
- status);
- - goto out;
- + goto out_free_state;
- }
- status = GetSecurityDescriptorOwner(args->sec_desc,
- &sid, &sid_default);
- @@ -929,7 +929,7 @@ static int handle_open(void *daemon_context, nfs41_upcall *upcall)
- eprintf("handle_open: "
- "GetSecurityDescriptorOwner() failed, lasterr=%d\n",
- status);
- - goto out;
- + goto out_free_state;
- }
- status = GetSecurityDescriptorGroup(args->sec_desc,
- &gsid, &gsid_default);
- @@ -938,7 +938,7 @@ static int handle_open(void *daemon_context, nfs41_upcall *upcall)
- eprintf("handle_open: "
- "GetSecurityDescriptorOwner() failed, lasterr=%d\n",
- status);
- - goto out;
- + goto out_free_state;
- }
- status = map_dacl_2_nfs4acl(acl, sid, gsid, &create_nfs4_acl,
- state->type,
- @@ -948,7 +948,7 @@ static int handle_open(void *daemon_context, nfs41_upcall *upcall)
- eprintf("handle_open: "
- "map_dacl_2_nfs4acl() failed, status=%d\n",
- status);
- - goto out;
- + goto out_free_state;
- }
- }
- #endif /* NFS41_DRIVER_ALLOW_CREATEFILE_ACLS */
- --
- 2.51.0
- From b1f973c9aa4bca91a175621dc0f0f2d5a77e08f4 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 8 Jan 2026 22:47:39 +0100
- Subject: [PATCH 6/7] tests: Do not use a hardcoded Win path to printf.exe
- Do not use a hardcoded Windows path to printf.exe, Cygwin 32bit
- uses C:\cygwin\, Cygwin 64bit uses C:\cygwin64\, and MSYS2
- can be installed in any location.
- Reported-by: Cedric Blancher <cedric.blancher@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- tests/sparsefiles/winsparsestream1.ksh | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
- diff --git a/tests/sparsefiles/winsparsestream1.ksh b/tests/sparsefiles/winsparsestream1.ksh
- index 897fdcd..c2eb19e 100644
- --- a/tests/sparsefiles/winsparsestream1.ksh
- +++ b/tests/sparsefiles/winsparsestream1.ksh
- @@ -37,6 +37,8 @@ function test_sparse_streams
- set -o errexit
- set -o nounset
- + # Windows path to printf.exe, Cygwin can use "C:\cygwin64" or "C:\cygwin"
- + typeset -r wpath_printf="$(cygpath -w /bin/printf.exe)"
- compound fsutilout
- rm -f ii
- @@ -52,19 +54,19 @@ function test_sparse_streams
- fsutil file createnew ${streamname} 0
- fsutil sparse setflag ${streamname} 1
- - cmd /C "C:\cygwin64\bin\printf.exe \"MARK1\\n\" >>${streamname}"
- + cmd /C "${wpath_printf} \"MARK1\\n\" >>${streamname}"
- fsutil file seteof ${streamname} 0x100000000
- - cmd /C "C:\cygwin64\bin\printf.exe \"MARK2\\n\" >>${streamname}"
- + cmd /C "${wpath_printf} \"MARK2\\n\" >>${streamname}"
- fsutil file seteof ${streamname} 0x200000000
- - cmd /C "C:\cygwin64\bin\printf.exe \"MARK3\\n\" >>${streamname}"
- + cmd /C "${wpath_printf} \"MARK3\\n\" >>${streamname}"
- fsutil file seteof ${streamname} 0x300000000
- - cmd /C "C:\cygwin64\bin\printf.exe \"MARK4\\n\" >>${streamname}"
- + cmd /C "${wpath_printf} \"MARK4\\n\" >>${streamname}"
- fsutil file seteof ${streamname} 0x400000000
- - cmd /C "C:\cygwin64\bin\printf.exe \"EOF.\\n\" >>${streamname}"
- + cmd /C "${wpath_printf} \"EOF.\\n\" >>${streamname}"
- # check whether we really have five data sections
- fsutilout.stderr="${ fsutilout.stdout="${ fsutil sparse queryrange ${streamname} || true ; }" 2>&1 ; }"
- --
- 2.51.0
- From ab6f2ffef853d7dc0453776d448329833f4f011c Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 8 Jan 2026 23:32:18 +0100
- Subject: [PATCH 7/7] daemon: Explicily return delegations if we instruct the
- NFS server to query or modify data
- Explicily return delegations if we instruct the NFS server to query
- (i.e. |FSCTL_QUERY_ALLOCATED_RANGES|) or modify data (i.e.
- |FSCTL_DUPLICATE_EXTENTS_TO_FILE|, |FSCTL_OFFLOAD_WRITE|).
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/fsctl.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
- diff --git a/daemon/fsctl.c b/daemon/fsctl.c
- index a12d5d8..7d25a90 100644
- --- a/daemon/fsctl.c
- +++ b/daemon/fsctl.c
- @@ -278,6 +278,9 @@ int handle_queryallocatedranges(void *daemon_context,
- "got space for %ld records\n",
- (int)num_records));
- + nfs41_delegation_return(state->session, &state->file,
- + OPEN_DELEGATE_READ, FALSE);
- +
- args->buffer_overflow = FALSE;
- args->returned_size = 0;
- @@ -410,6 +413,9 @@ int handle_setzerodata(void *daemon_context,
- goto out;
- }
- + nfs41_delegation_return(state->session, &state->file,
- + OPEN_DELEGATE_READ, FALSE);
- +
- nfs41_open_stateid_arg(state, &stateid);
- status = nfs42_deallocate(session, file, &stateid,
- @@ -763,6 +769,11 @@ int handle_duplicatedata(void *daemon_context,
- goto out;
- }
- + nfs41_delegation_return(src_state->session, &src_state->file,
- + OPEN_DELEGATE_READ, FALSE);
- + nfs41_delegation_return(dst_state->session, &dst_state->file,
- + OPEN_DELEGATE_READ, FALSE);
- +
- nfs41_open_stateid_arg(src_state, &src_stateid);
- nfs41_open_stateid_arg(dst_state, &dst_stateid);
- --
- 2.51.0
msnfs41client: More fixes for Win32 named streams, tests, docs+misc, 2026-01-08
Posted by Anonymous on Thu 8th Jan 2026 22:43
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.
rovema.kpaste.net RSS