1. 01 12月, 2010 1 次提交
    • D
      xfs: fix failed write truncation handling. · c726de44
      Dave Chinner 提交于
      Since the move to the new truncate sequence we call xfs_setattr to
      truncate down excessively instanciated blocks.  As shown by the testcase
      in kernel.org BZ #22452 that doesn't work too well.  Due to the confusion
      of the internal inode size, and the VFS inode i_size it zeroes data that
      it shouldn't.
      
      But full blown truncate seems like overkill here.  We only instanciate
      delayed allocations in the write path, and given that we never released
      the iolock we can't have converted them to real allocations yet either.
      
      The only nasty case is pre-existing preallocation which we need to skip.
      We already do this for page discard during writeback, so make the delayed
      allocation block punching a generic function and call it from the failed
      write path as well as xfs_aops_discard_page. The callers are
      responsible for ensuring that partial blocks are not truncated away,
      and that they hold the ilock.
      
      Based on a fix originally from Christoph Hellwig. This version used
      filesystem blocks as the range unit.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      c726de44
  2. 19 10月, 2010 1 次提交
    • D
      xfs: Introduce XFS_IOC_ZERO_RANGE · 44722352
      Dave Chinner 提交于
      XFS_IOC_ZERO_RANGE is the equivalent of an atomic XFS_IOC_UNRESVSP/
      XFS_IOC_RESVSP call pair. It enabled ranges of written data to be
      turned into zeroes without requiring IO or having to free and
      reallocate the extents in the range given as would occur if we had
      to punch and then preallocate them separately.  This enables
      applications to zero parts of files very quickly without changing
      the layout of the files in any way.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      44722352
  3. 27 7月, 2010 2 次提交
  4. 15 12月, 2009 3 次提交
    • C
      xfs: event tracing support · 0b1b213f
      Christoph Hellwig 提交于
      Convert the old xfs tracing support that could only be used with the
      out of tree kdb and xfsidbg patches to use the generic event tracer.
      
      To use it make sure CONFIG_EVENT_TRACING is enabled and then enable
      all xfs trace channels by:
      
         echo 1 > /sys/kernel/debug/tracing/events/xfs/enable
      
      or alternatively enable single events by just doing the same in one
      event subdirectory, e.g.
      
         echo 1 > /sys/kernel/debug/tracing/events/xfs/xfs_ihold/enable
      
      or set more complex filters, etc. In Documentation/trace/events.txt
      all this is desctribed in more detail.  To reads the events do a
      
         cat /sys/kernel/debug/tracing/trace
      
      Compared to the last posting this patch converts the tracing mostly to
      the one tracepoint per callsite model that other users of the new
      tracing facility also employ.  This allows a very fine-grained control
      of the tracing, a cleaner output of the traces and also enables the
      perf tool to use each tracepoint as a virtual performance counter,
           allowing us to e.g. count how often certain workloads git various
           spots in XFS.  Take a look at
      
          http://lwn.net/Articles/346470/
      
      for some examples.
      
      Also the btree tracing isn't included at all yet, as it will require
      additional core tracing features not in mainline yet, I plan to
      deliver it later.
      
      And the really nice thing about this patch is that it actually removes
      many lines of code while adding this nice functionality:
      
       fs/xfs/Makefile                |    8
       fs/xfs/linux-2.6/xfs_acl.c     |    1
       fs/xfs/linux-2.6/xfs_aops.c    |   52 -
       fs/xfs/linux-2.6/xfs_aops.h    |    2
       fs/xfs/linux-2.6/xfs_buf.c     |  117 +--
       fs/xfs/linux-2.6/xfs_buf.h     |   33
       fs/xfs/linux-2.6/xfs_fs_subr.c |    3
       fs/xfs/linux-2.6/xfs_ioctl.c   |    1
       fs/xfs/linux-2.6/xfs_ioctl32.c |    1
       fs/xfs/linux-2.6/xfs_iops.c    |    1
       fs/xfs/linux-2.6/xfs_linux.h   |    1
       fs/xfs/linux-2.6/xfs_lrw.c     |   87 --
       fs/xfs/linux-2.6/xfs_lrw.h     |   45 -
       fs/xfs/linux-2.6/xfs_super.c   |  104 ---
       fs/xfs/linux-2.6/xfs_super.h   |    7
       fs/xfs/linux-2.6/xfs_sync.c    |    1
       fs/xfs/linux-2.6/xfs_trace.c   |   75 ++
       fs/xfs/linux-2.6/xfs_trace.h   | 1369 +++++++++++++++++++++++++++++++++++++++++
       fs/xfs/linux-2.6/xfs_vnode.h   |    4
       fs/xfs/quota/xfs_dquot.c       |  110 ---
       fs/xfs/quota/xfs_dquot.h       |   21
       fs/xfs/quota/xfs_qm.c          |   40 -
       fs/xfs/quota/xfs_qm_syscalls.c |    4
       fs/xfs/support/ktrace.c        |  323 ---------
       fs/xfs/support/ktrace.h        |   85 --
       fs/xfs/xfs.h                   |   16
       fs/xfs/xfs_ag.h                |   14
       fs/xfs/xfs_alloc.c             |  230 +-----
       fs/xfs/xfs_alloc.h             |   27
       fs/xfs/xfs_alloc_btree.c       |    1
       fs/xfs/xfs_attr.c              |  107 ---
       fs/xfs/xfs_attr.h              |   10
       fs/xfs/xfs_attr_leaf.c         |   14
       fs/xfs/xfs_attr_sf.h           |   40 -
       fs/xfs/xfs_bmap.c              |  507 +++------------
       fs/xfs/xfs_bmap.h              |   49 -
       fs/xfs/xfs_bmap_btree.c        |    6
       fs/xfs/xfs_btree.c             |    5
       fs/xfs/xfs_btree_trace.h       |   17
       fs/xfs/xfs_buf_item.c          |   87 --
       fs/xfs/xfs_buf_item.h          |   20
       fs/xfs/xfs_da_btree.c          |    3
       fs/xfs/xfs_da_btree.h          |    7
       fs/xfs/xfs_dfrag.c             |    2
       fs/xfs/xfs_dir2.c              |    8
       fs/xfs/xfs_dir2_block.c        |   20
       fs/xfs/xfs_dir2_leaf.c         |   21
       fs/xfs/xfs_dir2_node.c         |   27
       fs/xfs/xfs_dir2_sf.c           |   26
       fs/xfs/xfs_dir2_trace.c        |  216 ------
       fs/xfs/xfs_dir2_trace.h        |   72 --
       fs/xfs/xfs_filestream.c        |    8
       fs/xfs/xfs_fsops.c             |    2
       fs/xfs/xfs_iget.c              |  111 ---
       fs/xfs/xfs_inode.c             |   67 --
       fs/xfs/xfs_inode.h             |   76 --
       fs/xfs/xfs_inode_item.c        |    5
       fs/xfs/xfs_iomap.c             |   85 --
       fs/xfs/xfs_iomap.h             |    8
       fs/xfs/xfs_log.c               |  181 +----
       fs/xfs/xfs_log_priv.h          |   20
       fs/xfs/xfs_log_recover.c       |    1
       fs/xfs/xfs_mount.c             |    2
       fs/xfs/xfs_quota.h             |    8
       fs/xfs/xfs_rename.c            |    1
       fs/xfs/xfs_rtalloc.c           |    1
       fs/xfs/xfs_rw.c                |    3
       fs/xfs/xfs_trans.h             |   47 +
       fs/xfs/xfs_trans_buf.c         |   62 -
       fs/xfs/xfs_vnodeops.c          |    8
       70 files changed, 2151 insertions(+), 2592 deletions(-)
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      0b1b213f
    • C
      xfs: change the xfs_iext_insert / xfs_iext_remove · 6ef35544
      Christoph Hellwig 提交于
      Change the xfs_iext_insert / xfs_iext_remove prototypes to pass more
      information which will allow pushing the trace points from the callers
      into those functions.  This includes folding the whichfork information
      into the state variable to minimize the addition stack footprint.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      6ef35544
    • C
      xfs: cleanup bmap extent state macros · 7574aa92
      Christoph Hellwig 提交于
      Cleanup the extent state macros in the bmap code to use one common set of
      flags that we can pass to the tracing code later and remove a lot of the
      macro obsfucation.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      7574aa92
  5. 01 9月, 2009 1 次提交
  6. 02 7月, 2009 1 次提交
  7. 30 3月, 2009 1 次提交
    • C
      xfs: remove m_attroffset · 1a5902c5
      Christoph Hellwig 提交于
      With the upcoming v3 inodes the default attroffset needs to be calculated
      for each specific inode, so we can't cache it in the superblock anymore.
      
      Also replace the assert for wrong inode sizes with a proper error check
      also included in non-debug builds.  Note that the ENOSYS return for
      that might seem odd, but that error is returned by xfs_mount_validate_sb
      for all theoretically valid but not supported filesystem geometries.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NJosef 'Jeff' Sipek <jeffpc@josefsipek.net>
      1a5902c5
  8. 29 3月, 2009 1 次提交
  9. 19 1月, 2009 1 次提交
  10. 16 1月, 2009 1 次提交
  11. 01 12月, 2008 1 次提交
    • E
      [XFS] convert xfs_getbmap to take formatter functions · 8a7141a8
      Eric Sandeen 提交于
      Preliminary work to hook up fiemap, this allows us to pass in an
      arbitrary formatter to copy extent data back to userspace.
      
      The formatter takes info for 1 extent, a pointer to the user "thing*"
      and a pointer to a "filled" variable to indicate whether a userspace
      buffer did get filled in (for fiemap, hole "extents" are skipped).
      
      I'm just using the getbmapx struct as a "common denominator" because
      as far as I can see, it holds all info that any formatters will care
      about.
      
      ("*thing" because fiemap doesn't pass the user pointer around, but rather
      has a pointer to a fiemap info structure, and helpers associated with it)
      Signed-off-by: NEric Sandeen <sandeen@sandeen.net>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNiv Sardi <xaiki@sgi.com>
      8a7141a8
  12. 30 10月, 2008 1 次提交
  13. 28 7月, 2008 1 次提交
    • L
      [XFS] Restore the lowspace extent allocator algorithm · b877e3d3
      Lachlan McIlroy 提交于
      When free space is running low the extent allocator may choose to allocate
      an extent from an AG without leaving sufficient space for a btree split
      when inserting the new extent (see where xfs_bmap_btalloc() sets minleft
      to 0). In this case the allocator will enable the lowspace algorithm which
      is supposed to allow further allocations (such as btree splits and
      newroots) to allocate from sequential AGs. This algorithm has been broken
      for a long time and this patch restores its behaviour.
      
      SGI-PV: 983338
      
      SGI-Modid: xfs-linux-melb:xfs-kern:31358a
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      b877e3d3
  14. 18 4月, 2008 1 次提交
  15. 07 2月, 2008 1 次提交
  16. 15 10月, 2007 2 次提交
  17. 14 7月, 2007 1 次提交
  18. 10 2月, 2007 1 次提交
  19. 09 6月, 2006 1 次提交
  20. 31 3月, 2006 1 次提交
  21. 29 3月, 2006 1 次提交
  22. 14 3月, 2006 2 次提交
    • M
      [XFS] 929045 567344 This mod introduces multi-level in-core file extent · 0293ce3a
      Mandy Kirkconnell 提交于
      functionality, building upon the new layout introduced in mod
      xfs-linux:xfs-kern:207390a.  The new multi-level extent allocations are
      only required for heavily fragmented files, so the old-style linear extent
      list is used on files until the extents reach a pre-determined size of 4k.
      4k buffers are used because this is the system page size on Linux i386 and
      systems with larger page sizes don't seem to gain much, if anything, by
      using their native page size as the extent buffer size. Also, using 4k
      extent buffers everywhere provides a consistent interface for CXFS across
      different platforms.  The 4k extent buffers are managed by an indirection
      array (xfs_ext_irec_t) which is basically just a pointer array with a bit
      of extra information to keep track of the number of extents in each buffer
      as well as the extent offset of each buffer.  Major changes include:  -
      Add multi-level in-core file extent functionality to the xfs_iext_  
      subroutines introduced in mod:	xfs-linux:xfs-kern:207390a  - Introduce 13
      new subroutines which add functionality for multi-level   in-core file
      extents:	 xfs_iext_add_indirect_multi()	      
      xfs_iext_remove_indirect()	   xfs_iext_realloc_indirect()	      
      xfs_iext_indirect_to_direct()	      xfs_iext_bno_to_irec()	    
      xfs_iext_idx_to_irec()	       xfs_iext_irec_init()	   
      xfs_iext_irec_new()	    xfs_iext_irec_remove()	  
      xfs_iext_irec_compact() 	xfs_iext_irec_compact_pages()	     
      xfs_iext_irec_compact_full()	     xfs_iext_irec_update_extoffs()
      
      SGI-PV: 928864
      SGI-Modid: xfs-linux-melb:xfs-kern:207393a
      Signed-off-by: NMandy Kirkconnell <alkirkco@sgi.com>
      Signed-off-by: NNathan Scott <nathans@sgi.com>
      0293ce3a
    • M
      [XFS] 929045 567344 This mod re-organizes some of the in-core file extent · 4eea22f0
      Mandy Kirkconnell 提交于
      code to prepare for an upcoming mod which will introduce multi-level
      in-core extent allocations. Although the in-core extent management is
      using a new code path in this mod, the functionality remains the same. 
      Major changes include:	- Introduce 10 new subroutines which re-orgainze
      the existing code but	do NOT change functionality:	    
      xfs_iext_get_ext()	   xfs_iext_insert()	     xfs_iext_add()	  
       xfs_iext_remove()	   xfs_iext_remove_inline()	   
      xfs_iext_remove_direct()	 xfs_iext_realloc_direct()	  
      xfs_iext_direct_to_inline()	    xfs_iext_inline_to_direct()        
      xfs_iext_destroy() - Remove 2 subroutines (functionality moved to new
      subroutines above):	    xfs_iext_realloc() -replaced by xfs_iext_add()
      and xfs_iext_remove()	      xfs_bmap_insert_exlist() - replaced by
      xfs_iext_insert()	  xfs_bmap_delete_exlist() - replaced by
      xfs_iext_remove() - Replace all hard-coded (indexed) extent assignments
      with a call to	 xfs_iext_get_ext() - Replace all extent record pointer
      arithmetic (ep++, ep--, base + lastx,..)   with calls to
      xfs_iext_get_ext() - Update comments to remove the idea of a single
      "extent list" and   introduce "extent record" terminology instead
      
      SGI-PV: 928864
      SGI-Modid: xfs-linux-melb:xfs-kern:207390a
      Signed-off-by: NMandy Kirkconnell <alkirkco@sgi.com>
      Signed-off-by: NNathan Scott <nathans@sgi.com>
      4eea22f0
  23. 11 1月, 2006 1 次提交
  24. 02 11月, 2005 3 次提交
  25. 21 6月, 2005 1 次提交
  26. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4