1. 12 7月, 2018 25 次提交
  2. 25 6月, 2018 1 次提交
  3. 09 6月, 2018 2 次提交
  4. 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
  5. 05 6月, 2018 1 次提交
  6. 16 5月, 2018 4 次提交
  7. 10 5月, 2018 4 次提交
    • B
      xfs: don't discard on free of unwritten extents · 84ca484e
      Brian Foster 提交于
      Unwritten extents by definition have not been written to until they
      are converted to normal written extents. If unwritten extents are
      freed from a file, it is therefore guaranteed that the blocks have
      not been written to since allocation (note that zero range punches
      and reallocates blocks).
      
      To cut down on online discards generated from workloads that make
      use of preallocation, skip discards of extents if they are in the
      unwritten state when the extent is freed.
      
      Note that this optimization does not apply to log recovery, during
      which all freed extents are discarded if online discard is enabled.
      Also note that it may be possible for a filesystem crash to occur
      after write completion of an unwritten extent but before unwritten
      conversion such that the extent remains unwritten after log
      recovery. Since this pseudo-inconsistency may already be possible
      after a crash (consider writing to recently allocated blocks where
      the allocation transaction is lost after a crash), this change
      shouldn't introduce any fundamental limitations that don't already
      exist. In short, on storage stacks where discards are important,
      it's good practice to run an occasional fstrim even with online
      discard enabled in the filesystem, particularly after a crash.
      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>
      84ca484e
    • B
      xfs: add bmapi nodiscard flag · fcb762f5
      Brian Foster 提交于
      Freed extents are unconditionally discarded when online discard is
      enabled. Define XFS_BMAPI_NODISCARD to allow callers to bypass
      discards when unnecessary. For example, this will be useful for
      eofblocks trimming.
      
      This patch does not change 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>
      fcb762f5
    • D
      xfs: get rid of the log item descriptor · e6631f85
      Dave Chinner 提交于
      It's just a connector between a transaction and a log item. There's
      a 1:1 relationship between a log item descriptor and a log item,
      and a 1:1 relationship between a log item descriptor and a
      transaction. Both relationships are created and terminated at the
      same time, so why do we even have the descriptor?
      
      Replace it with a specific list_head in the log item and a new
      log item dirtied flag to replace the XFS_LID_DIRTY flag.
      Signed-Off-By: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NBrian Foster <bfoster@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      [darrick: fix up deferred agfl intent finish_item use of LID_DIRTY]
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      e6631f85
    • D
      xfs: bmap debugging should never panic the system · cec57256
      Darrick J. Wong 提交于
      Don't panic() the system if the bmap records are garbage, just call
      ASSERT which gives us the same backtrace but enables developers to
      control if the system goes down or not.  This makes debugging with
      generic/388 much easier because it won't reboot the machine midway
      through a run just because btree_read_bufl returns EIO when the fs has
      already shut down.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NBrian Foster <bfoster@redhat.com>
      cec57256
  8. 18 4月, 2018 1 次提交
  9. 10 4月, 2018 1 次提交