- From 7db0e4bd2aa81ccda4d5df72ef22a2ecabb0a4c7 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Wed, 6 Aug 2025 16:53:20 +0200
- Subject: [PATCH 1/8] sys: |FileDispositionInformation| should use
- delete-on-close and not POSIX-semantics
- |FileDispositionInformation| should use Win32 delete-on-close and not
- POSIX-semantics for deleting files and dirs.
- Only |FileDispositionInformationEx| can use POSIX semantics via
- |FILE_DISPOSITION_INFORMATION_EX.Flags & FILE_DISPOSITION_POSIX_SEMANTICS|,
- but we cannot implement that (yet) because the Windows rdbss.lib does
- not support |FileDispositionInformationEx|+|FileRenameInformationEx| ... ;-(
- Reported-by: Lionel Cons <Lionelcons1972@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41sys_buildconfig.h | 3 ++-
- sys/nfs41sys_fileinfo.c | 20 +++++++++++++++++++-
- 2 files changed, 21 insertions(+), 2 deletions(-)
- diff --git a/sys/nfs41sys_buildconfig.h b/sys/nfs41sys_buildconfig.h
- index 2809a4a..3730547 100644
- --- a/sys/nfs41sys_buildconfig.h
- +++ b/sys/nfs41sys_buildconfig.h
- @@ -1,5 +1,5 @@
- /* NFSv4.1 client for Windows
- - * Copyright (C) 2023-2024 Roland Mainz <roland.mainz@nrubsig.org>
- + * Copyright (C) 2023-2025 Roland Mainz <roland.mainz@nrubsig.org>
- *
- * Roland Mainz <roland.mainz@nrubsig.org>
- *
- @@ -22,6 +22,7 @@
- #define _NFS41SYS_BUILDCONFIG_H_ 1
- /* Driver build config */
- +// #define FORCE_POSIX_SEMANTICS_DELETE 1
- #define USE_STACK_FOR_DOWNCALL_UPDOWNCALLENTRY_MEM 1
- #if (NTDDI_VERSION >= NTDDI_WIN10_VB)
- diff --git a/sys/nfs41sys_fileinfo.c b/sys/nfs41sys_fileinfo.c
- index d7dc5e7..de386ab 100644
- --- a/sys/nfs41sys_fileinfo.c
- +++ b/sys/nfs41sys_fileinfo.c
- @@ -640,7 +640,10 @@ NTSTATUS nfs41_SetFileInformation(
- NTSTATUS status = STATUS_INVALID_PARAMETER;
- nfs41_updowncall_entry *entry = NULL;
- FILE_INFORMATION_CLASS InfoClass = RxContext->Info.FileInformationClass;
- +
- +#ifdef FORCE_POSIX_SEMANTICS_DELETE
- FILE_RENAME_INFORMATION rinfo;
- +#endif /* FORCE_POSIX_SEMANTICS_DELETE */
- __notnull PMRX_SRV_OPEN SrvOpen = RxContext->pRelevantSrvOpen;
- __notnull PNFS41_V_NET_ROOT_EXTENSION pVNetRootContext =
- NFS41GetVNetRootExtension(SrvOpen->pVNetRoot);
- @@ -668,6 +671,12 @@ NTSTATUS nfs41_SetFileInformation(
- PFILE_DISPOSITION_INFORMATION dinfo =
- (PFILE_DISPOSITION_INFORMATION)RxContext->Info.Buffer;
- if (dinfo->DeleteFile) {
- +#ifdef FORCE_POSIX_SEMANTICS_DELETE
- + /*
- + * Do POSIX-style delete here, i.e. what
- + * |FILE_DISPOSITION_INFORMATION_EX.Flags &
- + * FILE_DISPOSITION_POSIX_SEMANTICS| would do
- + */
- nfs41_fcb->DeletePending = TRUE;
- // we can delete directories right away
- if (nfs41_fcb->StandardInfo.Directory)
- @@ -682,6 +691,11 @@ NTSTATUS nfs41_SetFileInformation(
- nfs41_fcb->Renamed = TRUE;
- break;
- }
- +#else
- + /* Do Win32 delete-on-close */
- + nfs41_fcb->DeletePending = TRUE;
- + nfs41_fcb->StandardInfo.DeletePending = TRUE;
- +#endif /* FORCE_POSIX_SEMANTICS_DELETE */
- } else {
- /* section 4.3.3 of [FSBO]
- * "file system behavior in the microsoft windows environment"
- @@ -732,13 +746,17 @@ NTSTATUS nfs41_SetFileInformation(
- entry->u.SetFile.InfoClass = InfoClass;
- +#ifdef FORCE_POSIX_SEMANTICS_DELETE
- /* original irp has infoclass for remove but we need to rename instead,
- * thus we changed the local variable infoclass */
- if (RxContext->Info.FileInformationClass == FileDispositionInformation &&
- InfoClass == FileRenameInformation) {
- entry->buf = &rinfo;
- entry->buf_len = sizeof(rinfo);
- - } else {
- + }
- + else
- +#endif /* FORCE_POSIX_SEMANTICS_DELETE */
- + {
- entry->buf = RxContext->Info.Buffer;
- entry->buf_len = RxContext->Info.Length;
- }
- --
- 2.45.1
- From 1ea82b5319ef289b5b9ad4b1a6e0ffbc91bb0263 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 7 Aug 2025 09:50:32 +0200
- Subject: [PATCH 2/8] sys: delete-on-close should not delete dirs with open
- filehandles
- delete-on-close should not delete dirs with open filehandles.
- Reported-by: Lionel Cons <Lionelcons1972@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41sys_buildconfig.h | 6 ++++++
- sys/nfs41sys_openclose.c | 8 +++++---
- 2 files changed, 11 insertions(+), 3 deletions(-)
- diff --git a/sys/nfs41sys_buildconfig.h b/sys/nfs41sys_buildconfig.h
- index 3730547..20b5188 100644
- --- a/sys/nfs41sys_buildconfig.h
- +++ b/sys/nfs41sys_buildconfig.h
- @@ -22,7 +22,13 @@
- #define _NFS41SYS_BUILDCONFIG_H_ 1
- /* Driver build config */
- +
- +/*
- + * |FORCE_POSIX_SEMANTICS_DELETE| and |FORCE_DELETE_DIRS_IMMEDIATELY| are for
- + * bug-by-bug compatibility with the original Windows NFSv3 filesystem driver
- + */
- // #define FORCE_POSIX_SEMANTICS_DELETE 1
- +// #define FORCE_DELETE_DIRS_IMMEDIATELY 1
- #define USE_STACK_FOR_DOWNCALL_UPDOWNCALLENTRY_MEM 1
- #if (NTDDI_VERSION >= NTDDI_WIN10_VB)
- diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
- index 9a4431f..a4c3508 100644
- --- a/sys/nfs41sys_openclose.c
- +++ b/sys/nfs41sys_openclose.c
- @@ -1165,9 +1165,11 @@ NTSTATUS nfs41_CloseSrvOpen(
- entry->u.Close.srv_open = SrvOpen;
- if (nfs41_fcb->StandardInfo.DeletePending)
- nfs41_fcb->DeletePending = TRUE;
- - if (!RxContext->pFcb->OpenCount ||
- - (nfs41_fcb->StandardInfo.DeletePending &&
- - nfs41_fcb->StandardInfo.Directory))
- + if ((RxContext->pFcb->OpenCount == 0)
- +#ifdef FORCE_DELETE_DIRS_IMMEDIATELY
- + || (nfs41_fcb->StandardInfo.DeletePending && nfs41_fcb->StandardInfo.Directory)
- +#endif /* FORCE_DELETE_DIRS_IMMEDIATELY */
- + )
- entry->u.Close.remove = nfs41_fcb->StandardInfo.DeletePending;
- if (!RxContext->pFcb->OpenCount)
- entry->u.Close.renamed = nfs41_fcb->Renamed;
- --
- 2.45.1
- From 96cbf08b0a1b90cae1c21a4d102c4b2a1a799341 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 7 Aug 2025 11:02:19 +0200
- Subject: [PATCH 3/8] cygwin,tests: Update drmemory version
- Update drmemory version.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/devel/msnfs41client.bash | 2 +-
- tests/manual_testing.txt | 6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
- diff --git a/cygwin/devel/msnfs41client.bash b/cygwin/devel/msnfs41client.bash
- index 4a391dd..56be0fd 100755
- --- a/cygwin/devel/msnfs41client.bash
- +++ b/cygwin/devel/msnfs41client.bash
- @@ -485,7 +485,7 @@ function nfsclient_rundeamon
- "${nfsd_args[@]}"
- elif false ; then
- #
- - # test nfsd.exe with Dr. Memory (version 2.6.0 -- build 0)
- + # test nfsd.exe with Dr. Memory (version 2.6.2028 -- build 0)
- #
- export _NT_ALT_SYMBOL_PATH="$(cygpath -w "$PWD")"
- nfsd_args=(
- diff --git a/tests/manual_testing.txt b/tests/manual_testing.txt
- index 526547c..9500021 100644
- --- a/tests/manual_testing.txt
- +++ b/tests/manual_testing.txt
- @@ -791,9 +791,9 @@ ksh93 tests/sparsefiles/testsparsefile1.ksh
- #
- # cd /cygdrive/l/download/
- -# from https://github.com/DynamoRIO/drmemory/releases/tag/cronbuild-2.6.20167
- -wget 'https://github.com/DynamoRIO/drmemory/releases/download/cronbuild-2.6.20167/DrMemory-Windows-2.6.20167.msi'
- -msiexec /i DrMemory-Windows-2.6.20167.msi
- +# from https://github.com/DynamoRIO/drmemory/releases/tag/cronbuild-2.6.20282
- +wget 'https://github.com/DynamoRIO/drmemory/releases/download/cronbuild-2.6.20282/DrMemory-Windows-2.6.20282.msi'
- +msiexec /i DrMemory-Windows-2.6.20282.msi
- #
- --
- 2.45.1
- From beb724ccfc504aa5d39553aa7430cd9ba0864824 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 7 Aug 2025 12:16:30 +0200
- Subject: [PATCH 4/8] sys: Revert "sys: delete-on-close should not delete dirs
- with open filehandles", NTFS allows this
- Revert "sys: delete-on-close should not delete dirs with open filehandles",
- NTFS allows deleting files immediately even if there are open file handles
- to that directory.
- Reviewed-by: Lionel Cons <Lionelcons1972@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41sys_buildconfig.h | 5 ++---
- sys/nfs41sys_fileinfo.c | 5 ++++-
- sys/nfs41sys_openclose.c | 12 +++++++-----
- 3 files changed, 13 insertions(+), 9 deletions(-)
- diff --git a/sys/nfs41sys_buildconfig.h b/sys/nfs41sys_buildconfig.h
- index 20b5188..a8c10ad 100644
- --- a/sys/nfs41sys_buildconfig.h
- +++ b/sys/nfs41sys_buildconfig.h
- @@ -24,11 +24,10 @@
- /* Driver build config */
- /*
- - * |FORCE_POSIX_SEMANTICS_DELETE| and |FORCE_DELETE_DIRS_IMMEDIATELY| are for
- - * bug-by-bug compatibility with the original Windows NFSv3 filesystem driver
- + * |FORCE_POSIX_SEMANTICS_DELETE| is for bug-by-bug compatibility with the
- + * original Windows NFSv3 filesystem driver
- */
- // #define FORCE_POSIX_SEMANTICS_DELETE 1
- -// #define FORCE_DELETE_DIRS_IMMEDIATELY 1
- #define USE_STACK_FOR_DOWNCALL_UPDOWNCALLENTRY_MEM 1
- #if (NTDDI_VERSION >= NTDDI_WIN10_VB)
- diff --git a/sys/nfs41sys_fileinfo.c b/sys/nfs41sys_fileinfo.c
- index de386ab..82b8054 100644
- --- a/sys/nfs41sys_fileinfo.c
- +++ b/sys/nfs41sys_fileinfo.c
- @@ -678,7 +678,10 @@ NTSTATUS nfs41_SetFileInformation(
- * FILE_DISPOSITION_POSIX_SEMANTICS| would do
- */
- nfs41_fcb->DeletePending = TRUE;
- - // we can delete directories right away
- + /*
- + * We can delete directories right away
- + * (NTFS allows deleting a dir which has open handles)
- + */
- if (nfs41_fcb->StandardInfo.Directory)
- break;
- nfs41_fcb->StandardInfo.DeletePending = TRUE;
- diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
- index a4c3508..fc1821f 100644
- --- a/sys/nfs41sys_openclose.c
- +++ b/sys/nfs41sys_openclose.c
- @@ -1165,11 +1165,13 @@ NTSTATUS nfs41_CloseSrvOpen(
- entry->u.Close.srv_open = SrvOpen;
- if (nfs41_fcb->StandardInfo.DeletePending)
- nfs41_fcb->DeletePending = TRUE;
- - if ((RxContext->pFcb->OpenCount == 0)
- -#ifdef FORCE_DELETE_DIRS_IMMEDIATELY
- - || (nfs41_fcb->StandardInfo.DeletePending && nfs41_fcb->StandardInfo.Directory)
- -#endif /* FORCE_DELETE_DIRS_IMMEDIATELY */
- - )
- + /*
- + * Note that we can delete directories right away
- + * (NTFS allows deleting a dir which has open handles)
- + */
- + if ((RxContext->pFcb->OpenCount == 0) ||
- + (nfs41_fcb->StandardInfo.DeletePending &&
- + nfs41_fcb->StandardInfo.Directory))
- entry->u.Close.remove = nfs41_fcb->StandardInfo.DeletePending;
- if (!RxContext->pFcb->OpenCount)
- entry->u.Close.renamed = nfs41_fcb->Renamed;
- --
- 2.45.1
- From 3dfc550541081211bfe4073600cd430eb28b6f3f Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 7 Aug 2025 12:18:03 +0200
- Subject: [PATCH 5/8] daemon: Add more debug info to |handle_nfs41_rename()|
- for rename-with-dest-open-filehandles
- Add more debug info to |handle_nfs41_rename()| for the case that the destination
- file still has open filehandles.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/setattr.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
- diff --git a/daemon/setattr.c b/daemon/setattr.c
- index 02b1060..a47918e 100644
- --- a/daemon/setattr.c
- +++ b/daemon/setattr.c
- @@ -465,8 +465,10 @@ static int handle_nfs41_rename(void *daemon_context, setattr_upcall_args *args)
- /* AGLO: 03/21/2011: we can't handle rename of a file with a filename
- * that is currently opened by this client
- */
- - eprintf("handle_nfs41_rename: destination '%s' is opened\n",
- - dst_path.path);
- + eprintf("handle_nfs41_rename: destination '%s' is opened, "
- + "ReplaceIfExists=%d\n",
- + dst_path.path,
- + (int)rename->ReplaceIfExists);
- /*
- * gisburn: HACK: We have disabled this check to get MariaDB working,
- * but we have to figure out what is the correct solution compared
- --
- 2.45.1
- From 244cc95a33030970b25f87bb8811e305f666cf91 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 7 Aug 2025 14:40:57 +0200
- Subject: [PATCH 6/8] README.md,cygwin,docs: Enable NFSv4.2 client+mountall
- services by default
- Enable NFSv4.2 client+mountall services by default.
- This marks a "flag day":
- We change the default behaviour. $ /sbin/msnfs41client install # will now
- enable the "ms-nfs41-client-service" and
- "ms-nfs41-client-globalmountall-service" services by DEFAULT, so an user
- only has to use /sbin/nfs_mount to mount a filesystem, or add a matching
- line to /etc/fstab.msnfs41client
- Developers can use $ /sbin/msnfs41client devinstall # to not
- enable the services, or use $ /sbin/msnfs41client disableautostartservices #
- to disable the automatic start of the Windows services at boot time.
- Reported-by: Lionel Cons <Lionelcons1972@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- README.md | 17 +++++------
- cygwin/devel/msnfs41client.bash | 54 +++++++++++++++++++++++++++++----
- docs/README.xml | 15 +++++----
- 3 files changed, 62 insertions(+), 24 deletions(-)
- diff --git a/README.md b/README.md
- index 48e6695..1c737a1 100644
- --- a/README.md
- +++ b/README.md
- @@ -517,7 +517,7 @@ NFS server side.
- for all users on a machine.
- - The "ms-nfs41-client-service" service is installed by default as
- - "disabled" and therefore always requires a "manual" start (e.g.,
- + "enabled" and therefore does not require a "manual" start (e.g.,
- `$ sc start ms-nfs41-client-service #`)
- - DOS devices are virtualised per LSA Logon, so each Logon needs to do
- @@ -547,16 +547,16 @@ NFS server side.
- $ sc qc ms-nfs41-client-service
- - - Start service automatically:
- + - Start service automatically (default):
- (`nfsd_debug.exe` will be started automagically, but mounts are not
- restored):
- - $ sc config ms-nfs41-client-service start=auto
- + $ /sbin/msnfs41client enableautostartservices
- - - Start service manually (default):
- + - Start service manually:
- - $ sc config ms-nfs41-client-service start=disabled
- + $ /sbin/msnfs41client disableautostartservices
- ### Manual starting the daemon
- @@ -626,17 +626,14 @@ Mounts created by user "SYSTEM" are usable by all users in a system.
- Example usage:
- # Create a file /etc/fstab.msnfs41client, which list the mounts
- - # which should be available system-wide
- + # which should be mounted system-wide at boot
- $ cat /etc/fstab.msnfs41client
- - nfs://[fe80::21b:1bff:fec3:7713]//bigdisk V nfs rw 0 0
- + nfs://[fe80::21b:1bff:fec3:7713]//bigdisk N: nfs sec=sys,rw 0 0
- # run "ms-nfs41-client-globalmountall-service", which runs
- # /sbin/mountall_msnfs41client as user "SYSTEM" to read
- # /etc/fstab.msnfs41client and mount the matching filesystems
- sc start ms-nfs41-client-globalmountall-service
- -BUG: "ms-nfs41-client-globalmountall-service" currently does not wait
- -until `nfsd*.exe` is available for accepting mounts.
- -
- ### WSL usage
- Example 1: Mount Windows NFSv4.2 share via Windows drive letter
- diff --git a/cygwin/devel/msnfs41client.bash b/cygwin/devel/msnfs41client.bash
- index 56be0fd..f6d7dec 100755
- --- a/cygwin/devel/msnfs41client.bash
- +++ b/cygwin/devel/msnfs41client.bash
- @@ -123,6 +123,8 @@ function nfsclient_install
- set -o xtrace
- set -o errexit
- + typeset cmd="$1"
- +
- typeset use_secureboot=false
- # switch to the location where this script is installed,
- @@ -232,9 +234,6 @@ function nfsclient_install
- --type 'manual' \
- --chdir "$PWD"
- - # query new 'ms-nfs41-client-service'
- - sc query 'ms-nfs41-client-service'
- -
- #
- # install "mountall_msnfs41client" as system service
- # 'ms-nfs41-client-globalmountall-service'
- @@ -272,12 +271,19 @@ function nfsclient_install
- {
- printf '#\n'
- printf '# /etc/fstab.msnfs41client - used by /sbin/mountall_msnfs41client\n'
- + printf '# at system boot time to mount global shares\n'
- printf '#\n\n'
- - printf '# nfs://[fe80::21b:1bff:fec3:7713]//bigdisk\tV\tnfs\trw\t0\t0\n\n'
- + printf '# nfs://[fe80::21b:1bff:fec3:7713]//bigdisk\tN:\tnfs\tsec=sys,rw\t0\t0\n\n'
- printf '# EOF.\n'
- } >'/etc/fstab.msnfs41client'
- fi
- + if [[ "$cmd" != *devinstall* ]] ; then
- + nfsclient_enable_autostartservices
- + fi
- +
- + # query new 'ms-nfs41-client-service'
- + sc query 'ms-nfs41-client-service'
- # query new 'ms-nfs41-client-globalmountall-service'
- sc query 'ms-nfs41-client-globalmountall-service'
- @@ -315,6 +321,18 @@ function nfsclient_install
- return 0
- }
- +function nfsclient_enable_autostartservices
- +{
- + sc config 'ms-nfs41-client-service' start=auto
- + sc config 'ms-nfs41-client-globalmountall-service' start=auto
- +}
- +
- +function nfsclient_disable_autostartservices
- +{
- + sc config 'ms-nfs41-client-service' start=disabled
- + sc config 'ms-nfs41-client-globalmountall-service' start=disabled
- +}
- +
- function nfsclient_adddriver
- {
- set -o nounset
- @@ -921,7 +939,7 @@ function main
- PATH+=':/cygdrive/c/Users/roland_mainz/download/DebugView'
- case "$cmd" in
- - 'install')
- + 'install' | 'devinstall')
- check_machine_arch || (( numerr++ ))
- require_cmd 'regtool.exe' || (( numerr++ ))
- require_cmd 'cygrunsrv.exe' || (( numerr++ ))
- @@ -937,7 +955,31 @@ function main
- fi
- (( numerr > 0 )) && return 1
- - nfsclient_install
- + nfsclient_install "$cmd"
- + return $?
- + ;;
- + 'enableautostartservices')
- + check_machine_arch || (( numerr++ ))
- + require_cmd 'sc.exe' || (( numerr++ ))
- + if ! is_windows_admin_account ; then
- + printf $"%s: %q requires Windows Adminstator permissions.\n" "$0" "$cmd"
- + (( numerr++ ))
- + fi
- + (( numerr > 0 )) && return 1
- +
- + nfsclient_enable_autostartservices
- + return $?
- + ;;
- + 'disableautostartservices')
- + check_machine_arch || (( numerr++ ))
- + require_cmd 'sc.exe' || (( numerr++ ))
- + if ! is_windows_admin_account ; then
- + printf $"%s: %q requires Windows Adminstator permissions.\n" "$0" "$cmd"
- + (( numerr++ ))
- + fi
- + (( numerr > 0 )) && return 1
- +
- + nfsclient_disable_autostartservices
- return $?
- ;;
- #
- diff --git a/docs/README.xml b/docs/README.xml
- index 6fc896a..1252843 100644
- --- a/docs/README.xml
- +++ b/docs/README.xml
- @@ -524,7 +524,7 @@ $ /sbin/msnfs41client install
- <para>requires "Administrator" account, and one nfsd client daemon is used for all users on a machine.</para>
- </listitem>
- <listitem>
- - <para>The "ms-nfs41-client-service" service is installed by default as "disabled" and therefore always requires a "manual" start (e.g., <command>$ sc start ms-nfs41-client-service #</command>)</para>
- + <para>The "ms-nfs41-client-service" service is installed by default as "enabled" and therefore does not require a "manual" start (e.g., <command>$ sc start ms-nfs41-client-service #</command>)</para>
- </listitem>
- <listitem>
- <para>DOS devices are virtualised per LSA Logon, so each Logon needs to do a separate <command>nfs_mount.exe</command> to mount a NFSv4 share. The exception are mounts created by user "SYSTEM", such mounts are available to all users/logons. (see <command>PsExec</command> or function "su_system" in <filename>msnfs41client.bash</filename> how to run a process as user "SYSTEM")</para>
- @@ -554,13 +554,13 @@ $ /sbin/msnfs41client install
- <programlisting>$ sc qc ms-nfs41-client-service</programlisting>
- </listitem>
- <listitem>
- - <para>Start service automatically:</para>
- + <para>Start service automatically (default):</para>
- <para>(<command>nfsd_debug.exe</command> will be started automagically, but mounts are not restored):</para>
- - <programlisting>$ sc config ms-nfs41-client-service start=auto</programlisting>
- + <programlisting>$ /sbin/msnfs41client enableautostartservices</programlisting>
- </listitem>
- <listitem>
- - <para>Start service manually (default):</para>
- - <programlisting>$ sc config ms-nfs41-client-service start=disabled</programlisting>
- + <para>Start service manually:</para>
- + <programlisting>$ /sbin/msnfs41client disableautostartservices</programlisting>
- </listitem>
- </itemizedlist>
- </para>
- @@ -634,14 +634,13 @@ $ net use '\0.49.202.230@2049\nfs4\net_tmpfs2' /delete</programlisting>
- <title>Global/System-wide mounts</title>
- <para>Mounts created by user "SYSTEM" are usable by all users in a system. Example usage:</para>
- <programlisting># Create a file /etc/fstab.msnfs41client, which list the mounts
- -# which should be available system-wide
- +# which should be mounted system-wide at boot
- $ cat /etc/fstab.msnfs41client
- -nfs://[fe80::21b:1bff:fec3:7713]//bigdisk V nfs rw 0 0
- +nfs://[fe80::21b:1bff:fec3:7713]//bigdisk N: nfs sec=sys,rw 0 0
- # run "ms-nfs41-client-globalmountall-service", which runs
- # /sbin/mountall_msnfs41client as user "SYSTEM" to read
- # /etc/fstab.msnfs41client and mount the matching filesystems
- sc start ms-nfs41-client-globalmountall-service</programlisting>
- - <para>BUG: "ms-nfs41-client-globalmountall-service" currently does not wait until <command>nfsd*.exe</command> is available for accepting mounts.</para>
- </section>
- <section xml:id="wsl-usage">
- --
- 2.45.1
- From c6c63900a5e644b9562d3cbb53da50b9a4c9f9fc Mon Sep 17 00:00:00 2001
- From: Dan Shelton <dan.f.shelton@gmail.com>
- Date: Thu, 7 Aug 2025 15:27:34 +0200
- Subject: [PATCH 7/8] sys: Fix build with all |DEBUG_*| flags in
- sys/nfs41sys_buildconfig.h enabled
- Fix build with all |DEBUG_*| flags in sys/nfs41sys_buildconfig.h enabled.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41sys_dir.c | 2 +-
- sys/nfs41sys_driver.c | 5 +++--
- sys/nfs41sys_driver.h | 2 ++
- 3 files changed, 6 insertions(+), 3 deletions(-)
- diff --git a/sys/nfs41sys_dir.c b/sys/nfs41sys_dir.c
- index 7f565f5..d2765be 100644
- --- a/sys/nfs41sys_dir.c
- +++ b/sys/nfs41sys_dir.c
- @@ -164,7 +164,7 @@ NTSTATUS unmarshal_nfs41_dirquery(
- return status;
- }
- -static void print_debug_filedirquery_header(
- +void print_debug_filedirquery_header(
- PRX_CONTEXT RxContext)
- {
- print_debug_header(RxContext);
- diff --git a/sys/nfs41sys_driver.c b/sys/nfs41sys_driver.c
- index 20ac368..628789f 100644
- --- a/sys/nfs41sys_driver.c
- +++ b/sys/nfs41sys_driver.c
- @@ -728,7 +728,8 @@ VOID nfs41_invalidate_fobx_entry(
- nfs41_fcb_list_entry, next);
- if (cur->nfs41_fobx == nfs41_fobx) {
- #ifdef DEBUG_CLOSE
- - DbgP("nfs41_invalidate_fobx_entry: Found match for fobx=0x%p\n", fobx);
- + DbgP("nfs41_invalidate_fobx_entry: Found match for nfs41_fobx=0x%p\n",
- + nfs41_fobx);
- #endif
- cur->nfs41_fobx = NULL;
- break;
- @@ -736,7 +737,7 @@ VOID nfs41_invalidate_fobx_entry(
- if (pEntry->Flink == &openlist.head) {
- #ifdef DEBUG_CLOSE
- DbgP("nfs41_invalidate_fobx_entry: reached EOL looking "
- - "for fobx 0x%p\n", fobx);
- + "for nfs41_fobx=0x%p\n", nfs41_fobx);
- #endif
- break;
- }
- diff --git a/sys/nfs41sys_driver.h b/sys/nfs41sys_driver.h
- index 87047f9..6f57818 100644
- --- a/sys/nfs41sys_driver.h
- +++ b/sys/nfs41sys_driver.h
- @@ -596,6 +596,8 @@ NTSTATUS marshal_nfs41_dirquery(
- NTSTATUS unmarshal_nfs41_dirquery(
- nfs41_updowncall_entry *cur,
- unsigned char **buf);
- +void print_debug_filedirquery_header(
- + PRX_CONTEXT RxContext);
- NTSTATUS check_nfs41_dirquery_args(
- IN PRX_CONTEXT RxContext);
- NTSTATUS nfs41_QueryDirectory(
- --
- 2.45.1
- From a150a36d3c43febf96d7744c1f2031cab2da31d8 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 7 Aug 2025 15:59:39 +0200
- Subject: [PATCH 8/8] cygwin: msnfs41client install should no longer disable
- Dfsc
- $ msnfs41client install # should no longer disable Dfsc,
- since we use UNC names wit \\hostname@portnumber\... #, which no
- longer collides with normal SMB usage.
- Reported-by: Lionel Cons <Lionelcons1972@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/devel/msnfs41client.bash | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
- diff --git a/cygwin/devel/msnfs41client.bash b/cygwin/devel/msnfs41client.bash
- index f6d7dec..d00e59e 100755
- --- a/cygwin/devel/msnfs41client.bash
- +++ b/cygwin/devel/msnfs41client.bash
- @@ -192,9 +192,13 @@ function nfsclient_install
- fi
- # disable DFS
- - sc query Dfsc
- - sc stop Dfsc || true
- - sc config Dfsc start=disabled
- + #
- + # Notes:
- + # - no longer needed because we have the UNC hostname@port layout
- + # - Use $ sc config Dfsc start=system to undo this
- + #sc query Dfsc
- + #sc stop Dfsc || true
- + #sc config Dfsc start=disabled
- sc query nfs41_driver
- domainname
- --
- 2.45.1
msnfs41client: Patches for use delete-on-close, enable NFS services by default+misc, 2025-08-07
Posted by Anonymous on Thu 7th Aug 2025 16:21
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.