1. 13 1月, 2011 1 次提交
  2. 07 1月, 2011 2 次提交
    • N
      fs: dcache reduce branches in lookup path · fb045adb
      Nick Piggin 提交于
      Reduce some branches and memory accesses in dcache lookup by adding dentry
      flags to indicate common d_ops are set, rather than having to check them.
      This saves a pointer memory access (dentry->d_op) in common path lookup
      situations, and saves another pointer load and branch in cases where we
      have d_op but not the particular operation.
      
      Patched with:
      
      git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fb045adb
    • N
      fs: icache RCU free inodes · fa0d7e3d
      Nick Piggin 提交于
      RCU free the struct inode. This will allow:
      
      - Subsequent store-free path walking patch. The inode must be consulted for
        permissions when walking, so an RCU inode reference is a must.
      - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
        to take i_lock no longer need to take sb_inode_list_lock to walk the list in
        the first place. This will simplify and optimize locking.
      - Could remove some nested trylock loops in dcache code
      - Could potentially simplify things a bit in VM land. Do not need to take the
        page lock to follow page->mapping.
      
      The downsides of this is the performance cost of using RCU. In a simple
      creat/unlink microbenchmark, performance drops by about 10% due to inability to
      reuse cache-hot slab objects. As iterations increase and RCU freeing starts
      kicking over, this increases to about 20%.
      
      In cases where inode lifetimes are longer (ie. many inodes may be allocated
      during the average life span of a single inode), a lot of this cache reuse is
      not applicable, so the regression caused by this patch is smaller.
      
      The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
      however this adds some complexity to list walking and store-free path walking,
      so I prefer to implement this at a later date, if it is shown to be a win in
      real situations. I haven't found a regression in any non-micro benchmark so I
      doubt it will be a problem.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fa0d7e3d
  3. 08 12月, 2010 1 次提交
    • M
      fuse: separate queue for FORGET requests · 07e77dca
      Miklos Szeredi 提交于
      Terje Malmedal reports that a fuse filesystem with 32 million inodes
      on a machine with lots of memory can go unresponsive for up to 30
      minutes when all those inodes are evicted from the icache.
      
      The reason is that FORGET messages, sent when the inode is evicted,
      are queued up together with regular filesystem requests, and while the
      huge queue of FORGET messages are processed no other filesystem
      operation can proceed.
      
      Since a full fuse request structure is allocated for each inode, these
      take up quite a bit of memory as well.
      
      To solve these issues, create a slim 'fuse_forget_link' structure
      containing just the minimum of information required to send the FORGET
      request and chain these on a separate queue.
      
      When userspace is asking for a request make sure that FORGET and
      non-FORGET requests are selected fairly: for each 8 non-FORGET allow
      16 FORGET requests.  This will make sure FORGETs do not pile up, yet
      other requests are also allowed to proceed while the queued FORGETs
      are processed.
      Reported-by: NTerje Malmedal <terje.malmedal@usit.uio.no>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      07e77dca
  4. 29 10月, 2010 2 次提交
  5. 10 8月, 2010 1 次提交
  6. 09 2月, 2010 1 次提交
  7. 24 9月, 2009 1 次提交
  8. 16 9月, 2009 3 次提交
  9. 11 9月, 2009 1 次提交
  10. 07 7月, 2009 1 次提交
  11. 01 7月, 2009 2 次提交
    • J
      fuse: invalidation reverse calls · 3b463ae0
      John Muir 提交于
      Add notification messages that allow the filesystem to invalidate VFS
      caches.
      
      Two notifications are added:
      
       1) inode invalidation
      
         - invalidate cached attributes
         - invalidate a range of pages in the page cache (this is optional)
      
       2) dentry invalidation
      
         - try to invalidate a subtree in the dentry cache
      
      Care must be taken while accessing the 'struct super_block' for the
      mount, as it can go away while an invalidation is in progress.  To
      prevent this, introduce a rw-semaphore, that is taken for read during
      the invalidation and taken for write in the ->kill_sb callback.
      
      Cc: Csaba Henk <csaba@gluster.com>
      Cc: Anand Avati <avati@zresearch.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      3b463ae0
    • M
      fuse: allow umask processing in userspace · e0a43ddc
      Miklos Szeredi 提交于
      This patch lets filesystems handle masking the file mode on creation.
      This is needed if filesystem is using ACLs.
      
       - The CREATE, MKDIR and MKNOD requests are extended with a "umask"
         parameter.
      
       - A new FUSE_DONT_MASK flag is added to the INIT request/reply.  With
         this the filesystem may request that the create mode is not masked.
      
      CC: Jean-Pierre André <jean-pierre.andre@wanadoo.fr>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      e0a43ddc
  12. 17 6月, 2009 1 次提交
  13. 09 5月, 2009 1 次提交
  14. 28 4月, 2009 3 次提交
  15. 26 1月, 2009 3 次提交
  16. 26 11月, 2008 7 次提交
  17. 23 10月, 2008 1 次提交
  18. 16 10月, 2008 1 次提交
  19. 14 10月, 2008 1 次提交
  20. 27 7月, 2008 1 次提交
  21. 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
  22. 18 6月, 2008 1 次提交
  23. 25 5月, 2008 1 次提交
  24. 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