pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: Patches for Win11 volume flags+misc, 2025-08-02
Posted by Anonymous on Sat 2nd Aug 2025 18:00
raw | new post

  1. From 2aaa05247feca5ba961307c43a6e6bc7186c8cc9 Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Thu, 31 Jul 2025 14:44:36 +0200
  4. Subject: [PATCH 1/3] daemon: Bump
  5.  |FILE_REMOTE_PROTOCOL_INFORMATION.StructureVersion| to |4|
  6.  
  7. Bump |FILE_REMOTE_PROTOCOL_INFORMATION.StructureVersion| to |4| to
  8. avoid issues with software who considers the results as invalid because
  9. |StructureVersion| is less than |4|.
  10.  
  11. Reported-by: Lionel Cons <Lionelcons1972@gmail.com>
  12. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  13. ---
  14. daemon/fileinfoutil.c | 2 +-
  15.  1 file changed, 1 insertion(+), 1 deletion(-)
  16.  
  17. diff --git a/daemon/fileinfoutil.c b/daemon/fileinfoutil.c
  18. index 8af628e..2556c87 100644
  19. --- a/daemon/fileinfoutil.c
  20. +++ b/daemon/fileinfoutil.c
  21. @@ -219,7 +219,7 @@ void nfs_to_remote_protocol_info(
  22.  {
  23.      (void)memset(rpi_out, 0, sizeof(FILE_REMOTE_PROTOCOL_INFORMATION));
  24.  
  25. -    rpi_out->StructureVersion = 1;
  26. +    rpi_out->StructureVersion = 4;
  27.      rpi_out->StructureSize = sizeof(FILE_REMOTE_PROTOCOL_INFORMATION);
  28.      rpi_out->Protocol = WNNC_NET_RDR2SAMPLE; /* FIXME! */
  29.  
  30. --
  31. 2.45.1
  32.  
  33. From 093c537c2f27d99fdce6b119fa49ef112f72e603 Mon Sep 17 00:00:00 2001
  34. From: Roland Mainz <roland.mainz@nrubsig.org>
  35. Date: Sat, 2 Aug 2025 15:47:06 +0200
  36. Subject: [PATCH 2/3] include,tests: Add new Windows 11 volume flags
  37.  
  38. Add new Windows 11 volume flags FILE_SUPPORTS_BYPASS_IO,
  39. FILE_SUPPORTS_STREAM_SNAPSHOTS and FILE_SUPPORTS_CASE_SENSITIVE_DIRS.
  40.  
  41. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  42. ---
  43. include/from_kernel.h        |  3 ++
  44.  tests/winfsinfo1/winfsinfo.c | 66 ++++++++++++++++--------------------
  45.  2 files changed, 33 insertions(+), 36 deletions(-)
  46.  
  47. diff --git a/include/from_kernel.h b/include/from_kernel.h
  48. index 3361aef..b9640a1 100644
  49. --- a/include/from_kernel.h
  50. +++ b/include/from_kernel.h
  51. @@ -483,6 +483,9 @@ typedef enum _FSINFOCLASS {
  52.  #define FILE_SUPPORTS_REMOTE_STORAGE        0x00000100
  53.  #define FILE_RETURNS_CLEANUP_RESULT_INFO    0x00000200
  54.  #define FILE_SUPPORTS_POSIX_UNLINK_RENAME   0x00000400
  55. +#define FILE_SUPPORTS_BYPASS_IO             0x00000800
  56. +#define FILE_SUPPORTS_STREAM_SNAPSHOTS      0x00001000
  57. +#define FILE_SUPPORTS_CASE_SENSITIVE_DIRS   0x00002000
  58.  #define FILE_VOLUME_IS_COMPRESSED           0x00008000
  59.  #define FILE_SUPPORTS_OBJECT_IDS            0x00010000
  60.  #define FILE_SUPPORTS_ENCRYPTION            0x00020000
  61. diff --git a/tests/winfsinfo1/winfsinfo.c b/tests/winfsinfo1/winfsinfo.c
  62. index e6d9f9c..5aa3041 100644
  63. --- a/tests/winfsinfo1/winfsinfo.c
  64. +++ b/tests/winfsinfo1/winfsinfo.c
  65. @@ -163,42 +163,36 @@ int getvolumeinfo(const char *progname, const char *filename)
  66.          volumeFlags &= ~(s); \
  67.      }
  68.  
  69. -    TESTVOLFLAG(FILE_SUPPORTS_USN_JOURNAL);
  70. -    TESTVOLFLAG(FILE_SUPPORTS_OPEN_BY_FILE_ID);
  71. -    TESTVOLFLAG(FILE_SUPPORTS_EXTENDED_ATTRIBUTES);
  72. -    TESTVOLFLAG(FILE_SUPPORTS_HARD_LINKS);
  73. -    TESTVOLFLAG(FILE_SUPPORTS_TRANSACTIONS);
  74. -    TESTVOLFLAG(FILE_SEQUENTIAL_WRITE_ONCE);
  75. -    TESTVOLFLAG(FILE_READ_ONLY_VOLUME);
  76. -    TESTVOLFLAG(FILE_NAMED_STREAMS);
  77. -    TESTVOLFLAG(FILE_SUPPORTS_ENCRYPTION);
  78. -    TESTVOLFLAG(FILE_SUPPORTS_OBJECT_IDS);
  79. -    TESTVOLFLAG(FILE_VOLUME_IS_COMPRESSED);
  80. -    TESTVOLFLAG(FILE_SUPPORTS_REMOTE_STORAGE);
  81. -    TESTVOLFLAG(FILE_RETURNS_CLEANUP_RESULT_INFO);
  82. -    TESTVOLFLAG(FILE_SUPPORTS_POSIX_UNLINK_RENAME);
  83. -    TESTVOLFLAG(FILE_SUPPORTS_REPARSE_POINTS);
  84. -    TESTVOLFLAG(FILE_SUPPORTS_SPARSE_FILES);
  85. -    TESTVOLFLAG(FILE_VOLUME_QUOTAS);
  86. -    TESTVOLFLAG(FILE_FILE_COMPRESSION);
  87. -    TESTVOLFLAG(FILE_PERSISTENT_ACLS);
  88. -    TESTVOLFLAG(FILE_UNICODE_ON_DISK);
  89. -    TESTVOLFLAG(FILE_CASE_PRESERVED_NAMES);
  90. -    TESTVOLFLAG(FILE_CASE_SENSITIVE_SEARCH);
  91. -    TESTVOLFLAG(FILE_SUPPORTS_INTEGRITY_STREAMS);
  92. -#ifdef FILE_SUPPORTS_BLOCK_REFCOUNTING
  93. -    TESTVOLFLAG(FILE_SUPPORTS_BLOCK_REFCOUNTING);
  94. -#endif
  95. -#ifdef FILE_SUPPORTS_SPARSE_VDL
  96. -    TESTVOLFLAG(FILE_SUPPORTS_SPARSE_VDL);
  97. -#endif
  98. -#ifdef FILE_DAX_VOLUME
  99. -    TESTVOLFLAG(FILE_DAX_VOLUME);
  100. -#endif
  101. -#ifdef FILE_SUPPORTS_GHOSTING
  102. -    TESTVOLFLAG(FILE_SUPPORTS_GHOSTING);
  103. -#endif
  104. -
  105. +    TESTVOLFLAG(FILE_CASE_SENSITIVE_SEARCH)
  106. +    TESTVOLFLAG(FILE_CASE_PRESERVED_NAMES)
  107. +    TESTVOLFLAG(FILE_UNICODE_ON_DISK)
  108. +    TESTVOLFLAG(FILE_PERSISTENT_ACLS)
  109. +    TESTVOLFLAG(FILE_FILE_COMPRESSION)
  110. +    TESTVOLFLAG(FILE_VOLUME_QUOTAS)
  111. +    TESTVOLFLAG(FILE_SUPPORTS_SPARSE_FILES)
  112. +    TESTVOLFLAG(FILE_SUPPORTS_REPARSE_POINTS)
  113. +    TESTVOLFLAG(FILE_SUPPORTS_REMOTE_STORAGE)
  114. +    TESTVOLFLAG(FILE_RETURNS_CLEANUP_RESULT_INFO)
  115. +    TESTVOLFLAG(FILE_SUPPORTS_POSIX_UNLINK_RENAME)
  116. +    TESTVOLFLAG(FILE_SUPPORTS_BYPASS_IO)
  117. +    TESTVOLFLAG(FILE_SUPPORTS_STREAM_SNAPSHOTS)
  118. +    TESTVOLFLAG(FILE_SUPPORTS_CASE_SENSITIVE_DIRS)
  119. +    TESTVOLFLAG(FILE_VOLUME_IS_COMPRESSED)
  120. +    TESTVOLFLAG(FILE_SUPPORTS_OBJECT_IDS)
  121. +    TESTVOLFLAG(FILE_SUPPORTS_ENCRYPTION)
  122. +    TESTVOLFLAG(FILE_NAMED_STREAMS)
  123. +    TESTVOLFLAG(FILE_READ_ONLY_VOLUME)
  124. +    TESTVOLFLAG(FILE_SEQUENTIAL_WRITE_ONCE)
  125. +    TESTVOLFLAG(FILE_SUPPORTS_TRANSACTIONS)
  126. +    TESTVOLFLAG(FILE_SUPPORTS_HARD_LINKS)
  127. +    TESTVOLFLAG(FILE_SUPPORTS_EXTENDED_ATTRIBUTES)
  128. +    TESTVOLFLAG(FILE_SUPPORTS_OPEN_BY_FILE_ID)
  129. +    TESTVOLFLAG(FILE_SUPPORTS_USN_JOURNAL)
  130. +    TESTVOLFLAG(FILE_SUPPORTS_INTEGRITY_STREAMS)
  131. +    TESTVOLFLAG(FILE_SUPPORTS_BLOCK_REFCOUNTING)
  132. +    TESTVOLFLAG(FILE_SUPPORTS_SPARSE_VDL)
  133. +    TESTVOLFLAG(FILE_DAX_VOLUME)
  134. +    TESTVOLFLAG(FILE_SUPPORTS_GHOSTING)
  135.  
  136.      /*
  137.       * print any leftover flags not covered by |TESTVOLFLAG(FILE_*)|
  138. --
  139. 2.45.1
  140.  
  141. From f4f4661050003d0f8596ff7aebe6e6ceb94e655e Mon Sep 17 00:00:00 2001
  142. From: Roland Mainz <roland.mainz@nrubsig.org>
  143. Date: Sat, 2 Aug 2025 18:11:13 +0200
  144. Subject: [PATCH 3/3] daemon: Set volume flag
  145.  |FILE_SUPPORTS_CASE_SENSITIVE_DIRS| for |FileCaseSensitiveInformation|
  146.  
  147. Set volume flag |FILE_SUPPORTS_CASE_SENSITIVE_DIRS| to announce
  148. |FileCaseSensitiveInformation| support.
  149.  
  150. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  151. ---
  152. daemon/nfs41_superblock.c | 3 +++
  153.  1 file changed, 3 insertions(+)
  154.  
  155. diff --git a/daemon/nfs41_superblock.c b/daemon/nfs41_superblock.c
  156. index 977a4c1..eb8a938 100644
  157. --- a/daemon/nfs41_superblock.c
  158. +++ b/daemon/nfs41_superblock.c
  159. @@ -195,6 +195,9 @@ void nfs41_superblock_fs_attributes(
  160.      /* NFSv4 protocol uses Unicode by default */
  161.      FsAttrs->FileSystemAttributes |= FILE_UNICODE_ON_DISK;
  162.  
  163. +    /* We support |FileCaseSensitiveInformation| to query each dir */
  164. +    FsAttrs->FileSystemAttributes |= FILE_SUPPORTS_CASE_SENSITIVE_DIRS;
  165. +
  166.      if (superblock->link_support)
  167.          FsAttrs->FileSystemAttributes |= FILE_SUPPORTS_HARD_LINKS;
  168.      if (superblock->symlink_support)
  169. --
  170. 2.45.1

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