pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: Patch to set file size+file timestamps caching flags for RDBSS, 2025-03-17
Posted by Anonymous on Mon 17th Mar 2025 17:07
raw | new post

  1. From 47e99cdd2a4f4deeeab7690c8e65ec719ffc3864 Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Mon, 17 Mar 2025 16:32:45 +0100
  4. Subject: [PATCH] cygwin,sys,tests: RDBSS needs to be aware that file size+file
  5.  times are cached
  6.  
  7. RDBSS needs to be aware that file size+file times are cached.
  8.  
  9. Otherwise programs which use sqlite&co like subversion can fail, e.g.
  10. $ svn checkout https://svn.FreeBSD.org/base/head/share/man # failed
  11. with "sqlite[S11]: database disk image is malformed".
  12.  
  13. Fixes: https://sourceforge.net/p/ms-nfs41-client/mailman/message/58722706/
  14. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  15. ---
  16. cygwin/README.bintarball.txt | 33 ---------------------------------
  17.  sys/nfs41sys_openclose.c     |  5 +++++
  18.  tests/manual_testing.txt     | 34 ----------------------------------
  19.  3 files changed, 5 insertions(+), 67 deletions(-)
  20.  
  21. diff --git a/cygwin/README.bintarball.txt b/cygwin/README.bintarball.txt
  22. index 407576a..6a5c025 100644
  23. --- a/cygwin/README.bintarball.txt
  24. +++ b/cygwin/README.bintarball.txt
  25. @@ -597,39 +597,6 @@ $ mount -t drvfs '\0.49.202.230@2049\nfs4\bigdisk' /mnt/bigdisk
  26.  - Win10/32bit-only: $ net use H: /delete # does not work,
  27.    use $ nfs_umount 'H' instead #
  28.  
  29. -- Bug: Subversion checkout can fail with
  30. -  "sqlite[S11]: database disk image is malformed" like this:
  31. -  # ---- snip ----
  32. -  $ svn --version
  33. -  svn, version 1.14.2 (r1899510)
  34. -    compiled May 20 2023, 11:51:30 on x86_64-pc-cygwin
  35. -  $ svn checkout https://svn.FreeBSD.org/base/head/share/man
  36. -  A    man/man4
  37. -  A    man/man4/tcp.4
  38. -  A    man/man4/ndis.4
  39. -  A    man/man4/Makefile
  40. -  A    man/man4/altq.4
  41. -  A    man/man4/miibus.4
  42. -  A    man/man4/vlan.4
  43. -  A    man/man4/ng_macfilter.4
  44. -  A    man/man4/mn.4
  45. -  A    man/man4/ossl.4
  46. -  A    man/man4/ktls.4
  47. -  A    man/man4/ftwd.4
  48. -  A    man/man4/inet6.4
  49. -  A    man/man4/crypto.4
  50. -  A    man/man4/rtsx.4
  51. -  A    man/man4/isp.4
  52. -  svn: E200030: sqlite[S11]: database disk image is malformed
  53. -  svn: E200042: Additional errors:
  54. -  svn: E200030: sqlite[S11]: database disk image is malformed
  55. -  svn: E200030: sqlite[S11]: database disk image is malformed
  56. -  svn: E200030: sqlite[S11]: database disk image is malformed
  57. -  # ---- snip ----
  58. -  Workaround is to mount the NFS filesystem with the "writethru"
  59. -  option, e.g.
  60. -  $ /sbin/nfs_mount -o rw,writethru 'j' derfwpc5131:/export/home/rmainz #
  61. -
  62.  - Windows event log can list errors like "MUP 0xc0000222"
  63.    (|STATUS_LOST_WRITEBEHIND_DATA|) in case the disk on the NFSv4 server
  64.    is full and outstanding writes from a memory-mapped file fail.
  65. diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
  66. index 4d61e42..54ac9cb 100644
  67. --- a/sys/nfs41sys_openclose.c
  68. +++ b/sys/nfs41sys_openclose.c
  69. @@ -926,6 +926,11 @@ retry_on_link:
  70.          DbgP("nfs41_Create: received delegation %d\n", entry->u.Open.deleg_type);
  71.  #endif
  72.  
  73. +        /* We always cache file size and file times locally */
  74. +        SrvOpen->BufferingFlags |=
  75. +            FCB_STATE_FILESIZECACHEING_ENABLED |
  76. +            FCB_STATE_FILETIMECACHEING_ENABLED;
  77. +
  78.          /*
  79.           * We cannot have a file cached on a write-only handle,
  80.           * so we have to set |SRVOPEN_FLAG_DONTUSE_WRITE_CACHING|
  81. diff --git a/tests/manual_testing.txt b/tests/manual_testing.txt
  82. index 0bf5029..09ef4a6 100644
  83. --- a/tests/manual_testing.txt
  84. +++ b/tests/manual_testing.txt
  85. @@ -496,40 +496,6 @@ chmod a+rx setup-x86_64.exe
  86.  #
  87.  # Subversion checkout:
  88.  #
  89. -# Currently fails like this:
  90. -# ---- snip ----
  91. -# $ svn --version
  92. -# svn, version 1.14.2 (r1899510)
  93. -#   compiled May 20 2023, 11:51:30 on x86_64-pc-cygwin
  94. -#
  95. -# $ svn checkout https://svn.FreeBSD.org/base/head/share/man
  96. -# A    man/man4
  97. -# A    man/man4/tcp.4
  98. -# A    man/man4/ndis.4
  99. -# A    man/man4/Makefile
  100. -# A    man/man4/altq.4
  101. -# A    man/man4/miibus.4
  102. -# A    man/man4/vlan.4
  103. -# A    man/man4/ng_macfilter.4
  104. -# A    man/man4/mn.4
  105. -# A    man/man4/ossl.4
  106. -# A    man/man4/ktls.4
  107. -# A    man/man4/ftwd.4
  108. -# A    man/man4/inet6.4
  109. -# A    man/man4/crypto.4
  110. -# A    man/man4/rtsx.4
  111. -# A    man/man4/isp.4
  112. -# svn: E200030: sqlite[S11]: database disk image is malformed
  113. -# svn: E200042: Additional errors:
  114. -# svn: E200030: sqlite[S11]: database disk image is malformed
  115. -# svn: E200030: sqlite[S11]: database disk image is malformed
  116. -# svn: E200030: sqlite[S11]: database disk image is malformed
  117. -# ---- snip ----
  118. -#
  119. -# Workaround is to mount the NFS filesystem with the "writethru"
  120. -# option, e.g.
  121. -# $ /sbin/nfs_mount -o rw,writethru 'j' derfwpc5131:/export/home/rmainz #
  122. -#
  123.  # Test:
  124.  svn checkout https://svn.FreeBSD.org/base/head/share/man
  125.  
  126. --
  127. 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