- From 47e99cdd2a4f4deeeab7690c8e65ec719ffc3864 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Mon, 17 Mar 2025 16:32:45 +0100
- Subject: [PATCH] cygwin,sys,tests: RDBSS needs to be aware that file size+file
- times are cached
- RDBSS needs to be aware that file size+file times are cached.
- Otherwise programs which use sqlite&co like subversion can fail, e.g.
- $ svn checkout https://svn.FreeBSD.org/base/head/share/man # failed
- with "sqlite[S11]: database disk image is malformed".
- Fixes: https://sourceforge.net/p/ms-nfs41-client/mailman/message/58722706/
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/README.bintarball.txt | 33 ---------------------------------
- sys/nfs41sys_openclose.c | 5 +++++
- tests/manual_testing.txt | 34 ----------------------------------
- 3 files changed, 5 insertions(+), 67 deletions(-)
- diff --git a/cygwin/README.bintarball.txt b/cygwin/README.bintarball.txt
- index 407576a..6a5c025 100644
- --- a/cygwin/README.bintarball.txt
- +++ b/cygwin/README.bintarball.txt
- @@ -597,39 +597,6 @@ $ mount -t drvfs '\0.49.202.230@2049\nfs4\bigdisk' /mnt/bigdisk
- - Win10/32bit-only: $ net use H: /delete # does not work,
- use $ nfs_umount 'H' instead #
- -- Bug: Subversion checkout can fail with
- - "sqlite[S11]: database disk image is malformed" like this:
- - # ---- snip ----
- - $ svn --version
- - svn, version 1.14.2 (r1899510)
- - compiled May 20 2023, 11:51:30 on x86_64-pc-cygwin
- - $ svn checkout https://svn.FreeBSD.org/base/head/share/man
- - A man/man4
- - A man/man4/tcp.4
- - A man/man4/ndis.4
- - A man/man4/Makefile
- - A man/man4/altq.4
- - A man/man4/miibus.4
- - A man/man4/vlan.4
- - A man/man4/ng_macfilter.4
- - A man/man4/mn.4
- - A man/man4/ossl.4
- - A man/man4/ktls.4
- - A man/man4/ftwd.4
- - A man/man4/inet6.4
- - A man/man4/crypto.4
- - A man/man4/rtsx.4
- - A man/man4/isp.4
- - svn: E200030: sqlite[S11]: database disk image is malformed
- - svn: E200042: Additional errors:
- - svn: E200030: sqlite[S11]: database disk image is malformed
- - svn: E200030: sqlite[S11]: database disk image is malformed
- - svn: E200030: sqlite[S11]: database disk image is malformed
- - # ---- snip ----
- - Workaround is to mount the NFS filesystem with the "writethru"
- - option, e.g.
- - $ /sbin/nfs_mount -o rw,writethru 'j' derfwpc5131:/export/home/rmainz #
- -
- - Windows event log can list errors like "MUP 0xc0000222"
- (|STATUS_LOST_WRITEBEHIND_DATA|) in case the disk on the NFSv4 server
- is full and outstanding writes from a memory-mapped file fail.
- diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
- index 4d61e42..54ac9cb 100644
- --- a/sys/nfs41sys_openclose.c
- +++ b/sys/nfs41sys_openclose.c
- @@ -926,6 +926,11 @@ retry_on_link:
- DbgP("nfs41_Create: received delegation %d\n", entry->u.Open.deleg_type);
- #endif
- + /* We always cache file size and file times locally */
- + SrvOpen->BufferingFlags |=
- + FCB_STATE_FILESIZECACHEING_ENABLED |
- + FCB_STATE_FILETIMECACHEING_ENABLED;
- +
- /*
- * We cannot have a file cached on a write-only handle,
- * so we have to set |SRVOPEN_FLAG_DONTUSE_WRITE_CACHING|
- diff --git a/tests/manual_testing.txt b/tests/manual_testing.txt
- index 0bf5029..09ef4a6 100644
- --- a/tests/manual_testing.txt
- +++ b/tests/manual_testing.txt
- @@ -496,40 +496,6 @@ chmod a+rx setup-x86_64.exe
- #
- # Subversion checkout:
- #
- -# Currently fails like this:
- -# ---- snip ----
- -# $ svn --version
- -# svn, version 1.14.2 (r1899510)
- -# compiled May 20 2023, 11:51:30 on x86_64-pc-cygwin
- -#
- -# $ svn checkout https://svn.FreeBSD.org/base/head/share/man
- -# A man/man4
- -# A man/man4/tcp.4
- -# A man/man4/ndis.4
- -# A man/man4/Makefile
- -# A man/man4/altq.4
- -# A man/man4/miibus.4
- -# A man/man4/vlan.4
- -# A man/man4/ng_macfilter.4
- -# A man/man4/mn.4
- -# A man/man4/ossl.4
- -# A man/man4/ktls.4
- -# A man/man4/ftwd.4
- -# A man/man4/inet6.4
- -# A man/man4/crypto.4
- -# A man/man4/rtsx.4
- -# A man/man4/isp.4
- -# svn: E200030: sqlite[S11]: database disk image is malformed
- -# svn: E200042: Additional errors:
- -# svn: E200030: sqlite[S11]: database disk image is malformed
- -# svn: E200030: sqlite[S11]: database disk image is malformed
- -# svn: E200030: sqlite[S11]: database disk image is malformed
- -# ---- snip ----
- -#
- -# Workaround is to mount the NFS filesystem with the "writethru"
- -# option, e.g.
- -# $ /sbin/nfs_mount -o rw,writethru 'j' derfwpc5131:/export/home/rmainz #
- -#
- # Test:
- svn checkout https://svn.FreeBSD.org/base/head/share/man
- --
- 2.45.1
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
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.