pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: Patches for NFSv4.2 SEEK+misc, 2025-11-05-002
Posted by Anonymous on Wed 5th Nov 2025 20:09
raw | new post

  1. From 0c2c4d1ad9bc9432cb0544dc2fd30d4803dc0a9a Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Wed, 5 Nov 2025 19:59:42 +0100
  4. Subject: [PATCH 1/3] sys: Map |ERROR_NOT_SUPPORTED| to |STATUS_NOT_SUPPORTED|,
  5.  map |ERROR_CALL_NOT_IMPLEMENTED| to |STATUS_NOT_IMPLEMENTED|
  6.  
  7. |map_setfile_error()|,|map_query_acl_error()|,|map_mount_errors()|
  8. should map |ERROR_NOT_SUPPORTED| to |STATUS_NOT_SUPPORTED|,
  9. and add a mapping from |ERROR_CALL_NOT_IMPLEMENTED| to
  10. |STATUS_NOT_IMPLEMENTED|
  11.  
  12. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  13. ---
  14. sys/nfs41sys_acl.c      | 1 +
  15.  sys/nfs41sys_fileinfo.c | 3 ++-
  16.  sys/nfs41sys_mount.c    | 1 +
  17.  3 files changed, 4 insertions(+), 1 deletion(-)
  18.  
  19. diff --git a/sys/nfs41sys_acl.c b/sys/nfs41sys_acl.c
  20. index 3cab187..d8e4aa8 100644
  21. --- a/sys/nfs41sys_acl.c
  22. +++ b/sys/nfs41sys_acl.c
  23. @@ -183,6 +183,7 @@ NTSTATUS map_query_acl_error(
  24.  {
  25.      switch (error) {
  26.      case NO_ERROR:                  return STATUS_SUCCESS;
  27. +    case ERROR_CALL_NOT_IMPLEMENTED:return STATUS_NOT_IMPLEMENTED;
  28.      case ERROR_NOT_SUPPORTED:       return STATUS_NOT_SUPPORTED;
  29.      case ERROR_NONE_MAPPED:         return STATUS_NONE_MAPPED;
  30.      case ERROR_ACCESS_DENIED:       return STATUS_ACCESS_DENIED;
  31. diff --git a/sys/nfs41sys_fileinfo.c b/sys/nfs41sys_fileinfo.c
  32. index aaa2018..7fc38bf 100644
  33. --- a/sys/nfs41sys_fileinfo.c
  34. +++ b/sys/nfs41sys_fileinfo.c
  35. @@ -546,7 +546,8 @@ NTSTATUS map_setfile_error(
  36.      case ERROR_DIRECTORY_NOT_SUPPORTED: return STATUS_FILE_IS_A_DIRECTORY;
  37.      case ERROR_FILE_INVALID:            return STATUS_FILE_INVALID;
  38.      case ERROR_NOT_SAME_DEVICE:         return STATUS_NOT_SAME_DEVICE;
  39. -    case ERROR_NOT_SUPPORTED:           return STATUS_NOT_IMPLEMENTED;
  40. +    case ERROR_CALL_NOT_IMPLEMENTED:    return STATUS_NOT_IMPLEMENTED;
  41. +    case ERROR_NOT_SUPPORTED:           return STATUS_NOT_SUPPORTED;
  42.      case ERROR_NETWORK_ACCESS_DENIED:   return STATUS_NETWORK_ACCESS_DENIED;
  43.      case ERROR_NETNAME_DELETED:         return STATUS_NETWORK_NAME_DELETED;
  44.      case ERROR_BUFFER_OVERFLOW:         return STATUS_INSUFFICIENT_RESOURCES;
  45. diff --git a/sys/nfs41sys_mount.c b/sys/nfs41sys_mount.c
  46. index 80c4c3b..1f330c9 100644
  47. --- a/sys/nfs41sys_mount.c
  48. +++ b/sys/nfs41sys_mount.c
  49. @@ -255,6 +255,7 @@ NTSTATUS map_mount_errors(
  50.      case ERROR_BAD_NET_RESP:    return STATUS_UNEXPECTED_NETWORK_ERROR;
  51.      case ERROR_BAD_NET_NAME:    return STATUS_BAD_NETWORK_NAME;
  52.      case ERROR_BAD_NETPATH:     return STATUS_BAD_NETWORK_PATH;
  53. +    case ERROR_CALL_NOT_IMPLEMENTED: return STATUS_NOT_IMPLEMENTED;
  54.      case ERROR_NOT_SUPPORTED:   return STATUS_NOT_SUPPORTED;
  55.      case ERROR_NFS_VERSION_MISMATCH: return STATUS_NFS_VERSION_MISMATCH;
  56.      case ERROR_BAD_ARGUMENTS:   return STATUS_INVALID_PARAMETER;
  57. --
  58. 2.51.0
  59.  
  60. From 75955c7e47c33c5ebaea53e468d90df418df5656 Mon Sep 17 00:00:00 2001
  61. From: Roland Mainz <roland.mainz@nrubsig.org>
  62. Date: Wed, 5 Nov 2025 20:11:19 +0100
  63. Subject: [PATCH 2/3] daemon: Fix NFSv4.2 SEEK EOF detection
  64.  
  65. Fix NFSv4.2 SEEK EOF detection for files which are one single hole,
  66. or end with one hole.
  67.  
  68. Found with nfs-ganesha release "V9.0".
  69.  
  70. Reported-by: Lionel Cons <lionelcons1972@gmail.com>
  71. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  72. ---
  73. daemon/fsctl.c | 11 +++++++++++
  74.  1 file changed, 11 insertions(+)
  75.  
  76. diff --git a/daemon/fsctl.c b/daemon/fsctl.c
  77. index a8353c1..a12d5d8 100644
  78. --- a/daemon/fsctl.c
  79. +++ b/daemon/fsctl.c
  80. @@ -179,6 +179,17 @@ int query_sparsefile_datasections(nfs41_open_state *state,
  81.              (int)data_seek_sr_eof,
  82.              (int)hole_seek_sr_eof));
  83.  
  84. +        /*
  85. +         * Check whether we reached an EOF
  86. +         */
  87. +        if ((data_size == 0LL) &&
  88. +            ((data_seek_sr_eof == TRUE) || (hole_seek_sr_eof == TRUE))) {
  89. +            DPRINTF(QARLVL,
  90. +                ("(data_size==0)&&"
  91. +                "(data_seek_sr_eof==TRUE||hole_seek_sr_eof==TRUE), EOF\n"));
  92. +            break;
  93. +        }
  94. +
  95.          if (i < out_maxrecords) {
  96.              outbuffer[i].FileOffset.QuadPart = data_seek_sr_offset;
  97.              outbuffer[i].Length.QuadPart = data_size;
  98. --
  99. 2.51.0
  100.  
  101. From 485f65c36f2b1a2f07845c310d1f2f26c4dc562a Mon Sep 17 00:00:00 2001
  102. From: Roland Mainz <roland.mainz@nrubsig.org>
  103. Date: Wed, 5 Nov 2025 20:33:12 +0100
  104. Subject: [PATCH 3/3] tests: Update FreeBSD nfsd setup with comment about
  105.  client-side "wheel" group
  106.  
  107. Update FreeBSD nfsd setup with comment about client-side "wheel" group.
  108.  
  109. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  110. ---
  111. tests/nfs_server_setup.txt | 7 ++++++-
  112.  1 file changed, 6 insertions(+), 1 deletion(-)
  113.  
  114. diff --git a/tests/nfs_server_setup.txt b/tests/nfs_server_setup.txt
  115. index 00f802d..e802e80 100644
  116. --- a/tests/nfs_server_setup.txt
  117. +++ b/tests/nfs_server_setup.txt
  118. @@ -225,7 +225,12 @@ printf 'V4: /\n' >'/etc/exports'
  119.  printf '/nfsdata -network=10.49.202.0 -mask=255.255.255.0  -sec=sys\n' >>'/etc/exports'
  120.  service nfsd start
  121.  
  122. -##### 2. Misc commands:
  123. +##### 2. ms-nfs41-client setup:
  124. +- Normal setup
  125. +- Add groups entry for group "wheel" if neccesary:
  126. +$ printf 'wheel:S-1-0-0:0:\n' >>'/etc/group'
  127. +
  128. +##### 3. Misc commands:
  129.  pw groupadd group -n None -g 197121
  130.  pw groupadd group -n ced -g 197608
  131.  pw useradd -n ced -u 197608 -g None -G None,ced -m -s /bin/sh
  132. --
  133. 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