1. 12 7月, 2018 5 次提交
  2. 07 6月, 2018 1 次提交
    • D
      xfs: convert to SPDX license tags · 0b61f8a4
      Dave Chinner 提交于
      Remove the verbose license text from XFS files and replace them
      with SPDX tags. This does not change the license of any of the code,
      merely refers to the common, up-to-date license files in LICENSES/
      
      This change was mostly scripted. fs/xfs/Makefile and
      fs/xfs/libxfs/xfs_fs.h were modified by hand, the rest were detected
      and modified by the following command:
      
      for f in `git grep -l "GNU General" fs/xfs/` ; do
      	echo $f
      	cat $f | awk -f hdr.awk > $f.new
      	mv -f $f.new $f
      done
      
      And the hdr.awk script that did the modification (including
      detecting the difference between GPL-2.0 and GPL-2.0+ licenses)
      is as follows:
      
      $ cat hdr.awk
      BEGIN {
      	hdr = 1.0
      	tag = "GPL-2.0"
      	str = ""
      }
      
      /^ \* This program is free software/ {
      	hdr = 2.0;
      	next
      }
      
      /any later version./ {
      	tag = "GPL-2.0+"
      	next
      }
      
      /^ \*\// {
      	if (hdr > 0.0) {
      		print "// SPDX-License-Identifier: " tag
      		print str
      		print $0
      		str=""
      		hdr = 0.0
      		next
      	}
      	print $0
      	next
      }
      
      /^ \* / {
      	if (hdr > 1.0)
      		next
      	if (hdr > 0.0) {
      		if (str != "")
      			str = str "\n"
      		str = str $0
      		next
      	}
      	print $0
      	next
      }
      
      /^ \*/ {
      	if (hdr > 0.0)
      		next
      	print $0
      	next
      }
      
      // {
      	if (hdr > 0.0) {
      		if (str != "")
      			str = str "\n"
      		str = str $0
      		next
      	}
      	print $0
      }
      
      END { }
      $
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      0b61f8a4
  3. 10 5月, 2018 4 次提交
  4. 16 3月, 2018 2 次提交
  5. 12 3月, 2018 2 次提交
    • B
      xfs: rename agfl perag res type to rmapbt · 21592863
      Brian Foster 提交于
      The AGFL perag reservation type accounts all allocations that feed
      into (or are released from) the allocation group free list (agfl).
      The purpose of the reservation is to support worst case conditions
      for the reverse mapping btree (rmapbt). As such, the agfl
      reservation usage accounting only considers rmapbt usage when the
      in-core counters are initialized at mount time.
      
      This implementation inconsistency leads to divergence of the in-core
      and on-disk usage accounting over time. In preparation to resolve
      this inconsistency and adjust the AGFL reservation into an rmapbt
      specific reservation, rename the AGFL reservation type and
      associated accounting fields to something more rmapbt-specific. Also
      fix up a couple tracepoints that incorrectly use the AGFL
      reservation type to pass the agfl state of the associated extent
      where the raw reservation type is expected.
      
      Note that this patch does not change perag reservation behavior.
      Signed-off-by: NBrian Foster <bfoster@redhat.com>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      21592863
    • D
      xfs: fix transaction allocation deadlock in IO path · 4df0f7f1
      Dave Chinner 提交于
      xfs_trans_alloc() does GFP_KERNEL allocation, and we can call it
      while holding pages locked for writeback in the ->writepages path.
      The memory allocation is allowed to wait on pages under writeback,
      and so can wait on pages that are tagged as writeback by the
      caller.
      
      This affects both pre-IO submission and post-IO submission paths.
      Hence xfs_setsize_trans_alloc(), xfs_reflink_end_cow(),
      xfs_iomap_write_unwritten() and xfs_reflink_cancel_cow_range().
      xfs_iomap_write_unwritten() already does the right thing, but the
      others don't. Fix them.
      Signed-Off-By: NDave Chinner <dchinner@redhat.com>
      Fixes: 281627df ("xfs: log file size updates at I/O completion time")
      Fixes: 43caeb18 ("xfs: move mappings from cow fork to data fork after copy-write)"
      Reviewed-by: NEric Sandeen <sandeen@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      4df0f7f1
  6. 29 1月, 2018 6 次提交
  7. 22 12月, 2017 1 次提交
  8. 15 12月, 2017 4 次提交
  9. 09 12月, 2017 1 次提交
  10. 07 11月, 2017 3 次提交
  11. 27 10月, 2017 1 次提交
  12. 04 10月, 2017 1 次提交
  13. 02 9月, 2017 1 次提交
  14. 21 7月, 2017 2 次提交
  15. 20 6月, 2017 2 次提交
  16. 04 5月, 2017 1 次提交
    • D
      xfs: reserve enough blocks to handle btree splits when remapping · fe0be23e
      Darrick J. Wong 提交于
      In xfs_reflink_end_cow, we erroneously reserve only enough blocks to
      handle adding 1 extent.  This is problematic if we fragment free space,
      have to do CoW, and then have to perform multiple bmap btree expansions.
      Furthermore, the BUI recovery routine doesn't reserve /any/ blocks to
      handle btree splits, so log recovery fails after our first error causes
      the filesystem to go down.
      
      Therefore, refactor the transaction block reservation macros until we
      have a macro that works for our deferred (re)mapping activities, and fix
      both problems by using that macro.
      
      With 1k blocks we can hit this fairly often in g/187 if the scratch fs
      is big enough.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      fe0be23e
  17. 04 4月, 2017 1 次提交
  18. 08 3月, 2017 1 次提交
  19. 17 2月, 2017 1 次提交