- 14 Jun, 2023 2 commits
-
-
Kirill Smelkov authored
Notable patches: - 265a3926 "fuse: Increase MAX_KERNEL_WRITE to 1 MiB & enable CAP_MAX_PAGES" this should affect WCFS performance significantly because previously data was read from WCFS server in 128KB chunks and now it could be read in 2MB. For the reference: WCFS was setting MaxWrite=2MB from the beginning, and previously it was capped to 128KB by go-fuse. Now with go-fuse upgrade we should hopefully automatically get increase in performance. - 90b055af "fusermount: Fix option escaping" Levin's patch to allow ',' to be present in fsname, so that we can mount neo:// with multiple masters. See nexedi/wendelin.core!15 for context and details. * master: (45 commits) fs: kill subprocess before tearing down test fuse/test: Fix TestFopenKeepCache, take 2 fs: simplify TestReadDirStress fuse: tweak Unmount doc comment .github: add Go 1.20 fuse/mount_linux_test/DirectMount: Verify FsName \w comma/backslash works fusermount: Fix option escaping fuse: fix debug print for FsyncDir fuse: print GETATTR flags in input fs: document FileHandle argument for Getattr README.md: tweak & polish Drop "// " from LICENSE fs: fix NodeLookuper documentation .github: set user_allow_other in /etc/fuse.conf .github: drop Go 1.13 / 1.15, add Go 1.18/1.19 fuse: MountDirect: always pass max_read tests: TestDirectMount: better coverage, clearer output fs: document Readdir determinism requirement fs: fold duplicate fuse.Context{} instantiations newunionfs: make readdir deterministic ...
-
Kirill Smelkov authored
Darwin build was failing: $ ./all.bash + go build ./... + GOOS=darwin + go build ./fuse/... ./fs/... ./example/loopback/... # github.com/hanwen/go-fuse/fuse/nodefs fuse/nodefs/files.go:99:9: cannot use &loopbackFile{…} (value of type *loopbackFile) as File value in return statement: *loopbackFile does not implement File (wrong type for method Allocate) have Allocate(uint64, uint64, uint32) fuse.Status want Allocate(uint64, uint64, uint32, *fuse.Context) (fuse.Status) fuse/nodefs/files_darwin.go:87:22: not enough arguments in call to f.GetAttr have (*fuse.Attr) want (*fuse.Attr, *fuse.Context)
-
- 12 Jun, 2023 1 commit
-
-
Han-Wen Nienhuys authored
Change-Id: Ie0208ec43f50910201b8ff97f639ad55fbd319a3
-
- 11 Jun, 2023 1 commit
-
-
Kirill Smelkov authored
In 2019 TestOpenKeepCache was first disabled in ce2558b4 (fuse/test: disable TestFopenKeepCache) and then reenabled in 904ef0cc (fuse/test: Fix TestFopenKeepCache). The latter patch hoped to fix this test - by disabling CAP_AUTO_INVAL_DATA via ExplicitDataCacheControl. This should stop kernel from dropping data cache on mtime change; - by using the same size for before and after states. This avoid hitting cache being dropped when kernel sees file size being changed. In other words it took actions so that the data cache is not unexpectedly dropped by the kernel and the test does not fail with seeing different content after file reopen. However the test also wants to verify that updated data can be seen after cache invalidation and here it was not exactly correct: the test requested full control over the data cache via ExplicitDataCacheControl mount option, but was explicitly invalidating only file attributes via pathfs.EntryNotify _without_ invalidating the data cache. This way the test was actually working before Linux 5.2, because those older kernels never negotiate CAP_EXPLICIT_INVAL_DATA(*), but starting from Linux 5.2 CAP_EXPLICIT_INVAL_DATA started to be negotiated, and so the kernel was dropping only metadata without invalidating data cache on EntryNotify. This started to lead to the following test failures: --- FAIL: TestFopenKeepCache (0.13s) cache_test.go:153: ReadFile: got "before" after notify, want "afterX" @hanwen explains in https://github.com/hanwen/go-fuse/issues/473#issuecomment-1585617107 It tries to invalidate the file content by issuing an ENTRY_NOTIFY. This leads to different mtime returned, but in the init phase, we don´t return AUTO_INVAL_DATA, because setupCacheTest explicitly disables it. === RUN TestFopenKeepCache 12:47:49.958227 callFusermount: executing ["/usr/bin/fusermount3" "/tmp/TestFopenKeepCache1094589261/001/mnt" "-o" "subtype=pathfs.pathInode,max_read=131072"] 12:47:49.967664 rx 2: INIT n0 {7.38 Ra 131072 FLOCK_LOCKS,IOCTL_DIR,READDIRPLUS,READDIRPLUS_AUTO,PARALLEL_DIROPS,HANDLE_KILLPRIV,ASYNC_READ,BIG_WRITES,SPLICE_WRITE,SPLICE_MOVE,WRITEBACK_CACHE,NO_OPEN_SUPPORT,POSIX_ACL,POSIX_LOCKS,EXPORT_SUPPORT,AUTO_INVAL_DATA,ASYNC_DIO,MAX_PAGES,CACHE_SYMLINKS,NO_OPENDIR_SUPPORT,DONT_MASK,SPLICE_READ,ABORT_ERROR,EXPLICIT_INVAL_DATA,ATOMIC_O_TRUNC,0x70000000} "\a\x00\x00\x00\x00\x00\x00\x00"... 48b 12:47:49.967708 tx 2: OK, {7.28 Ra 131072 BIG_WRITES,NO_OPEN_SUPPORT,MAX_PAGES,EXPLICIT_INVAL_DATA,ASYNC_READ,READDIRPLUS,PARALLEL_DIROPS 0/0 Wr 131072 Tg 0 MaxPages 32} -> Let's fix this. As explained in 904ef0cc we do not want to reenable AUTO_INVAL_DATA because then the kernel will start dropping data cache on mtime change and the test will start to fail in its first part - where we want to assert that the data stays the same until data cache is invalidated. So let's change EntryNotify to FileNotify to explicitly invalidate data cache when we want the file to read with new data. Hopefully fixes: https://github.com/hanwen/go-fuse/issues/473 (*) see git.kernel.org/linus/ad2ba64dd489 and github.com/hanwen/go-fuse/pull/273 Change-Id: I4ff0f2bef61f0217601eee6d272f7e5563b272d2
-
- 09 Jun, 2023 2 commits
-
-
Han-Wen Nienhuys authored
Change-Id: I609fbb036913148e77f4350ec8d816373fe13d09
-
Han-Wen Nienhuys authored
Change-Id: I7e9b530906c233f7fcdac434984b9051acb7dbb9
-
- 08 Jun, 2023 2 commits
-
-
Kirill Smelkov authored
Go 1.20 was released in February - 4 months ago: https://go.dev/doc/devel/release Change-Id: Id24b29f3f7009d34b3ec082adf623dfc41431876
-
Levin Zimmermann authored
In https://github.com/hanwen/go-fuse/commit/90b055af4668fce08c961406c32c15bbd7953fe4 we adjusted go-fuse to support fusermount string options with commas and backslash. But https://github.com/hanwen/go-fuse/commit/90b055af4668fce08c961406c32c15bbd7953fe4 only verified that commas and backslashs work with fusermount and missed checking if they also work when using 'DirectMount'. Initially this may not look problematic, because the option string escaping with backslashs is only applied when mounting with fusermount and isn't applied when directly mounting [1]. But https://github.com/hanwen/go-fuse/commit/90b055af4668fce08c961406c32c15bbd7953fe4 also dropped an explicit check for commas [2] which would have been applied independently from whether 'DirectMount' is set or not. In other words, the previous patch changed go-fuse to allow commas and backslashs in option strings for 'DirectMount' or fusermount, but missed checking if commas/backslashs actually works with 'DirectMount'. This patch therefore amends 'TestDirectMount' to ensure commas and backslashs work in the 'fsname' option when 'DirectMount' is used. [1] https://github.com/hanwen/go-fuse/blob/90b055a/fuse/mount_linux.go#L107 [2] https://github.com/hanwen/go-fuse/blob/854d591/fuse/server.go#L188-L192 Change-Id: I78c612c55fb08be66713cd5234a8ffd468dd1349
-
- 07 Jun, 2023 1 commit
-
-
Levin Zimmermann authored
Before this patch no commas were allowed in any fusermount option string. But it is in fact possible to use commas in fusermount options: we only need to escape them [1]. Now go-fuse users can use commas in fusermount options. Related libfuse commits are [1] and [2]. This patch also adds a test which ensures neither go-fuse nor fusermount crash if we pass options with commas. --- [1] https://github.com/libfuse/libfuse/commit/555d6b504308eac6b976321ce938ee4bec62c354 [2] https://github.com/libfuse/libfuse/commit/5c094ac0150ebfef6a2c9c2c9d1c545a90ff4e96 Change-Id: Iadf8283e630dc1fb884d047d8765eeaaca90eabd
-
- 25 May, 2023 1 commit
-
-
Han-Wen Nienhuys authored
Change-Id: I2aacf5775033dae03772d87b4a5c3f15bd961aff
-
- 18 May, 2023 2 commits
-
-
Han-Wen Nienhuys authored
Change-Id: Idf8f8f08849b279f1c8a346112d43e0eb44f9810
-
Han-Wen Nienhuys authored
Change-Id: I48236bf879939537944e617baa620884e7601055
-
- 26 Apr, 2023 1 commit
-
-
Han-Wen Nienhuys authored
Change-Id: Ide68c48ffc2b8343884639835b958bf404739dbc
-
- 23 Apr, 2023 2 commits
-
-
Han-Wen Nienhuys authored
Change-Id: Ib86b9b98ce62783992ed233fe809f3552dc7bd99
-
Han-Wen Nienhuys authored
A spurious blank line dropped the entire doc string. Set Size in the Lookup example Change-Id: Idefd113f7749e8aadfc4730e38b7444f36c0e419
-
- 21 Apr, 2023 2 commits
-
-
Jakob Unterwurzacher authored
Fixes this test failure: 2023/04/13 20:25:20 callFusermount: executing ["/usr/bin/fusermount3" "/tmp/TestDirectMount4166040800" "-o" "allow_other,subtype=/tmp/go-build1065896,max_read=131072"] /usr/bin/fusermount3: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf \--- FAIL: TestDirectMount (0.01s) mount_linux_test.go:117: fusermount exited with code 256 Change-Id: I4a2a2983dd422de9360b17068ac0d8a3947d453d
-
Han-Wen Nienhuys authored
Change-Id: Ifb84efcb76615cc492c867afb9e1840a6977d402
-
- 12 Apr, 2023 2 commits
-
-
Jakob Unterwurzacher authored
Commit 265a3926 missed adding max_read to the DirectMount path. Add it, which fixes the TestDirectMount failures. Change-Id: Ie934944d8f0a08fb65e2b6f675c8032f404d50df
-
Jakob Unterwurzacher authored
Also test several max_write values, and different fs names. And make the fail output easier to read. Change-Id: Idbc9003554dfd7320890488f0b16cd5cfce1d6b4
-
- 10 Apr, 2023 5 commits
-
-
Han-Wen Nienhuys authored
Change-Id: I1d0537a1f50eb850c7741db1253189dfcf81711c
-
Han-Wen Nienhuys authored
Change-Id: Iee1d90c83a1ff41dadbea07259e71fde7b0cfb22
-
Han-Wen Nienhuys authored
Change-Id: Ieba742bdbe830fdc18f82986694e2cd4d7caf161
-
Han-Wen Nienhuys authored
According to the lseek(2) manpage, seek(SEEK_HOLE) should behave as if there is an implicit hole at the end of every file. Add a test. Fixes #417. Change-Id: I169a803ea81e3c920b61edf8bb8b774870d042c5
-
ZheNing Hu authored
Add a test. Change-Id: I8620e59ce2fc7b19f595c5670839735243fcd1bf
-
- 09 Apr, 2023 1 commit
-
-
Han-Wen Nienhuys authored
Previously, if a DirStream.Next() call would return error, we would return the buffered data as well as the errno code in the same request. This would confuse the kernel, who interprets this as an invalid response, returning syscall.EIO to the caller. To fix this, also buffer the errno as overflow entry in the fileEntry struct. When we encounter an error, return thus far read entries with success. The following read contains just the error. For testing this properly, loopbackDirStream (which reads directory contents) must also buffer error returns. Change-Id: Ideb8ea6f540de9189a0f366efca0db2205e5dec3
-
- 07 Apr, 2023 7 commits
-
-
Han-Wen Nienhuys authored
Adds fuse.Options.EnableSymlinkCaching to enable cached symlinks. Updates in GETATTR results do not trigger new READLINK calls, so this breaks backward compatibility for file systems that have auto-updating symlinks (e.g. a symlink pointing to the HEAD revision of a remote git repository) Change-Id: Ifcbcd75e
-
Han-Wen Nienhuys authored
The logging makes it seems something is wrong when running the test. Change-Id: I4e8ec5c72da555922ca7d20f0a34b9939b36fa9a
-
Han-Wen Nienhuys authored
This avoids a deadlock on Darwin, because futimens calls loopbackFile.Getattr again. Fixes #419 Change-Id: Ia45a0ec3c0ea06c0419913e34b3415808f9349da
-
Han-Wen Nienhuys authored
Change-Id: I9357f137487d1c958a95ed46db081b7775604b6b
-
Han-Wen Nienhuys authored
Change-Id: Ifec1f504e014c3af9fe79943660831be0598a6d2
-
Han-Wen Nienhuys authored
Change-Id: Ia0d7293d14bb4fdac9be913ba6bd92b836636070
-
Han-Wen Nienhuys authored
Change-Id: I115ebce34aaf22767bb8b90b842927c133e30b65
-
- 05 Apr, 2023 1 commit
-
-
Han-Wen Nienhuys authored
This avoids that the result from concurrent directory reads (which would return entries in different order) pollute kernel caches. Add a test. Fixes #391 Change-Id: I06a252bd
-
- 29 Mar, 2023 1 commit
-
-
Han-Wen Nienhuys authored
Change-Id: I144cb541
-
- 23 Mar, 2023 1 commit
-
-
Han-Wen Nienhuys authored
Change-Id: I1612f912dd6b113e7776b13c40f9a41038a3fd53
-
- 19 Mar, 2023 2 commits
-
-
Alex Fishman authored
Signed-off-by: Alex Fishman <alex@fuse-t.org> Change-Id: I82de5e2dd0340da4e05e4ccf1bbd162dff33b656
-
Alex Fishman authored
Darwin amd64 uses uint16 for Stat_t.mode Signed-off-by: Alex Fishman <alex@fuse-t.org> Change-Id: I82de5e2dd0340da4e05e4ccf1bbd162dff33b611
-
- 21 Feb, 2023 1 commit
-
-
Lucas Manning authored
Change-Id: I3a67066a6660481bdab81278a91027755973b496
-
- 05 Feb, 2023 1 commit
-
-
ZheNing Hu authored
- provides an optional way to set e.g. Ino and/or Gen for the root directory when calling fs.Mount() - provides unit test cases - partial fix for #399 Change-Id: If45a0ec3c0ea06c0419913e34b3415808f9349da
-
- 30 Jan, 2023 1 commit
-
-
Jakob Unterwurzacher authored
Allows to enable the DirectMount{,Strict} flag through the cli, facilitating testing. Change-Id: I46e273ea68e6a81b4e7873802bc3b1c7760f56f0
-