1. 14 Jun, 2023 4 commits
    • Kirill Smelkov's avatar
      . · c676bc1c
      Kirill Smelkov authored
      c676bc1c
    • Kirill Smelkov's avatar
      . · ef20d933
      Kirill Smelkov authored
      ef20d933
    • Kirill Smelkov's avatar
      . · 6746d704
      Kirill Smelkov authored
      6746d704
    • Kirill Smelkov's avatar
      Merge branch 'y/nodefs-cancel' into t · 43d5f40d
      Kirill Smelkov authored
      * y/nodefs-cancel: (60 commits)
        Make ReadDirPlus configurable
        all.bash: use /bin/bash explicitly
        fuse: Add release flag constants
        Fix sync.Pool leak
        README: make godoc links point to v2 instead of ancient v1.0.0
        Ports commit fee50bf0 to poll_darwin.go in order to allow read-only mounts on Darwin as well.
        Make OSXFUSE handle timeouts the same way as Linux
        Update to fuse 7.12
        example: remove unionfs examples
        unionfs: remove library
        posixtest: provide more detail for failing ReadDir test
        fuse: decode MKNOD result in debug output
        fuse: fix mounting with MaxWrite < 8kiB
        fuse: add MaxPages to INIT debug output
        fs: update oldParent.children for exchange rename
        Fix IOCTL to return the error allowed by overlayfs
        fuse: prefer fusermount3 over fusermount; add debug output
        Replace defunct travis ci with github actions
        Rewrite defunct all.bash
        fuse: move parseFuseFd() to unbreak darwin build
        ...
      43d5f40d
  2. 21 Dec, 2022 1 commit
    • Kirill Smelkov's avatar
      Merge branch 'master' into y/nodefs-cancel · 643585d7
      Kirill Smelkov authored
      * master:
        Make ReadDirPlus configurable
        all.bash: use /bin/bash explicitly
        fuse: Add release flag constants
        Fix sync.Pool leak
        README: make godoc links point to v2 instead of ancient v1.0.0
        Ports commit fee50bf0 to poll_darwin.go in order to allow read-only mounts on Darwin as well.
        Make OSXFUSE handle timeouts the same way as Linux
        Update to fuse 7.12
        example: remove unionfs examples
        unionfs: remove library
        posixtest: provide more detail for failing ReadDir test
      643585d7
  3. 17 Nov, 2022 1 commit
    • Tamas Kerecsen's avatar
      Make ReadDirPlus configurable · 915cf541
      Tamas Kerecsen authored
      When ReadDirPlus is enabled, the FUSE fs has to gather a lot of additional data for every file even if it won't be used (for example when the user is doing and 'ls' or a large glob). This can cause performance problems, so it should be possible to switch to the simple ReadDir behavior for file systems where this is a bottleneck.
      
      Change-Id: I7f2e58fe6e728a408044ce789633423f6e527554
      915cf541
  4. 15 Nov, 2022 3 commits
    • Han-Wen Nienhuys's avatar
      all.bash: use /bin/bash explicitly · 9905e995
      Han-Wen Nienhuys authored
      Change-Id: If4af8e09d1921242e36a415317d390154c5c2891
      9905e995
    • Andrew Chambers's avatar
      fuse: Add release flag constants · 23b5d97d
      Andrew Chambers authored
      Change-Id: Icb2931139a6293abaaa95623a8e130dd6f8dab0b
      23b5d97d
    • sunjiapeng's avatar
      Fix sync.Pool leak · 4a0e6eb5
      sunjiapeng authored
      There is a sync.Pool leak in server.go, which triggers in case of
      multi-threaded loads.
      
      Benchmarks:
      
      env: Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz (8core 16procs)
      go test -bench="BenchmarkGoFuseRead" -benchmem
      
      old:
      
      2       10992 92501 ns/op 22671.71 MB/s 536981 B/op 196 allocs/op
      4       19068 57959 ns/op 36183.44 MB/s 151877 B/op 170 allocs/op
      8       27729 43796 ns/op 47884.39 MB/s 29068 B/op 162 allocs/op
      16      28674 41403 ns/op 50651.65 MB/s 6704 B/op 160 allocs/op
      
      fixed:
      
      2       23667 46589 ns/op 45014.20 MB/s 5357 B/op 167 allocs/op
      4       27753 42327 ns/op 49546.77 MB/s 4999 B/op 161 allocs/op
      8       29648 40806 ns/op 51392.81 MB/s 4904 B/op 160 allocs/op
      16      29389 40763 ns/op 51447.07 MB/s 4848 B/op 160 allocs/op
      
      Change-Id: I062928203df5603ebca04c08c4d428d385f99c2c
      4a0e6eb5
  5. 03 Oct, 2022 1 commit
  6. 22 Aug, 2022 1 commit
  7. 27 Jun, 2022 1 commit
    • Jille Timmermans's avatar
      Make OSXFUSE handle timeouts the same way as Linux · d01fda7e
      Jille Timmermans authored
      OSXFUSE applies a 60-second timeout for file operations. This
      is inconsistent with how FUSE works on Linux, where operations
      last as long as the daemon is willing to let them run.
      
      Change-Id: I6c042a3e785961a2c47c67e27d530bee5c50ce77
      d01fda7e
  8. 14 Jun, 2022 1 commit
  9. 31 May, 2022 1 commit
  10. 20 May, 2022 2 commits
    • Han-Wen Nienhuys's avatar
      unionfs: remove library · f4cec619
      Han-Wen Nienhuys authored
      This library was created as a mechanism to overlay a writable checkout
      for Git on top of Google's readonly SrcFS filesystem. This use case
      has long disappeared, and the unionfs library appears unused
      otherwise. Due to its reliance on timestamps and delays, it is very
      susceptible to flakiness in tests.
      
      Fixing this seems hard or maybe even impossible, so just remove the
      library.
      
      Change-Id: I6c594a724a0579b5c4c3aada76cd7013195fda94
      f4cec619
    • Han-Wen Nienhuys's avatar
      posixtest: provide more detail for failing ReadDir test · d8187fce
      Han-Wen Nienhuys authored
      Change-Id: I2b996ca3bfd1ea7e605e4dfd785cba2796340cd5
      d8187fce
  11. 18 Jan, 2022 1 commit
    • Kirill Smelkov's avatar
      Merge branch 'master' into y/nodefs-cancel · 464ade3c
      Kirill Smelkov authored
      * master:
        fuse: decode MKNOD result in debug output
        fuse: fix mounting with MaxWrite < 8kiB
        fuse: add MaxPages to INIT debug output
        fs: update oldParent.children for exchange rename
        Fix IOCTL to return the error allowed by overlayfs
        fuse: prefer fusermount3 over fusermount; add debug output
      464ade3c
  12. 12 Jan, 2022 1 commit
    • Jakob Unterwurzacher's avatar
      fuse: decode MKNOD result in debug output · f57e95bd
      Jakob Unterwurzacher authored
      MKNOD returns an EntryOut that we can decode.
      
      Before:
      
      20:27:39.722507 rx 24914: MKNOD n1 {010644 (022), 0} ["pipe"] 5b
      20:27:39.722546 tx 24914:     OK
      
      After:
      
      20: 32:39.156352 rx 38: MKNOD n1 {010644 (022), 0} ["pipe"] 5b
      20: 32:39.156389 tx 38:     OK, {n3 g1 tE=1s tA=1s {M010644 SZ=0 L=1 1027:1027 B0*4096 i0:46906 A 1641756759.155157 M 1641756759.155157 C 1641756759.155157}}
      Change-Id: If40e690219f20459466d7c8f9aa822c7186179dc
      f57e95bd
  13. 11 Jan, 2022 3 commits
    • Jakob Unterwurzacher's avatar
      fuse: fix mounting with MaxWrite < 8kiB · 81c1d52b
      Jakob Unterwurzacher authored
      The readPool size was calculated from MaxWrite not taking
      into account that the kernel fails all reads below 8 kiB.
      
      Fix that by always using at least 8kiB.
      
      Change-Id: I3bd9013be44b00bdc370bac00d00b4a106ec2d07
      81c1d52b
    • Jakob Unterwurzacher's avatar
      fuse: add MaxPages to INIT debug output · e1a5fd2a
      Jakob Unterwurzacher authored
      A later commit will allow setting MaxPages, so show it in the debug output.
      
      Also print MaxReadahead, MaxWrite, TimeGran in decimal instead of hex -
      these are neither bitfields nor addresses, so it seems clearer to have them in decimal.
      
      Before:
      
      22:03:50.020645 rx 2: INIT n0 {7.34 Ra 0x20000 PARALLEL_DIROPS,ASYNC_READ,EXPORT_SUPPORT,AUTO_INVAL_DATA,READDIRPLUS,NO_OPEN_SUPPORT,NO_OPENDIR_SUPPORT,EXPLICIT_INVAL_DATA,POSIX_LOCKS,DONT_MASK,SPLICE_READ,ASYNC_DIO,WRITEBACK_CACHE,HANDLE_KILLPRIV,CACHE_SYMLINKS,SPLICE_WRITE,SPLICE_MOVE,FLOCK_LOCKS,IOCTL_DIR,READDIRPLUS_AUTO,ABORT_ERROR,ATOMIC_O_TRUNC,BIG_WRITES,POSIX_ACL,MAX_PAGES,0x30000000}
      22:03:50.020665 tx 2:     OK, {7.28 Ra 0x20000 AUTO_INVAL_DATA,READDIRPLUS,NO_OPEN_SUPPORT,PARALLEL_DIROPS,ASYNC_READ,MAX_PAGES,BIG_WRITES 0/0 Wr 0x2000 Tg 0x0}
      
      After:
      
      22: 02:51.374635 rx 2: INIT n0 {7.34 Ra 131072 POSIX_LOCKS,ATOMIC_O_TRUNC,DONT_MASK,FLOCK_LOCKS,AUTO_INVAL_DATA,READDIRPLUS_AUTO,PARALLEL_DIROPS,MAX_PAGES,ASYNC_READ,EXPORT_SUPPORT,BIG_WRITES,SPLICE_WRITE,SPLICE_READ,HANDLE_KILLPRIV,WRITEBACK_CACHE,CACHE_SYMLINKS,NO_OPENDIR_SUPPORT,EXPLICIT_INVAL_DATA,SPLICE_MOVE,IOCTL_DIR,READDIRPLUS,ASYNC_DIO,NO_OPEN_SUPPORT,POSIX_ACL,ABORT_ERROR,0x30000000}
      22: 02:51.374656 tx 2:     OK, {7.28 Ra 131072 ASYNC_READ,BIG_WRITES,READDIRPLUS,NO_OPEN_SUPPORT,PARALLEL_DIROPS,AUTO_INVAL_DATA,MAX_PAGES 0/0 Wr 8192 Tg 0 MaxPages 2}
      Change-Id: Iea02ad3270615d019413b3306e8a8e7282cd7c52
      e1a5fd2a
    • hotaery's avatar
      fs: update oldParent.children for exchange rename · 91451a73
      hotaery authored
      Change-Id: I7b8d1a6be288324021c846273aceb08eb9010e98
      91451a73
  14. 04 Jan, 2022 1 commit
  15. 19 Dec, 2021 1 commit
    • Jakob Unterwurzacher's avatar
      fuse: prefer fusermount3 over fusermount; add debug output · 934a183e
      Jakob Unterwurzacher authored
      fusermount is (usually) from libfuse v2, and fusermount3 is from
      libfuse v3, which is the actively-developed version.
      
      Importantly, libfuse v3 added ExFAT to the list of filesystems
      that users are allowed to mount on, and libfuse v2 did not.
      
      The only ABI difference between fusermount and fusermount3 that
      I am aware of is that fusermount3 dropped the allow_empty option.
      
      Filesystems had to deal with that already, as fusermount may
      also be from libfuse v3, depending on what the distro does.
      
      This commit also adds two lines of debug output about which binary
      we actually call.
      
      Passes all.bash & the gocryptfs test suite.
      
      Fixes https://github.com/hanwen/go-fuse/issues/394
      Fixes https://github.com/rfjakob/gocryptfs/issues/626
      
      Change-Id: Id4574fb9c8d2c812a524181a76616159256d551c
      934a183e
  16. 10 Sep, 2021 1 commit
    • Kirill Smelkov's avatar
      Merge branch 'master' into y/nodefs-cancel · e6ee85fd
      Kirill Smelkov authored
      * master:
        Replace defunct travis ci with github actions
        Rewrite defunct all.bash
        fuse: move parseFuseFd() to unbreak darwin build
        fuse: support special /dev/fd/N mountpoint
        fuse: refer to fs instead of nodefs & pathfs
        fuse: move fusermount logic to new callFusermount() helper
        fuse: add `SyncRead` flag to MountOptions to ensure in-order reads
        fs: allow inode number 1
        Run "go mod tidy"
        fs: fix Inode.IsDir logic
        fuse: fix deadlock in TestDeleteNotify
        fs: recreate kernelNodeIds & stableAttrs maps when they shrink
        fs: fix outdated comment in removeRef
      e6ee85fd
  17. 25 Aug, 2021 5 commits
    • Jakob Unterwurzacher's avatar
      Replace defunct travis ci with github actions · 3ab5d95a
      Jakob Unterwurzacher authored
      The workflow definition is adapted from gocryptfs,
      that uses github actions for a month now.
      
      Works ok as seen here:
      https://github.com/rfjakob/go-fuse/actions/runs/1167431646
      
      (except that some tests are flakey, but that's a
      problem for another day).
      
      Change-Id: Ib7aaa3b0a2f9671040fa599735aa47323d5c25d4
      3ab5d95a
    • Jakob Unterwurzacher's avatar
      Rewrite defunct all.bash · 45c0d70f
      Jakob Unterwurzacher authored
      all.bash is broken for some time now (since the move to v2?).
      Rewrite and simplify it using "./..." syntax.
      
      And add the binaries that are generated to gitignore.
      
      all.bash will be used in the upcomming patch for Github Actions CI.
      
      Change-Id: Ia1b2e6bc60486b419408d4efd50bef4b8dd62bae
      45c0d70f
    • Jakob Unterwurzacher's avatar
      fuse: move parseFuseFd() to unbreak darwin build · 61df8108
      Jakob Unterwurzacher authored
      Unfortunately, I broke darwin with the last commit:
      
      + GOOS=darwin
      + GOARCH=amd64
      + go build -tags without_openssl -o /dev/null
      ../../../../pkg/mod/github.com/hanwen/go-fuse/v2@v2.1.1-0.20210825070001-74a933d6/fuse/server.go:122:5: undefined: parseFuseFd
      ../../../../pkg/mod/github.com/hanwen/go-fuse/v2@v2.1.1-0.20210825070001-74a933d6/fuse/server.go:887:5: undefined: parseFuseFd
      
      Move parseFuseFd() to build on all archs to unbreak the build.
      
      Change-Id: Ice173cc70a6a95765b56b444623b68ed92382052
      61df8108
    • Jakob Unterwurzacher's avatar
      fuse: support special /dev/fd/N mountpoint · 74a933d6
      Jakob Unterwurzacher authored
      libfuse introduced [1] a special `/dev/fd/N` syntax for the mountpoint:
      It means that a privileged parent process:
      
       * Opened /dev/fuse
       * Called mount() on a real mountpoint directory
       * Inherited the fd to /dev/fuse to us
       * Informs us about the fd number via /dev/fd/N
      
      This functionality is used to allow FUSE mounts inside containers
      that have neither root permissions nor suid binaries [2], and
      for the --drop_privileges flag of mount.fuse3 [4]
      
      Tested with singularity and gocryptfs and actually works [3].
      
      v2: Added doccomment for NewServer.
      v3: Added specific error message on Server.Unmount().
      v4: Moved mount details to package comment
      
      [1] https://github.com/libfuse/libfuse/commit/64e11073b9347fcf9c6d1eea143763ba9e946f70
      [2] https://github.com/rfjakob/gocryptfs/issues/590
      [3] $ singularity run --fusemount "host:gocryptfs --extpass echo --extpass test /tmp/a /mnt" docker://ubuntu
          INFO:    Using cached SIF image
          Reading password from extpass program "echo", arguments: ["test"]
          Decrypting master key
          bash: /home/jakob/.cargo/env: No such file or directory
          bash: /home/jakob/.cargo/env: No such file or directory
          bash: /home/jakob/.cargo/env: No such file or directory
          Singularity> Filesystem mounted and ready.
      [4] man mount.fuse3
      
      Change-Id: Ibcc2464b0ef1e3d236207981b487fd9a7d94c910
      74a933d6
    • Jakob Unterwurzacher's avatar
      fuse: refer to fs instead of nodefs & pathfs · 4ba0b1e3
      Jakob Unterwurzacher authored
      Update the package comment to refer to the fs package
      instead of nodefs and pathfs, which are deprecated.
      
      Change-Id: I317e53152b63b982298a7de29120191488dcd362
      4ba0b1e3
  18. 12 Aug, 2021 1 commit
  19. 02 Aug, 2021 2 commits
  20. 01 Aug, 2021 1 commit
    • Jakob Unterwurzacher's avatar
      Run "go mod tidy" · efbe2d7d
      Jakob Unterwurzacher authored
      Drops an obsolete entry pointing to go-fuse v1.0.0.
      
      Change-Id: Iaf8e880d6f39e63b593a7929b8b4ff649c1d7807
      efbe2d7d
  21. 30 Jul, 2021 2 commits
    • Jakob Unterwurzacher's avatar
      fs: fix Inode.IsDir logic · 458f01e0
      Jakob Unterwurzacher authored
      The file type is not a bitmap, and looking at
      
      	S_IFBLK                          = 0x6000
      	S_IFCHR                          = 0x2000
      	S_IFDIR                          = 0x4000
      	S_IFIFO                          = 0x1000
      	S_IFLNK                          = 0xa000
      	S_IFREG                          = 0x8000
      	S_IFSOCK                         = 0xc000
      
      and confirmed by the added test, we used to classify
      block devices and sockets as directories:
      
       --- FAIL: TestInodeIsDir (0.00s)
           inode_test.go:25: wrong result for case struct { mode uint32; dir bool }{mode:0x6000, dir:false}
           inode_test.go:25: wrong result for case struct { mode uint32; dir bool }{mode:0xc000, dir:false}
      
      The check is fixed now and the test passes.
      
      Change-Id: I6490992d1fecc8a6bea7c2c4b2f1bca765d03d4c
      458f01e0
    • Jakob Unterwurzacher's avatar
      fuse: fix deadlock in TestDeleteNotify · bba1094c
      Jakob Unterwurzacher authored
      This
      
      	GOMAXPROCS=1 go test -v -count=1 -run TestDeleteNotify ./fuse/test
      
      deadlocked reliably, apparently in the chdir() from cmd.Start().
      
      We can do without the chdir() by using an absolte path.
      This avoids the issue.
      
      Fixes https://github.com/hanwen/go-fuse/issues/261
      
      Change-Id: Ia9c8f15819c125c5bf94b085fa4c5f2977a6789a
      bba1094c
  22. 11 Jun, 2021 2 commits
  23. 10 Jun, 2021 1 commit
    • Kirill Smelkov's avatar
      Merge branch 'master' into y/nodefs-cancel · 7e0334c3
      Kirill Smelkov authored
      * master:
        fuse: suppress ENOENT warnings for INTERRUPT responses
        loopback: enable logger for tests
        fuse: add `EnableAcl` flag to MountOptions
        fuse: fix wrong CAP_POSIX_ACL value
        fs: track most recent parent
        fs: tests: add TestStaleHardlinks (fails at the moment)
        fuse: fix definition of CAP_POSIX_ACL, CAP_HANDLE_KILLPRIV
        example/winfs: add a sleep before the busy check
        example/winfs: new example
        fs: return ENOTSUP if NodeMknoder isn't implemented
      7e0334c3
  24. 08 Jun, 2021 1 commit
    • Tommy Lindgren's avatar
      fuse: suppress ENOENT warnings for INTERRUPT responses · eefea5e0
      Tommy Lindgren authored
      If writing the INTERRUPT response returns ENOENT it means that the
      referred request is no longer known by the kernel. This is a normal if
      the referred request already has completed. We thus suppress the scary
      warning unless debugging is enabled.
      
      Fixes #375.
      
      Change-Id: I3266dbd8ad53a42db9e0e746e4734f284746b76c
      eefea5e0
  25. 03 Jun, 2021 1 commit