Skip to content

RFC dm-thin/xfs: prototype a block reservation allocation model

Brian Foster dm-devel linux-fsdevel linux-xfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest10 patches 9 repliesIn review
  2. v1 RFC9 patches 7 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10xfs: refactor xfs_reserve_blocks() to handle ENOSPC correctlyfs/xfs/xfs_fsops.c+60 -450 replies
2/10xfs: replace xfs_mod_fdblocks() bool param with flagsfs/xfs/libxfs/xfs_bmap.c fs/xfs/xfs_mount.c fs/xfs/xfs_mount.h +1 more+27 -180 replies
3/10block: add block_device_operations methods to set and get reserved spaceinclude/linux/blkdev.h+6 -01 reply
4/10dm: add methods to set and get reserved spacedrivers/md/dm.c include/linux/device-mapper.h+46 -00 replies
5/10dm thin: add methods to set and get reserved spacedrivers/md/dm-thin.c+171 -108 replies
6/10xfs: thin block device reservation mechanismfs/xfs/Makefile fs/xfs/xfs_mount.h fs/xfs/xfs_thin.c +2 more+324 -00 replies
7/10xfs: adopt a reserved allocation model on dm-thin devicesfs/xfs/libxfs/xfs_alloc.c fs/xfs/xfs_mount.c fs/xfs/xfs_mount.h +2 more+193 -160 replies
8/10xfs: handle bdev reservation ENOSPC correctly from XFS reserved poolfs/xfs/xfs_fsops.c+27 -20 replies
9/10xfs: support no block reservation transaction modefs/xfs/libxfs/xfs_shared.h fs/xfs/xfs_trans.c+8 -40 replies
10/10xfs: use contiguous bdev reservation for file preallocationfs/xfs/xfs_bmap_util.c+28 -10 replies

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by.

PatchJoe ThornberMike Snitzer
1/10
2/10
3/10
4/10
5/10Not-Signed-off-by Not-Signed-off-by
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [RFC v2 PATCH 00/10] dm-thin/xfs: prototype a block reservation allocation model

Hi all,

This is v2 of the XFS and block device reservation experiment. The significant changes in v2 are that the bdev interface has been condensed to a single callback function, the XFS transaction reservation management has been reworked to make transactions responsible for tracking and releasing excess reservation (for non-delalloc cases) and a workaround for the fallocate over-reservation issue is included. Beyond that, this version adds a bunch of miscellaneous cleanups and fixes some of the nastier locking/leak issues present in the first rfc.

Patches 1-2 refactor some XFS reserve pool and block accounting code in preparation for subsequent patches. Patches 3-5 add block/device-mapper reservation support. Patches 6-10 add the core reservation infrastructure and management bits to XFS. See the link to the original rfc below for instructions and further details around the purpose of this series.

Finally, note that this is still highly experimental/theoretical and should not be used on production systems. Thoughts, reviews, flames appreciated.

Brian

rfcv2:
- Rebased to 4.6.0-rc3.
- Fix compile warnings reported by kbuild.
- Fix reservation leakage on fs ENOSPC.
- Fix mod_fdblocks locking to avoid BUG() (still racy).
- Fix XFS reserve block ENOSPC handling.
- Kill block wrappers, condense get/set/provision to a single callback.
- Update XFS transaction to track reservation, don't release excess on provision.
- Add transaction noblkres mode, use for fallocate reservation optimization.
rfc: http://oss.sgi.com/pipermail/xfs/2016-March/047673.html

Brian Foster (7):
xfs: refactor xfs_reserve_blocks() to handle ENOSPC correctly
xfs: replace xfs_mod_fdblocks() bool param with flags
xfs: thin block device reservation mechanism
xfs: adopt a reserved allocation model on dm-thin devices
xfs: handle bdev reservation ENOSPC correctly from XFS reserved pool
xfs: support no block reservation transaction mode
xfs: use contiguous bdev reservation for file preallocation

Joe Thornber (1):
dm thin: add methods to set and get reserved space

Mike Snitzer (2):
block: add block_device_operations methods to set and get reserved
space
dm: add methods to set and get reserved space

 drivers/md/dm-thin.c          | 181 +++++++++++++++++++++++++++--
 drivers/md/dm.c               |  41 +++++++
 fs/xfs/Makefile               |   1 +
 fs/xfs/libxfs/xfs_alloc.c     |  25 ++++
 fs/xfs/libxfs/xfs_bmap.c      |  17 ++-
 fs/xfs/libxfs/xfs_shared.h    |   2 +
 fs/xfs/xfs_bmap_util.c        |  29 ++++-
 fs/xfs/xfs_fsops.c            | 128 ++++++++++++++-------
 fs/xfs/xfs_mount.c            | 106 +++++++++++++++--
 fs/xfs/xfs_mount.h            |  12 +-
 fs/xfs/xfs_thin.c             | 260 ++++++++++++++++++++++++++++++++++++++++++
 fs/xfs/xfs_thin.h             |  31 +++++
 fs/xfs/xfs_trace.h            |  27 +++++
 fs/xfs/xfs_trans.c            |  94 +++++++++++++--
 fs/xfs/xfs_trans.h            |   1 +
 include/linux/blkdev.h        |   6 +
 include/linux/device-mapper.h |   5 +
 17 files changed, 880 insertions(+), 86 deletions(-)
 create mode 100644 fs/xfs/xfs_thin.c
 create mode 100644 fs/xfs/xfs_thin.h
Signature · 6 lines
2.4.11

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs