1. 18 10月, 2012 1 次提交
  2. 10 10月, 2012 1 次提交
    • H
      tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking · 35c2a7f4
      Hugh Dickins 提交于
      Fuzzing with trinity oopsed on the 1st instruction of shmem_fh_to_dentry(),
      	u64 inum = fid->raw[2];
      which is unhelpfully reported as at the end of shmem_alloc_inode():
      
      BUG: unable to handle kernel paging request at ffff880061cd3000
      IP: [<ffffffff812190d0>] shmem_alloc_inode+0x40/0x40
      Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
      Call Trace:
       [<ffffffff81488649>] ? exportfs_decode_fh+0x79/0x2d0
       [<ffffffff812d77c3>] do_handle_open+0x163/0x2c0
       [<ffffffff812d792c>] sys_open_by_handle_at+0xc/0x10
       [<ffffffff83a5f3f8>] tracesys+0xe1/0xe6
      
      Right, tmpfs is being stupid to access fid->raw[2] before validating that
      fh_len includes it: the buffer kmalloc'ed by do_sys_name_to_handle() may
      fall at the end of a page, and the next page not be present.
      
      But some other filesystems (ceph, gfs2, isofs, reiserfs, xfs) are being
      careless about fh_len too, in fh_to_dentry() and/or fh_to_parent(), and
      could oops in the same way: add the missing fh_len checks to those.
      Reported-by: NSasha Levin <levinsasha928@gmail.com>
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Sage Weil <sage@inktank.com>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      35c2a7f4
  3. 30 5月, 2012 1 次提交
  4. 15 5月, 2012 1 次提交
  5. 07 12月, 2011 1 次提交
  6. 12 10月, 2011 1 次提交
  7. 13 8月, 2011 1 次提交
    • C
      xfs: remove subdirectories · c59d87c4
      Christoph Hellwig 提交于
      Use the move from Linux 2.6 to Linux 3.x as an excuse to kill the
      annoying subdirectories in the XFS source code.  Besides the large
      amount of file rename the only changes are to the Makefile, a few
      files including headers with the subdirectory prefix, and the binary
      sysctl compat code that includes a header under fs/xfs/ from
      kernel/.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      c59d87c4
  8. 21 7月, 2011 1 次提交
    • J
      xfs: failure mapping nfs fh to inode should return ESTALE · ad1a2c87
      J. Bruce Fields 提交于
      On xfs exports, nfsd is incorrectly returning ENOENT instead of
      ESTALE on attempts to use a filehandle of a deleted file (spotted
      with pynfs test PUTFH3).  The ENOENT was coming from xfs_iget.
      
      (It's tempting to wonder whether we should just map all xfs_iget
      errors to ESTALE, but I don't believe so--xfs_iget can also return
      ENOMEM at least, which we wouldn't want mapped to ESTALE.)
      
      While we're at it, the other return of ENOENT in xfs_nfs_get_inode()
      also looks wrong.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      ad1a2c87
  9. 14 3月, 2011 1 次提交
  10. 17 12月, 2010 1 次提交
    • S
      xfs: fix exporting with left over 64-bit inodes · 576ecb8e
      Samuel Kvasnica 提交于
      We now support mounting and using filesystems with 64-bit inodes
      even when not mounted with the inode64 option (which now only
      controls if we allocate new inodes in that space or not).  Make sure
      we always use large NFS file handles when exporting a filesystem
      that may contain 64-bit inodes.  Note that this only affects newly
      generated file handles, any outstanding 32-bit file handle is still
      accepted.
      
      [hch: the comment and commit log are mine, the rest is from a patch
       snipplet from Samuel]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      576ecb8e
  11. 27 7月, 2010 2 次提交
    • C
      xfs: remove xfs_iput_new · ef35e925
      Christoph Hellwig 提交于
      We never get an i_mode of 0 or a locked VFS inode until we pass in the
      XFS_IGET_CREATE flag to xfs_iget, which makes xfs_iput_new equivalent to
      xfs_iput for the only caller.  In addition to that xfs_nfs_get_inode
      does not even need to lock the inode given that the generation never changes
      for a life inode, so just pass a 0 lock_flags to xfs_iget and release
      the inode using IRELE in the error path.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NDave Chinner <dchinner@redhat.com>
      ef35e925
    • C
      xfs: drop dmapi hooks · 288699fe
      Christoph Hellwig 提交于
      Dmapi support was never merged upstream, but we still have a lot of hooks
      bloating XFS for it, all over the fast pathes of the filesystem.
      
      This patch drops over 700 lines of dmapi overhead.  If we'll ever get HSM
      support in mainline at least the namespace events can be done much saner
      in the VFS instead of the individual filesystem, so it's not like this
      is much help for future work.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NDave Chinner <dchinner@redhat.com>
      288699fe
  12. 24 6月, 2010 2 次提交
  13. 21 2月, 2010 1 次提交
  14. 09 1月, 2009 1 次提交
  15. 01 12月, 2008 1 次提交
  16. 23 10月, 2008 1 次提交
  17. 13 8月, 2008 2 次提交
  18. 28 7月, 2008 1 次提交
    • B
      [XFS] Return case-insensitive match for dentry cache · 384f3ced
      Barry Naujok 提交于
      This implements the code to store the actual filename found during a
      lookup in the dentry cache and to avoid multiple entries in the dcache
      pointing to the same inode.
      
      To avoid polluting the dcache, we implement a new directory inode
      operations for lookup. xfs_vn_ci_lookup() stores the correct case name in
      the dcache.
      
      The "actual name" is only allocated and returned for a case- insensitive
      match and not an actual match.
      
      Another unusual interaction with the dcache is not storing negative
      dentries like other filesystems doing a d_add(dentry, NULL) when an ENOENT
      is returned. During the VFS lookup, if a dentry returned has no inode,
      dput is called and ENOENT is returned. By not doing a d_add, this actually
      removes it completely from the dcache to be reused. create/rename have to
      be modified to support unhashed dentries being passed in.
      
      SGI-PV: 981521
      SGI-Modid: xfs-linux-melb:xfs-kern:31208a
      Signed-off-by: NBarry Naujok <bnaujok@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      384f3ced
  19. 29 4月, 2008 1 次提交
  20. 18 4月, 2008 3 次提交
  21. 07 2月, 2008 1 次提交
  22. 22 10月, 2007 2 次提交
  23. 19 10月, 2007 1 次提交
    • C
      [XFS] cleanup fid types mess · c6143911
      Christoph Hellwig 提交于
      Currently XFs has three different fid types: struct fid, struct xfs_fid
      and struct xfs_fid2 with hte latter two beeing identicaly and the first
      one beeing the same size but an unstructured array with the same size.
      
      This patch consolidates all this to alway uuse struct xfs_fid.
      
      This patch is required for an upcoming patch series from me that revamps
      the nfs exporting code and introduces a Linux-wide struct fid.
      
      SGI-PV: 970336
      SGI-Modid: xfs-linux-melb:xfs-kern:29651a
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      c6143911
  24. 16 10月, 2007 3 次提交
  25. 15 10月, 2007 1 次提交
    • D
      [XFS] Radix tree based inode caching · da353b0d
      David Chinner 提交于
      One of the perpetual scaling problems XFS has is indexing it's incore
      inodes. We currently uses hashes and the default hash sizes chosen can
      only ever be a tradeoff between memory consumption and the maximum
      realistic size of the cache.
      
      As a result, anyone who has millions of inodes cached on a filesystem
      needs to tunes the size of the cache via the ihashsize mount option to
      allow decent scalability with inode cache operations.
      
      A further problem is the separate inode cluster hash, whose size is based
      on the ihashsize but is smaller, and so under certain conditions (sparse
      cluster cache population) this can become a limitation long before the
      inode hash is causing issues.
      
      The following patchset removes the inode hash and cluster hash and
      replaces them with radix trees to avoid the scalability limitations of the
      hashes. It also reduces the size of the inodes by 3 pointers....
      
      SGI-PV: 969561
      SGI-Modid: xfs-linux-melb:xfs-kern:29481a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      da353b0d
  26. 10 2月, 2007 1 次提交
    • D
      [XFS] Keep stack usage down for 4k stacks by using noinline. · 7989cb8e
      David Chinner 提交于
      gcc-4.1 and more recent aggressively inline static functions which
      increases XFS stack usage by ~15% in critical paths. Prevent this from
      occurring by adding noinline to the STATIC definition.
      
      Also uninline some functions that are too large to be inlined and were
      causing problems with CONFIG_FORCED_INLINING=y.
      
      Finally, clean up all the different users of inline, __inline and
      __inline__ and put them under one STATIC_INLINE macro. For debug kernels
      the STATIC_INLINE macro uninlines those functions.
      
      SGI-PV: 957159
      SGI-Modid: xfs-linux-melb:xfs-kern:27585a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NDavid Chatterton <chatz@sgi.com>
      Signed-off-by: NTim Shimmin <tes@sgi.com>
      7989cb8e
  27. 20 6月, 2006 1 次提交
  28. 09 6月, 2006 2 次提交
  29. 17 3月, 2006 1 次提交
  30. 14 3月, 2006 2 次提交