An error occurred fetching the project authors.
  1. 02 Aug, 2021 1 commit
  2. 08 May, 2021 1 commit
  3. 04 Nov, 2020 1 commit
    • Jakob Unterwurzacher's avatar
      fuse: debug logging: mark nodeids as "nXXX" · be8e5f4a
      Jakob Unterwurzacher authored
      nodeid and inode number used to be identical, which is
      why both could be marked as "iXXX". This is no longer the
      case, so make nodeids distinguishable.
      
      Example:
      
      23:47:17.637736 rx 9156: MKDIR n28 {0777 (00)} ["d90X"] 5b
      23:47:17.637801 tx 9156:     OK, {n112 g1 tE=1s tA=1s {M040755 SZ=4096 L=2 1026:1026 B8*4096 i0:2769795 A 1601761637.637385 M 1601761637.637385 C 1601761637.637385}}
      
      v4: also update orphaned inode warning
      
      Change-Id: Ib29dabfd4cf6692cf4118191f8dc73529562426f
      be8e5f4a
  4. 26 Nov, 2019 1 commit
  5. 07 Nov, 2019 1 commit
    • Han-Wen Nienhuys's avatar
      fuse: support direct IO in loopback · 3a40eb5c
      Han-Wen Nienhuys authored
      open(2) has supports direct IO. When opening a file in the loopback
      FS, writes to the underlying would fail, because the FUSE server does
      not position the bytes to write (which come directly after the WriteIn
      header) on a 512-byte boundary.
      
      Fix this by allocating the input buffer with such that the first
      content byte is aligned.
      
      Add a test.
      
      Fixes #328.
      
      Change-Id: Ib7ad24aff673413ab8db4112d0b12143c2654617
      3a40eb5c
  6. 25 Apr, 2019 2 commits
  7. 23 Apr, 2019 1 commit
    • Kirill Smelkov's avatar
      fuse: Don't skip WRITE details in debug output · 19ede699
      Kirill Smelkov authored
      When kernel sends WRITE request it sends with it file handle, offset,
      size etc. We were not printing all this. Compare e.g. debug output
      sample for TestUtimesNano before and after the patch.
      
      before:
      
      	rx 8: CREATE i1 {0100600 [CREAT,TRUNC,WRONLY,0x8000] (00)} ["hello.txt"] 10b
      	tx 8:     OK, {i3 g2 {M0100600 SZ=0 L=1 1000:1000 B0*4096 i0:733462 A 1556038355.426630 M 1556038355.426630 C 1556038355.426630} &{2 0 0}}
      	rx 9: GETXATTR i3 {sz 0} ["security.capability"] 20b
      	tx 9:     61=no data available
      	rx 10: WRITE i3  3b							<-- NOTE
      	tx 10:     OK
      
      after:
      
      	rx 8: CREATE i1 {0100600 [WRONLY,CREAT,TRUNC,0x8000] (00)} ["hello.txt"] 10b
      	tx 8:     OK, {i3 g2 {M0100600 SZ=0 L=1 1000:1000 B0*4096 i0:736300 A 1556038379.359197 M 1556038379.359197 C 1556038379.359197} &{2 0 0}}
      	rx 9: GETXATTR i3 {sz 0} ["security.capability"] 20b
      	tx 9:     61=no data available
      	rx 10: WRITE i3 {Fh 2 [0 +3)  L 0 WRONLY,NONBLOCK,0x8000}  3b		<-- NOTE
      	tx 10:     OK
      19ede699
  8. 06 Apr, 2019 1 commit
  9. 27 Mar, 2019 7 commits
  10. 08 Mar, 2019 1 commit
    • Han-Wen Nienhuys's avatar
      fuse: interrupt handling · e028a29e
      Han-Wen Nienhuys authored
      Use linear search to find requests to interrupt. This assumes that
      interrupts are rare, and the number of outstanding requests when it
      happens is low.
      
      Interrupted requests are not put back into the request pool to avoid
      racing with in-progress mutators.
      e028a29e
  11. 24 Feb, 2019 2 commits
  12. 23 Feb, 2019 2 commits
    • Han-Wen Nienhuys's avatar
      fuse: support RENAME2 in RawFileSystem · fb9b7327
      Han-Wen Nienhuys authored
      In practice, this only triggers for RENAME_EXCHANGE, as the kernel
      issues the RENAME opcode in case of a normal rename or a
      RENAME_NOREPLACE.
      
      We have always advertised rename2 support (protocol v23), but it returned
      ENOSYS always. Instead, rename RenameIn => Rename1In, and add Flags to
      RenameIn.
      
      For raw filesystems that want to support rename2 should examine
      RenameIn.Flags and check for syscall.RENAME_XXX.
      
      For fuse/nodefs, we return ENOSYS in case of Rename2, since we lack
      API surface to propagate the flags.
      fb9b7327
    • Han-Wen Nienhuys's avatar
      afa3a28f
  13. 17 Feb, 2019 1 commit
    • Kirill Smelkov's avatar
      fuse: Enable parallel lookup and readdir by default · 05a3771c
      Kirill Smelkov authored
      After Linux VFS was enhanced to be able to do several lookups and
      readdirs in parallel, FUSE client in Linux, in fear to break existing
      filesystems, explicitly reverted it back to be serial in FUSE exchange
      and requested filesystems to indicate via CAP_PARALLEL_DIROPS flag that
      the filesystem server is ready to handle parallel lookup and readdir
      requests.
      
      	https://git.kernel.org/linus/5c672ab3f0
      
      We should be ready to handle and we provide MountOptions.SingleThreaded
      for those filesystems, which are not ready to handle requests in
      parallel.
      05a3771c
  14. 30 Jan, 2019 1 commit
    • Jakob Unterwurzacher's avatar
      fuse: improve BATCH_FORGET debug log output · 8020c188
      Jakob Unterwurzacher authored
      Node numbers are now written as "i1234" everywhere except in the
      BATCH_FORGET output, fix that. Also show the transaction number
      so we can follow where each forget comes from.
      
      As a normal FORGET looks like this:
      
      	2019/01/27 14:38:07 rx 1488: FORGET i822 {Nlookup=1}
      
      with the new output, "grep FORGET i1234 " will catch both single forgets
      and batch forgets.
      
      Before:
      
      	2019/01/20 18:15:31 rx 1372: BATCH_FORGET i0 {Count=3}  48b
      	2019/01/20 18:15:31 doBatchForget: forgetting 1 of 3: NodeId: 40, Nlookup: 1
      	2019/01/20 18:15:31 doBatchForget: forgetting 2 of 3: NodeId: 41, Nlookup: 1
      	2019/01/20 18:15:31 doBatchForget: forgetting 3 of 3: NodeId: 42, Nlookup: 1
      
      After:
      
      	2019/01/27 14:48:35 rx 2982: BATCH_FORGET i0 {Count=2}  32b
      	2019/01/27 14:48:35 doBatchForget: rx 2982 1/2: FORGET i804 {Nlookup=1}
      	2019/01/27 14:48:35 doBatchForget: rx 2982 2/2: FORGET i803 {Nlookup=1}
      8020c188
  15. 17 Dec, 2018 1 commit
  16. 11 Oct, 2018 1 commit
    • Kirill Smelkov's avatar
      fuse: Correct NOTIFY constants/operation names · b760b557
      Kirill Smelkov authored
      - it is not NOTIFY_INVAL_DELETE, but just NOTIFY_DELETE as the kernel is
        notified of entry being deleted and there is no invalidation here.
        uapi/linux/fuse.h does not use "_INVAL_" for NOTIFY_DELETE neither.
      
      - similarly for "notify store/retrieve" _INVAL_ is not appropriate and
        neither is used in uapi/linux/fuse.h . However since we took more
        explicit approach for "notify store/retrieve" naming (see bdca0e6a
        "Add support for store notify") let's also add _CACHE suffix for
        "notify store/retrieve" operation names for consistency and for being
        less ambiguous.
      
      - for inode/entry invalidation operations, let's use _INVAL_ in internal
        _OP_NOTIFY_*, similarly to how it is used in corresponding NOTIFY_*
        constant. For example:
      
      	_OP_NOTIFY_ENTRY -> _OP_NOTIFY_INVAL_ENTRY	(corresponds to NOTIFY_INVAL_ENTRY)
      b760b557
  17. 08 Oct, 2018 1 commit
  18. 27 Jul, 2018 1 commit
  19. 24 Jul, 2018 1 commit
  20. 02 May, 2018 1 commit
    • Jakob Unterwurzacher's avatar
      fuse: improve SETXATTR debug logging · 41df6ec8
      Jakob Unterwurzacher authored
      Set the operationHandlers[op].DecodeIn function and
      add xattr name parsing.
      
      SETXATTR is special because it is the only opcode that
      takes a file name (the xattr name) and a binary blob
      (the xattr value). This was not supported by the
      file name parsing code:
      * setting FileNames = 1 would lump the xattr name
        and value together and truncates the last byte
      * setting FileNames = 2 truncated the last xattr
        value byte.
      
      This was solved by adding a special-case to parse(),
      which seemed less ugly than adding a special-case
      InputDebug(), or leaving the truncation as-is.
      
      Before:
        2018/05/01 16:47:39 Dispatch 6: SETXATTR, NodeId: 3.  12 bytes
      After:
        2018/05/01 16:48:36 Dispatch 6: SETXATTR, NodeId: 3. data: {sz 3 f0} names: [user.foo] 12 bytes
      
      The change only affects debug output as doSetXAttr() does its
      own bytes.SplitN(). The parsed filename *could* also be used in
      doSetXAttr(), but the code seems clearer as-is.
      41df6ec8
  21. 19 Oct, 2017 1 commit
  22. 18 Jul, 2017 1 commit
  23. 15 Jul, 2017 1 commit
    • Han-Wen Nienhuys's avatar
      fuse: fix tests for Go 1.9 · 4f10e248
      Han-Wen Nienhuys authored
      Go 1.9 uses epoll() for more efficient file I/O. File I/O causes a
      call to epoll, and the runtime makes this call take up a GOMAXPROCS
      slot.
      
      The FUSE kernel module also supports poll: polling on a file residing
      in a FUSE file system causes the kernel to sends a POLL request to the
      userspace process.  If the process responds with ENOSYS, the kernel
      will stop forwarding poll requests to the FUSE process.
      
      In a test for Go FUSE file systems, it is normal to serve the
      filesystem out of the same process that opens files in the file
      system. If this happens in Go 1.9, the epoll call can take the only
      GOMAXPROCS slot left, leaving the process unable to respond to the
      FUSE POLL opcode, deadlocking the process.
      
      This change add support for a magic file "/ .go-fuse-epoll-hack" with
      node ID uint64(-1), and on starting up the file system, the library
      calls poll() on this file, triggering the POLL opcode before the Go
      runtime had a chance to do so.
      
      There are two problem scenarios left:
      
      * File system tests that start I/O before calling WaitMount() still
        risk deadlocking themselves.
      
      * The Linux kernel keeps track of feature support in fuse_conn, which notes
      
               * The following bitfields are only for optimization purposes
               * and hence races in setting them will not cause malfunction
      
        if our forced ENOSYS gets lost due to a race condition in the
        kernel, this can still trigger.
      
      Fixes golang/go#21014 and #165
      4f10e248
  24. 21 Dec, 2016 1 commit
  25. 09 Aug, 2016 1 commit
  26. 04 Aug, 2016 1 commit
  27. 03 Aug, 2016 1 commit
  28. 11 Jul, 2016 1 commit
    • Han-Wen Nienhuys's avatar
      Add Debug fields to all Options structs, and use those. · a27cac55
      Han-Wen Nienhuys authored
      SetDebug methods are maintained for compatibility.
      
      This is part of a patch series to process the INIT opcode on
      mount. This will enable filesystems to switch functionality depending
      on kernel settings.
      
      In order to get the debug output for the INIT opcode, the debug option
      must be passed to the mount method.
      
      Deprecate the SetDebug methods. There is often little practical use in
      toggling debug on the fly, since the error scenarios depend on timing
      details, and must usually be isolated into unittests.
      
      Change-Id: I221c995add5f7621b627f738d7e97af7daf81b2a
      a27cac55
  29. 30 Jun, 2016 2 commits
    • Han-Wen Nienhuys's avatar
      By default, return ENODATA for GetXAttr. · 7b281480
      Han-Wen Nienhuys authored
      Any node that returns ENOSYS for Getxattr will cause the kernel to
      stop issuing Getxattr calls altogether. In file systems that must
      support GetXAttr and that has multiple node types, tracking down all
      node types and overriding GetXAttr for them individually is annoying.
      
      For filesystems that need the performance benefit of skipping GETXATTR
      calls, provide a DisableXAttrs option.
      
      Change-Id: I98327aa959b3b26192e15bc3be96b7a6c0ada5f6
      7b281480
    • Han-Wen Nienhuys's avatar
      Fix debug print for SYMLINK result. · aa08b0ff
      Han-Wen Nienhuys authored
      Change-Id: I6c17b6937483ad4a396cafe43d3b4605ce4a83cf
      aa08b0ff
  30. 24 Apr, 2016 1 commit