1. 15 5月, 2014 1 次提交
  2. 24 10月, 2013 3 次提交
    • D
      xfs: decouple inode and bmap btree header files · a4fbe6ab
      Dave Chinner 提交于
      Currently the xfs_inode.h header has a dependency on the definition
      of the BMAP btree records as the inode fork includes an array of
      xfs_bmbt_rec_host_t objects in it's definition.
      
      Move all the btree format definitions from xfs_btree.h,
      xfs_bmap_btree.h, xfs_alloc_btree.h and xfs_ialloc_btree.h to
      xfs_format.h to continue the process of centralising the on-disk
      format definitions. With this done, the xfs inode definitions are no
      longer dependent on btree header files.
      
      The enables a massive culling of unnecessary includes, with close to
      200 #include directives removed from the XFS kernel code base.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NBen Myers <bpm@sgi.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      a4fbe6ab
    • D
      xfs: decouple log and transaction headers · 239880ef
      Dave Chinner 提交于
      xfs_trans.h has a dependency on xfs_log.h for a couple of
      structures. Most code that does transactions doesn't need to know
      anything about the log, but this dependency means that they have to
      include xfs_log.h. Decouple the xfs_trans.h and xfs_log.h header
      files and clean up the includes to be in dependency order.
      
      In doing this, remove the direct include of xfs_trans_reserve.h from
      xfs_trans.h so that we remove the dependency between xfs_trans.h and
      xfs_mount.h. Hence the xfs_trans.h include can be moved to the
      indicate the actual dependencies other header files have on it.
      
      Note that these are kernel only header files, so this does not
      translate to any userspace changes at all.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NBen Myers <bpm@sgi.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      239880ef
    • D
      xfs: unify directory/attribute format definitions · 57062787
      Dave Chinner 提交于
      The on-disk format definitions for the directory and attribute
      structures are spread across 3 header files right now, only one of
      which is dedicated to defining on-disk structures and their
      manipulation (xfs_dir2_format.h). Pull all the format definitions
      into a single header file - xfs_da_format.h - and switch all the
      code over to point at that.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NBen Myers <bpm@sgi.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      57062787
  3. 13 8月, 2013 2 次提交
    • D
      xfs: kill xfs_vnodeops.[ch] · c24b5dfa
      Dave Chinner 提交于
      Now we have xfs_inode.c for holding kernel-only XFS inode
      operations, move all the inode operations from xfs_vnodeops.c to
      this new file as it holds another set of kernel-only inode
      operations. The name of this file traces back to the days of Irix
      and it's vnodes which we don't have anymore.
      
      Essentially this move consolidates the inode locking functions
      and a bunch of XFS inode operations into the one file. Eventually
      the high level functions will be merged into the VFS interface
      functions in xfs_iops.c.
      
      This leaves only internal preallocation, EOF block manipulation and
      hole punching functions in vnodeops.c. Move these to xfs_bmap_util.c
      where we are already consolidating various in-kernel physical extent
      manipulation and querying functions.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NMark Tinguely <tinguely@sgi.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      c24b5dfa
    • D
      xfs: reshuffle dir2 definitions around for userspace · 2b9ab5ab
      Dave Chinner 提交于
      Many of the definitions within xfs_dir2_priv.h are needed in
      userspace outside libxfs. Definitions within xfs_dir2_priv.h are
      wholly contained within libxfs, so we need to shuffle some of the
      definitions around to keep consistency across files shared between
      user and kernel space.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NBrian Foster <bfoster@redhat.com>
      Reviewed-by: NMark Tinguely <tinguely@sgi.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      2b9ab5ab
  4. 26 2月, 2013 1 次提交
  5. 18 10月, 2012 1 次提交
  6. 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
  7. 30 5月, 2012 1 次提交
  8. 15 5月, 2012 1 次提交
  9. 07 12月, 2011 1 次提交
  10. 12 10月, 2011 1 次提交
  11. 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
  12. 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
  13. 14 3月, 2011 1 次提交
  14. 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
  15. 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
  16. 24 6月, 2010 2 次提交
  17. 21 2月, 2010 1 次提交
  18. 09 1月, 2009 1 次提交
  19. 01 12月, 2008 1 次提交
  20. 23 10月, 2008 1 次提交
  21. 13 8月, 2008 2 次提交
  22. 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
  23. 29 4月, 2008 1 次提交
  24. 18 4月, 2008 3 次提交
  25. 07 2月, 2008 1 次提交
  26. 22 10月, 2007 2 次提交
  27. 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
  28. 16 10月, 2007 3 次提交
  29. 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