pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: Patches for using same datatypes in kernel+userrland, MariaDB setup&test update, 2025-07-24
Posted by Anonymous on Thu 24th Jul 2025 19:28
raw | new post

  1. From 884621976c80c636b94c535963be9c344b032b42 Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Thu, 24 Jul 2025 20:04:57 +0200
  4. Subject: [PATCH 1/2] daemon,include: Userland daemon should use the same
  5.  datatypes as kernel for communication
  6.  
  7. Userland daemon should use exactly the same datatypes as the kernel for
  8. communication (marshalling/unmarshalling).
  9.  
  10. Reported-by: Dan Shelton <dan.f.shelton@gmail.com>
  11. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  12. ---
  13. daemon/fileinfoutil.c |  4 ++--
  14.  daemon/fileinfoutil.h |  4 ++--
  15.  daemon/setattr.c      |  4 ++--
  16.  daemon/upcall.h       | 10 ++++-----
  17.  include/from_kernel.h | 48 +++++++++++++++++++++++++++++++++++++++++++
  18.  5 files changed, 59 insertions(+), 11 deletions(-)
  19.  
  20. diff --git a/daemon/fileinfoutil.c b/daemon/fileinfoutil.c
  21. index 540994c..8af628e 100644
  22. --- a/daemon/fileinfoutil.c
  23. +++ b/daemon/fileinfoutil.c
  24. @@ -97,7 +97,7 @@ void nfs_to_basic_info(
  25.      IN const char *restrict name,
  26.      IN const nfs41_superblock *restrict superblock,
  27.      IN const nfs41_file_info *restrict info,
  28. -    OUT PFILE_BASIC_INFO basic_out)
  29. +    OUT PFILE_BASIC_INFORMATION basic_out)
  30.  {
  31.      EASSERT(info->attrmask.count > 0);
  32.  
  33. @@ -145,7 +145,7 @@ void nfs_to_basic_info(
  34.  void nfs_to_standard_info(
  35.      IN const nfs41_superblock *restrict superblock,
  36.      IN const nfs41_file_info *restrict info,
  37. -    OUT PFILE_STANDARD_INFO restrict std_out)
  38. +    OUT PFILE_STANDARD_INFORMATION restrict std_out)
  39.  {
  40.      const ULONG FileAttributes =
  41.          nfs_file_info_to_attributes(superblock, info);
  42. diff --git a/daemon/fileinfoutil.h b/daemon/fileinfoutil.h
  43. index 63b8117..2fce2d6 100644
  44. --- a/daemon/fileinfoutil.h
  45. +++ b/daemon/fileinfoutil.h
  46. @@ -42,11 +42,11 @@ void nfs_to_basic_info(
  47.      IN const char *restrict name,
  48.      IN const nfs41_superblock *restrict superblock,
  49.      IN const nfs41_file_info *restrict info,
  50. -    OUT PFILE_BASIC_INFO restrict basic_out);
  51. +    OUT PFILE_BASIC_INFORMATION restrict basic_out);
  52.  void nfs_to_standard_info(
  53.      IN const nfs41_superblock *restrict superblock,
  54.      IN const nfs41_file_info *restrict info,
  55. -    OUT PFILE_STANDARD_INFO restrict std_out);
  56. +    OUT PFILE_STANDARD_INFORMATION restrict std_out);
  57.  void nfs_to_network_openinfo(
  58.      IN const char *restrict name,
  59.      IN const nfs41_superblock *restrict superblock,
  60. diff --git a/daemon/setattr.c b/daemon/setattr.c
  61. index ab124c8..8ffdd90 100644
  62. --- a/daemon/setattr.c
  63. +++ b/daemon/setattr.c
  64. @@ -66,7 +66,7 @@ out:
  65.  
  66.  static int handle_nfs41_setattr_basicinfo(void *daemon_context, setattr_upcall_args *args)
  67.  {
  68. -    PFILE_BASIC_INFO basic_info = (PFILE_BASIC_INFO)args->buf;
  69. +    PFILE_BASIC_INFORMATION basic_info = (PFILE_BASIC_INFORMATION)args->buf;
  70.      nfs41_open_state *state = args->state;
  71.      nfs41_superblock *superblock = state->file.fh.superblock;
  72.      stateid_arg stateid;
  73. @@ -301,7 +301,7 @@ static int handle_nfs41_rename(void *daemon_context, setattr_upcall_args *args)
  74.  {
  75.      nfs41_open_state *state = args->state;
  76.      nfs41_session *dst_session;
  77. -    PFILE_RENAME_INFO rename = (PFILE_RENAME_INFO)args->buf;
  78. +    PFILE_RENAME_INFORMATION rename = (PFILE_RENAME_INFORMATION)args->buf;
  79.      nfs41_abs_path dst_path = { 0 };
  80.      nfs41_path_fh dst_dir, dst;
  81.      nfs41_component dst_name, *src_name;
  82. diff --git a/daemon/upcall.h b/daemon/upcall.h
  83. index 10a1aa5..bbbecf7 100644
  84. --- a/daemon/upcall.h
  85. +++ b/daemon/upcall.h
  86. @@ -46,8 +46,8 @@ typedef struct __mount_upcall_args {
  87.  
  88.  typedef struct __open_upcall_args {
  89.      nfs41_abs_path symlink;
  90. -    FILE_BASIC_INFO basic_info;
  91. -    FILE_STANDARD_INFO std_info;
  92. +    FILE_BASIC_INFORMATION basic_info;
  93. +    FILE_STANDARD_INFORMATION std_info;
  94.      ULONGLONG fileid;
  95.      ULONGLONG fsid_major, fsid_minor;
  96.      const char *path;
  97. @@ -101,9 +101,9 @@ typedef struct __unlock_upcall_args {
  98.  } unlock_upcall_args;
  99.  
  100.  typedef struct __getattr_upcall_args {
  101. -    FILE_BASIC_INFO basic_info;
  102. -    FILE_STANDARD_INFO std_info;
  103. -    FILE_ATTRIBUTE_TAG_INFO tag_info;
  104. +    FILE_BASIC_INFORMATION basic_info;
  105. +    FILE_STANDARD_INFORMATION std_info;
  106. +    FILE_ATTRIBUTE_TAG_INFORMATION tag_info;
  107.      FILE_INTERNAL_INFORMATION intr_info;
  108.      FILE_NETWORK_OPEN_INFORMATION network_info;
  109.      FILE_REMOTE_PROTOCOL_INFORMATION remote_protocol_info;
  110. diff --git a/include/from_kernel.h b/include/from_kernel.h
  111. index 7a305bc..4ced877 100644
  112. --- a/include/from_kernel.h
  113. +++ b/include/from_kernel.h
  114. @@ -144,6 +144,54 @@ typedef enum _FILE_INFORMATION_CLASS {
  115.      FileMaximumInformation
  116.  } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
  117.  
  118. +/* FileBasicInformation==4 */
  119. +typedef struct _FILE_BASIC_INFORMATION {
  120. +    LARGE_INTEGER CreationTime;
  121. +    LARGE_INTEGER LastAccessTime;
  122. +    LARGE_INTEGER LastWriteTime;
  123. +    LARGE_INTEGER ChangeTime;
  124. +    ULONG FileAttributes;
  125. +} FILE_BASIC_INFORMATION, *PFILE_BASIC_INFORMATION;
  126. +
  127. +/* FileStandardInformation==5 */
  128. +typedef struct _FILE_STANDARD_INFORMATION {
  129. +    LARGE_INTEGER AllocationSize;
  130. +    LARGE_INTEGER EndOfFile;
  131. +    ULONG NumberOfLinks;
  132. +    BOOLEAN DeletePending;
  133. +    BOOLEAN Directory;
  134. +} FILE_STANDARD_INFORMATION, *PFILE_STANDARD_INFORMATION;
  135. +
  136. +typedef struct _FILE_STANDARD_INFORMATION_EX {
  137. +    LARGE_INTEGER AllocationSize;
  138. +    LARGE_INTEGER EndOfFile;
  139. +    ULONG NumberOfLinks;
  140. +    BOOLEAN DeletePending;
  141. +    BOOLEAN Directory;
  142. +    BOOLEAN AlternateStream;
  143. +    BOOLEAN MetadataAttribute;
  144. +} FILE_STANDARD_INFORMATION_EX, *PFILE_STANDARD_INFORMATION_EX;
  145. +
  146. +/* FileRenameInformation==10 */
  147. +typedef struct _FILE_RENAME_INFORMATION {
  148. +#pragma warning( push )
  149. +/* Disable warning C4201 ("nonstandard extension used: nameless struct/union") */
  150. +#pragma warning (disable : 4201)
  151. +    union {
  152. +        BOOLEAN ReplaceIfExists;  /* class==FileRenameInformation */
  153. +        ULONG Flags;              /* class==FileRenameInformationEx */
  154. +    };
  155. +#pragma warning( pop )
  156. +    HANDLE RootDirectory;
  157. +    ULONG FileNameLength;
  158. +    WCHAR FileName[1];
  159. +} FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
  160. +
  161. +/* FileAttributeTagInformation==35 */
  162. +typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION {
  163. +    ULONG FileAttributes;
  164. +    ULONG ReparseTag;
  165. +} FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION;
  166.  
  167.  /* kernel structures for QueryDirectory results */
  168.  typedef struct _FILE_NAMES_INFORMATION {
  169. --
  170. 2.45.1
  171.  
  172. From 543c7e5831dc475eeb90fc19baf29a1accc2a26d Mon Sep 17 00:00:00 2001
  173. From: Roland Mainz <roland.mainz@nrubsig.org>
  174. Date: Thu, 24 Jul 2025 20:22:10 +0200
  175. Subject: [PATCH 2/2] tests: Minor update on MariaDB setup&test instructions
  176.  
  177. Minor update on MariaDB setup&test instructions
  178.  
  179. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  180. ---
  181. tests/manual_testing.txt | 9 ++++++++-
  182.  1 file changed, 8 insertions(+), 1 deletion(-)
  183.  
  184. diff --git a/tests/manual_testing.txt b/tests/manual_testing.txt
  185. index a4a3364..c57160b 100644
  186. --- a/tests/manual_testing.txt
  187. +++ b/tests/manual_testing.txt
  188. @@ -1,5 +1,5 @@
  189.  #
  190. -# ms-nfs41-client manual testing sequence, 2025-06-14
  191. +# ms-nfs41-client manual testing sequence, 2025-07-23
  192.  #
  193.  # Draft version, needs to be turned into automated tests
  194.  # if possible
  195. @@ -850,6 +850,7 @@ CREATE DATABASE alphabet_test4;
  196.  USE alphabet_test4;
  197.  
  198.  # create table using InnoDB with PAGE_COMPRESSED=1 (which will use punch hole to free space)
  199. +# see https://dev.mysql.com/doc/refman/8.4/en/innodb-page-compression.html
  200.  CREATE TABLE file_data (
  201.      line_number INT PRIMARY KEY,
  202.      line_text TEXT
  203. @@ -881,5 +882,11 @@ time ksh93 -c 'for ((i=0 ; i < 10 ; i++ )) ; do cat /usr/share/doc/mingw64-x86_6
  204.  3. Check whether the database file now has holes:
  205.  $ lssparse -H /cygdrive/n/mariadbtest/alphabet_test4/file_data.ibd
  206.  
  207. +#### Notes:
  208. +- MariaDB runs in a Windows "NT Service" account ("NT SERVICE\MariaDB"), which neither Cygwin
  209. +  $ /usrbin/getent passwd # nor $ net localusers # will list
  210. +- Thanks to MariaDB's Kristian Nielsen <knielsen@knielsen-hq.org> for helping with this
  211. +
  212. +
  213.  #
  214.  # EOF.
  215. --
  216. 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