1. 28 4月, 2009 8 次提交
  2. 28 3月, 2009 1 次提交
  3. 26 11月, 2008 6 次提交
  4. 16 10月, 2008 1 次提交
  5. 26 7月, 2008 2 次提交
    • M
      fuse: nfs export special lookups · 33670fa2
      Miklos Szeredi 提交于
      Implement the get_parent export operation by sending a LOOKUP request with
      ".." as the name.
      
      Implement looking up an inode by node ID after it has been evicted from
      the cache.  This is done by seding a LOOKUP request with "." as the name
      (for all file types, not just directories).
      
      The filesystem can set the FUSE_EXPORT_SUPPORT flag in the INIT reply, to
      indicate that it supports these special lookups.
      
      Thanks to John Muir for the original implementation of this feature.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: David Teigland <teigland@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      33670fa2
    • M
      fuse: add export operations · dbd561d2
      Miklos Szeredi 提交于
      Implement export_operations, to allow fuse filesystems to be exported to
      NFS.  This feature has been in the out-of-tree fuse module, and is widely
      used and tested.
      
      It has not been originally merged into mainline, because doing the NFS
      export in userspace was thought to be a cleaner and more efficient way of
      doing it, than through the kernel.
      
      While that is true, it would also have involved a lot of duplicated effort
      at reimplementing NFS exporting (all the different versions of the
      protocol).  This effort was unfortunately not undertaken by anyone, so we
      are left with doing it the easy but less efficient way.
      
      If this feature goes in, the out-of-tree fuse module can go away,
      which would have several advantages:
      
        - not having to maintain two versions
        - less confusion for users
        - no bugs due to kernel API changes
      
      Comment from hch:
       - Use the same fh_type values as XFS, since we use the same fh encoding.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dbd561d2
  6. 13 5月, 2008 1 次提交
    • M
      fuse: add flag to turn on big writes · 78bb6cb9
      Miklos Szeredi 提交于
      Prior to 2.6.26 fuse only supported single page write requests.  In theory all
      fuse filesystem should be able support bigger than 4k writes, as there's
      nothing in the API to prevent it.  Unfortunately there's a known case in
      NTFS-3G where big writes cause filesystem corruption.  There could also be
      other filesystems, where the lack of testing with big write requests would
      result in bugs.
      
      To prevent such problems on a kernel upgrade, disable big writes by default,
      but let filesystems set a flag to turn it on.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Cc: Szabolcs Szakacsits <szaka@ntfs-3g.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      78bb6cb9
  7. 30 4月, 2008 4 次提交
    • M
      fuse: fix node ID type · b48badf0
      Miklos Szeredi 提交于
      Node ID is 64bit but it is passed as unsigned long to some functions.  This
      breakage wasn't noticed, because libfuse uses unsigned long too.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b48badf0
    • M
      fuse: update file size on short read · 5c5c5e51
      Miklos Szeredi 提交于
      If the READ request returned a short count, then either
      
        - cached size is incorrect
        - filesystem is buggy, as short reads are only allowed on EOF
      
      So assume that the size is wrong and refresh it, so that cached read() doesn't
      zero fill the missing chunk.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5c5c5e51
    • M
      fuse: support writable mmap · 3be5a52b
      Miklos Szeredi 提交于
      Quoting Linus (3 years ago, FUSE inclusion discussions):
      
        "User-space filesystems are hard to get right. I'd claim that they
         are almost impossible, unless you limit them somehow (shared
         writable mappings are the nastiest part - if you don't have those,
         you can reasonably limit your problems by limiting the number of
         dirty pages you accept through normal "write()" calls)."
      
      Instead of attempting the impossible, I've just waited for the dirty page
      accounting infrastructure to materialize (thanks to Peter Zijlstra and
      others).  This nicely solved the biggest problem: limiting the number of pages
      used for write caching.
      
      Some small details remained, however, which this largish patch attempts to
      address.  It provides a page writeback implementation for fuse, which is
      completely safe against VM related deadlocks.  Performance may not be very
      good for certain usage patterns, but generally it should be acceptable.
      
      It has been tested extensively with fsx-linux and bash-shared-mapping.
      
      Fuse page writeback design
      --------------------------
      
      fuse_writepage() allocates a new temporary page with GFP_NOFS|__GFP_HIGHMEM.
      It copies the contents of the original page, and queues a WRITE request to the
      userspace filesystem using this temp page.
      
      The writeback is finished instantly from the MM's point of view: the page is
      removed from the radix trees, and the PageDirty and PageWriteback flags are
      cleared.
      
      For the duration of the actual write, the NR_WRITEBACK_TEMP counter is
      incremented.  The per-bdi writeback count is not decremented until the actual
      write completes.
      
      On dirtying the page, fuse waits for a previous write to finish before
      proceeding.  This makes sure, there can only be one temporary page used at a
      time for one cached page.
      
      This approach is wasteful in both memory and CPU bandwidth, so why is this
      complication needed?
      
      The basic problem is that there can be no guarantee about the time in which
      the userspace filesystem will complete a write.  It may be buggy or even
      malicious, and fail to complete WRITE requests.  We don't want unrelated parts
      of the system to grind to a halt in such cases.
      
      Also a filesystem may need additional resources (particularly memory) to
      complete a WRITE request.  There's a great danger of a deadlock if that
      allocation may wait for the writepage to finish.
      
      Currently there are several cases where the kernel can block on page
      writeback:
      
        - allocation order is larger than PAGE_ALLOC_COSTLY_ORDER
        - page migration
        - throttle_vm_writeout (through NR_WRITEBACK)
        - sync(2)
      
      Of course in some cases (fsync, msync) we explicitly want to allow blocking.
      So for these cases new code has to be added to fuse, since the VM is not
      tracking writeback pages for us any more.
      
      As an extra safetly measure, the maximum dirty ratio allocated to a single
      fuse filesystem is set to 1% by default.  This way one (or several) buggy or
      malicious fuse filesystems cannot slow down the rest of the system by hogging
      dirty memory.
      
      With appropriate privileges, this limit can be raised through
      '/sys/class/bdi/<bdi>/max_ratio'.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3be5a52b
    • M
      mm: bdi: expose the BDI object in sysfs for FUSE · b6f2fcbc
      Miklos Szeredi 提交于
      Register FUSE's backing_dev_info under sysfs with the name "fuse-MAJOR:MINOR"
      
      Make the fuse control filesystem use s_dev instead of a fuse specific ID.
      This makes it easier to match directories under /sys/fs/fuse/connections/ with
      directories under /sys/class/bdi, and with actual mounts.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b6f2fcbc
  8. 07 2月, 2008 2 次提交
  9. 30 11月, 2007 2 次提交
  10. 19 10月, 2007 6 次提交
  11. 17 10月, 2007 5 次提交
  12. 09 4月, 2007 1 次提交
  13. 08 12月, 2006 1 次提交