1. 10 10月, 2016 7 次提交
  2. 06 10月, 2016 30 次提交
  3. 05 10月, 2016 3 次提交
    • D
      xfs: allocate delayed extents in CoW fork · ef473667
      Darrick J. Wong 提交于
      Modify the writepage handler to find and convert pending delalloc
      extents to real allocations.  Furthermore, when we're doing non-cow
      writes to a part of a file that already has a CoW reservation (the
      cowextsz hint that we set up in a subsequent patch facilitates this),
      promote the write to copy-on-write so that the entire extent can get
      written out as a single extent on disk, thereby reducing post-CoW
      fragmentation.
      
      Christoph moved the CoW support code in _map_blocks to a separate helper
      function, refactored other functions, and reduced the number of CoW fork
      lookups, so I merged those changes here to reduce churn.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      ef473667
    • D
      xfs: support allocating delayed extents in CoW fork · 60b4984f
      Darrick J. Wong 提交于
      Modify xfs_bmap_add_extent_delay_real() so that we can convert delayed
      allocation extents in the CoW fork to real allocations, and wire this
      up all the way back to xfs_iomap_write_allocate().  In a subsequent
      patch, we'll modify the writepage handler to call this.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      60b4984f
    • D
      xfs: create delalloc extents in CoW fork · 2a06705c
      Darrick J. Wong 提交于
      Wire up iomap_begin to detect shared extents and create delayed allocation
      extents in the CoW fork:
      
       1) Check if we already have an extent in the COW fork for the area.
          If so nothing to do, we can move along.
       2) Look up block number for the current extent, and if there is none
          it's not shared move along.
       3) Unshare the current extent as far as we are going to write into it.
          For this we avoid an additional COW fork lookup and use the
          information we set aside in step 1) above.
       4) Goto 1) unless we've covered the whole range.
      
      Last but not least, this updates the xfs_reflink_reserve_cow_range calling
      convention to pass a byte offset and length, as that is what both callers
      expect anyway.  This patch has been refactored considerably as part of the
      iomap transition.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      2a06705c