[PATCH 0/4] xfs: skip unnecessary discards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

This series allows XFS to skip discards in a couple cases where they are
spurious as the associated blocks have not been written to (e.g.,
eofblocks and unwritten extents). This v1 series incorporates Dave's
feedback on the previously posted RFC.

Patch 1 defines a new bmapi flag, patch 2 uses the flag for eofblocks
trim operations, patch 3 skips discards of unwritten extents and patch 4
is an rfc based on the discussion in the original rfc. While the rfc
mostly works, it's not suitable for merge from a code standpoint (and
while I've worked out some kinks, I still think there are lingering
issues) and so is included only for informational purposes.

Otherwise, patches 1-3 survive xfstests using a couple thin provisioned
volumes with '-o discard.' More '-o discard' test runs with alternate
configurations are in progress, but it hasn't spontaneously combusted to
this point so I'm posting for review.

Thoughts, reviews, flames appreciated.

Brian

v1:
- Define and use bmapi flag for eofblocks trims.
- Separate patch to skip discards of unwritten extents.
- Various factoring cleanups.
rfc: https://marc.info/?l=linux-xfs&m=152476598825563&w=2

Brian Foster (4):
  xfs: add bmapi nodiscard flag
  xfs: skip online discard during eofblocks trims
  xfs: don't discard on free of unwritten extents
  xfs: convert speculative preallocation to unwritten extents

 fs/xfs/libxfs/xfs_alloc.c  | 10 +++++---
 fs/xfs/libxfs/xfs_alloc.h  | 27 ++++++++++++++++++--
 fs/xfs/libxfs/xfs_bmap.c   | 17 ++++++++++---
 fs/xfs/libxfs/xfs_bmap.h   | 30 ++++++++++++++++++++--
 fs/xfs/xfs_aops.c          |  3 +++
 fs/xfs/xfs_attr_inactive.c |  3 ++-
 fs/xfs/xfs_bmap_util.c     |  2 +-
 fs/xfs/xfs_extfree_item.c  |  2 +-
 fs/xfs/xfs_inode.c         | 11 +++++---
 fs/xfs/xfs_inode.h         |  2 +-
 fs/xfs/xfs_iomap.c         | 62 ++++++++++++++++++++++++++++++++++++++++++++++
 fs/xfs/xfs_iops.c          |  3 ++-
 fs/xfs/xfs_qm_syscalls.c   |  2 +-
 fs/xfs/xfs_trans.h         |  3 ++-
 fs/xfs/xfs_trans_extfree.c | 13 +++++++---
 15 files changed, 165 insertions(+), 25 deletions(-)

-- 
2.14.3

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux