- From fb2c62facec29d3859a858fd8471c01382918d1e Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 17 Jul 2025 19:40:39 +0200
- Subject: [PATCH 1/5] sys: Fix updowncall timeout= mount option
- Fix updowncall timeout= mount option, it should support more
- than the default value.
- Reported-by: Josh Hurst <joshhurst@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41sys_mount.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
- diff --git a/sys/nfs41sys_mount.c b/sys/nfs41sys_mount.c
- index 181faca..e328885 100644
- --- a/sys/nfs41sys_mount.c
- +++ b/sys/nfs41sys_mount.c
- @@ -475,8 +475,8 @@ NTSTATUS nfs41_MountConfig_ParseOptions(
- }
- else if (wcsncmp(L"timeout", Name, NameLen) == 0) {
- status = nfs41_MountConfig_ParseDword(Option, &usValue,
- - &Config->timeout, UPCALL_TIMEOUT_DEFAULT,
- - UPCALL_TIMEOUT_DEFAULT);
- + &Config->timeout, 15,
- + 3600);
- }
- else if (wcsncmp(L"rsize", Name, NameLen) == 0) {
- status = nfs41_MountConfig_ParseDword(Option, &usValue,
- --
- 2.45.1
- From 727185b922ebab407a63a1dff93f7aa589d8919f Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 17 Jul 2025 19:42:58 +0200
- Subject: [PATCH 2/5] daemon: Setting the |FileAllocationInformation| should
- return the correct changeattr value
- Setting the |FileAllocationInformation| should return the correct
- changeattr value.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/setattr.c | 5 +++--
- daemon/util.c | 13 +++++++++++++
- daemon/util.h | 3 +++
- 3 files changed, 19 insertions(+), 2 deletions(-)
- diff --git a/daemon/setattr.c b/daemon/setattr.c
- index e4926a4..a812708 100644
- --- a/daemon/setattr.c
- +++ b/daemon/setattr.c
- @@ -41,7 +41,6 @@
- #error UPCALL_BUF_SIZE too small for rename ((NFS41_MAX_PATH_LEN*2)+2048)
- #endif
- -
- /* NFS41_SYSOP_FILE_SET */
- static int parse_setattr(unsigned char *buffer, uint32_t length, nfs41_upcall *upcall)
- {
- @@ -515,7 +514,9 @@ static int handle_nfs41_set_size(void *daemon_context, setattr_upcall_args *args
- * automagically
- */
- if (args->set_class == FileAllocationInformation) {
- - status = NO_ERROR;
- + status = nfs41_cached_getchangeattr(state, &info);
- + EASSERT(bitmap_isset(&info.attrmask, 0, FATTR4_WORD0_CHANGE));
- + args->ctime = info.change;
- goto out;
- }
- diff --git a/daemon/util.c b/daemon/util.c
- index 3a56b7c..bf99ac1 100644
- --- a/daemon/util.c
- +++ b/daemon/util.c
- @@ -638,3 +638,16 @@ bool getwinntversionnnumbers(
- return false;
- #endif /* _WIN64 */
- }
- +
- +int nfs41_cached_getchangeattr(nfs41_open_state *state, nfs41_file_info *restrict info)
- +{
- + int status;
- + bitmap4 change_bitmap = {
- + .count = 1,
- + .arr[0] = FATTR4_WORD0_CHANGE,
- + };
- +
- + status = nfs41_cached_getattr(state->session,
- + &state->file, &change_bitmap, info);
- + return status;
- +}
- diff --git a/daemon/util.h b/daemon/util.h
- index 3f640cc..53c0ad3 100644
- --- a/daemon/util.h
- +++ b/daemon/util.h
- @@ -34,6 +34,7 @@
- extern DWORD NFS41D_VERSION;
- struct __nfs41_session;
- struct __nfs41_write_verf;
- +typedef struct __nfs41_open_state nfs41_open_state;
- typedef struct __nfs41_file_info nfs41_file_info;
- typedef struct __nfs41_superblock nfs41_superblock;
- enum stable_how4;
- @@ -376,4 +377,6 @@ bool_t waitcriticalsection(LPCRITICAL_SECTION cs);
- bool getwinntversionnnumbers(DWORD *MajorVersionPtr, DWORD *MinorVersionPtr, DWORD *BuildNumberPtr);
- +int nfs41_cached_getchangeattr(nfs41_open_state *state, nfs41_file_info *restrict info);
- +
- #endif /* !__NFS41_DAEMON_UTIL_H__ */
- --
- 2.45.1
- From a14380fd029efdbcebd5faf774cd31f98546f1a5 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 17 Jul 2025 20:00:40 +0200
- Subject: [PATCH 3/5] daemon: Fix returned size values for
- |FileFsAttributeInformation|+|FileFsVolumeInformation|
- Fix returned size values for |FileFsAttributeInformation|+|FileFsVolumeInformation|
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/volume.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
- diff --git a/daemon/volume.c b/daemon/volume.c
- index d1df718..6c0e058 100644
- --- a/daemon/volume.c
- +++ b/daemon/volume.c
- @@ -154,7 +154,8 @@ static int handle_volume(void *daemon_context, nfs41_upcall *upcall)
- 2049,
- (session->client->root->use_nfspubfh?"":""));
- vi->VolumeLabelLength = (ULONG)(wcslen(vi->VolumeLabel)*sizeof(wchar_t));
- - args->len = sizeof(args->info.volume_info) + vi->VolumeLabelLength;
- + args->len = sizeof(args->info.volume_info) +
- + vi->VolumeLabelLength - 1*sizeof(wchar_t);
- break;
- case FileFsSizeInformation:
- @@ -182,9 +183,10 @@ static int handle_volume(void *daemon_context, nfs41_upcall *upcall)
- break;
- case FileFsAttributeInformation:
- - args->len = sizeof(args->info.attribute);
- nfs41_superblock_fs_attributes(upcall->state_ref->file.fh.superblock,
- &args->info.attribute);
- + args->len = sizeof(FILE_FS_ATTRIBUTE_INFORMATION) +
- + args->info.attribute.FileSystemNameLength-1*sizeof(wchar_t);
- break;
- case FileFsSectorSizeInformation:
- --
- 2.45.1
- From 8131d5ef3df5f384bb30a6ed0dc448a0448db61b Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 17 Jul 2025 20:02:38 +0200
- Subject: [PATCH 4/5] daemon: Fix volumelabel size in alternate |MAX_PATH|
- codepath
- Fix volumelabel size in alternate |MAX_PATH| codepath
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/volume.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/daemon/volume.c b/daemon/volume.c
- index 6c0e058..cba4c1d 100644
- --- a/daemon/volume.c
- +++ b/daemon/volume.c
- @@ -147,7 +147,7 @@ static int handle_volume(void *daemon_context, nfs41_upcall *upcall)
- */
- 31,
- #else
- - (MAX_PATH*sizeof(wchar_t)),
- + MAX_PATH,
- #endif
- L"nfs://%s:%d/%s",
- session->client->rpc->server_name,
- --
- 2.45.1
- From 96b9206b655f9b59fbcab0c045c94bd61a05a072 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 17 Jul 2025 20:06:20 +0200
- Subject: [PATCH 5/5] daemon: volume label nfs://-URL should include parameter
- for public NFS
- nfs://-URL returned by |FileFsVolumeInformation|'s volume label field
- should include parameter for public NFS.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/volume.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/daemon/volume.c b/daemon/volume.c
- index cba4c1d..c32022e 100644
- --- a/daemon/volume.c
- +++ b/daemon/volume.c
- @@ -152,7 +152,7 @@ static int handle_volume(void *daemon_context, nfs41_upcall *upcall)
- L"nfs://%s:%d/%s",
- session->client->rpc->server_name,
- 2049,
- - (session->client->root->use_nfspubfh?"":""));
- + (session->client->root->use_nfspubfh?"public=1":""));
- vi->VolumeLabelLength = (ULONG)(wcslen(vi->VolumeLabel)*sizeof(wchar_t));
- args->len = sizeof(args->info.volume_info) +
- vi->VolumeLabelLength - 1*sizeof(wchar_t);
- --
- 2.45.1
msnfs41client: Fixes for volumelabel, fileallocationinfo changeattr+misc, 2025-07-17
Posted by Anonymous on Thu 17th Jul 2025 20:14
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.