Skip to content

xfs: sparse inode chunks

Brian Foster linux-xfs 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest18 patches 2 repliesIn review
  2. v518 patches 8 repliesSuperseded
  3. v418 patches 1 replySuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v318 patches22 repliesSuperseded
v217 patches6 repliesSuperseded
v1 RFC18 patches31 repliesSuperseded

Changes in v6 from the cover letter · 31 lines

- Rebase to latest for-next (minor fixups).
- Fix corruption bug on multi-inode-chunk per block fs (patch 2).
v5: http://oss.sgi.com/archives/xfs/2015-02/msg00371.html
- Use XFS helpers for allocmask code instead of generic bitmap helpers.
v4: http://oss.sgi.com/archives/xfs/2015-02/msg00240.html
- Rename sb_spinoalignmt to sb_spino_align.
- Clean up error/warning messages.
- Use a union to differentiate old/new xfs_inobt_rec on-disk format. Refactor such that in-core record fields are always valid.
- Rename/move allocmap (bitmap) helper functions and provide extra helper for endian conv.
- Refactor sparse chunk allocation record management code.
- Clean up #ifdef and label usage for DEBUG mode sparse allocs.
- Split up and moved some generic, preparatory hunks earlier in series.
v3: http://oss.sgi.com/archives/xfs/2015-02/msg00110.html
- Rebase to latest for-next (bulkstat rework, data structure shuffling, etc.).
- Fix issparse helper logic.
- Update inode alignment model w/ spinodes enabled. All inode records are chunk size aligned, sparse allocations cluster size aligned (both enforced on mount).
- Reworked sparse inode record merge logic to coincide w/ new alignment model.
- Mark feature as experimental (warn on mount).
- Include and use block allocation agbno range limit to prevent allocation of invalid inode records.
- Add some DEBUG bits to improve sparse alloc. test coverage.
v2: http://oss.sgi.com/archives/xfs/2014-11/msg00007.html
- Use a manually set feature bit instead of dynamic based on the existence of sparse inode chunks.
- Add sb/mp fields for sparse alloc. granularity (use instead of cluster size).
- Undo xfs_inobt_insert() loop removal to avoid breakage of larger page size arches.
- Rename sparse record overlap helper and do XFS_LOOKUP_LE search.
- Use byte of pad space in inobt record for inode count field.
- Convert bitmap mgmt to use generic bitmap code.
- Rename XFS_INODES_PER_SPCHUNK to XFS_INODES_PER_HOLEMASK_BIT.
- Add fs geometry bit for sparse inodes.
- Rebase to latest for-next (bulkstat refactor).
v1: http://oss.sgi.com/archives/xfs/2014-07/msg00355.html

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18xfs: create individual inode alloc. helperfs/xfs/libxfs/xfs_ialloc.c+12 -20 replies
2/18xfs: update free inode record logic to support sparse inode recordsfs/xfs/libxfs/xfs_ialloc.c+12 -40 replies
3/18xfs: support min/max agbno args in block allocatorfs/xfs/libxfs/xfs_alloc.c fs/xfs/libxfs/xfs_alloc.h+39 -50 replies
4/18xfs: add sparse inode chunk alignment superblock fieldfs/xfs/libxfs/xfs_format.h fs/xfs/libxfs/xfs_sb.c+4 -40 replies
5/18xfs: use sparse chunk alignment for min. inode allocation requirementfs/xfs/libxfs/xfs_ialloc.c fs/xfs/libxfs/xfs_sb.c fs/xfs/xfs_mount.h+8 -10 replies
6/18xfs: sparse inode chunks feature helpers and mount requirementsfs/xfs/libxfs/xfs_format.h fs/xfs/libxfs/xfs_sb.c fs/xfs/xfs_mount.c+44 -00 replies
7/18xfs: add fs geometry bit for sparse inode chunksfs/xfs/libxfs/xfs_fs.h fs/xfs/xfs_fsops.c+4 -10 replies
8/18xfs: introduce inode record hole mask for sparse inode chunksfs/xfs/libxfs/xfs_format.h fs/xfs/libxfs/xfs_ialloc.c fs/xfs/libxfs/xfs_ialloc_btree.c+81 -120 replies
9/18xfs: use actual inode count for sparse records in bulkstat/inumbersfs/xfs/xfs_itable.c+8 -50 replies
10/18xfs: pass inode count through ordered icreate log itemfs/xfs/libxfs/xfs_ialloc.c fs/xfs/libxfs/xfs_ialloc.h fs/xfs/xfs_log_recover.c+7 -60 replies
11/18xfs: handle sparse inode chunks in icreate log recoveryfs/xfs/xfs_log_recover.c+16 -60 replies
12/18xfs: helper to convert holemask to inode alloc. bitmapfs/xfs/libxfs/xfs_ialloc_btree.c fs/xfs/libxfs/xfs_ialloc_btree.h+54 -00 replies
13/18xfs: allocate sparse inode chunks on full chunk allocation failurefs/xfs/libxfs/xfs_ialloc.c fs/xfs/libxfs/xfs_ialloc_btree.c fs/xfs/libxfs/xfs_ialloc_btree.h +1 more+401 -140 replies
14/18xfs: randomly do sparse inode allocations in DEBUG modefs/xfs/libxfs/xfs_ialloc.c+13 -20 replies
15/18xfs: filter out sparse regions from individual inode allocationfs/xfs/libxfs/xfs_ialloc.c+13 -20 replies
16/18xfs: only free allocated regions of inode chunksfs/xfs/libxfs/xfs_ialloc.c+78 -30 replies
17/18xfs: skip unallocated regions of inode chunks in xfs_ifree_cluster()fs/xfs/libxfs/xfs_ialloc.c fs/xfs/libxfs/xfs_ialloc.h fs/xfs/xfs_inode.c+35 -200 replies
18/18xfs: enable sparse inode chunks for v5 superblocksfs/xfs/libxfs/xfs_format.h+2 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH v6 00/18] xfs: sparse inode chunks

Hi all,

Here's a v6 of sparse inode chunks. This fixes a bug on large block size filesystems where an inode chunk was being incorrectly freed. The problem was that patch 2 changed the previously implicit behavior of never freeing an inode chunk on filesystems where the block size is large enough for multiple chunks (e.g., bsize=64k, isize<=512). Patch 2 has been fixed to preserve original behavior.

There have also been some minor fixups throughout associated with a rebase to the latest for-next. This includes killing some old sb logging bits and passing mp to XFS_WANT_CORRUPTED_GOTO().

Brian

v6:
- Rebase to latest for-next (minor fixups).
- Fix corruption bug on multi-inode-chunk per block fs (patch 2).
v5: http://oss.sgi.com/archives/xfs/2015-02/msg00371.html
- Use XFS helpers for allocmask code instead of generic bitmap helpers.
v4: http://oss.sgi.com/archives/xfs/2015-02/msg00240.html
- Rename sb_spinoalignmt to sb_spino_align.
- Clean up error/warning messages.
- Use a union to differentiate old/new xfs_inobt_rec on-disk format. Refactor such that in-core record fields are always valid.
- Rename/move allocmap (bitmap) helper functions and provide extra helper for endian conv.
- Refactor sparse chunk allocation record management code.
- Clean up #ifdef and label usage for DEBUG mode sparse allocs.
- Split up and moved some generic, preparatory hunks earlier in series.
v3: http://oss.sgi.com/archives/xfs/2015-02/msg00110.html
- Rebase to latest for-next (bulkstat rework, data structure shuffling, etc.).
- Fix issparse helper logic.
- Update inode alignment model w/ spinodes enabled. All inode records are chunk size aligned, sparse allocations cluster size aligned (both enforced on mount).
- Reworked sparse inode record merge logic to coincide w/ new alignment model.
- Mark feature as experimental (warn on mount).
- Include and use block allocation agbno range limit to prevent allocation of invalid inode records.
- Add some DEBUG bits to improve sparse alloc. test coverage.
v2: http://oss.sgi.com/archives/xfs/2014-11/msg00007.html
- Use a manually set feature bit instead of dynamic based on the existence of sparse inode chunks.
- Add sb/mp fields for sparse alloc. granularity (use instead of cluster size).
- Undo xfs_inobt_insert() loop removal to avoid breakage of larger page size arches.
- Rename sparse record overlap helper and do XFS_LOOKUP_LE search.
- Use byte of pad space in inobt record for inode count field.
- Convert bitmap mgmt to use generic bitmap code.
- Rename XFS_INODES_PER_SPCHUNK to XFS_INODES_PER_HOLEMASK_BIT.
- Add fs geometry bit for sparse inodes.
- Rebase to latest for-next (bulkstat refactor).
v1: http://oss.sgi.com/archives/xfs/2014-07/msg00355.html

Brian Foster (18):
xfs: create individual inode alloc. helper
xfs: update free inode record logic to support sparse inode records
xfs: support min/max agbno args in block allocator
xfs: add sparse inode chunk alignment superblock field
xfs: use sparse chunk alignment for min. inode allocation requirement
xfs: sparse inode chunks feature helpers and mount requirements
xfs: add fs geometry bit for sparse inode chunks
xfs: introduce inode record hole mask for sparse inode chunks
xfs: use actual inode count for sparse records in bulkstat/inumbers
xfs: pass inode count through ordered icreate log item
xfs: handle sparse inode chunks in icreate log recovery
xfs: helper to convert holemask to inode alloc. bitmap
xfs: allocate sparse inode chunks on full chunk allocation failure
xfs: randomly do sparse inode allocations in DEBUG mode
xfs: filter out sparse regions from individual inode allocation
xfs: only free allocated regions of inode chunks
xfs: skip unallocated regions of inode chunks in xfs_ifree_cluster()
xfs: enable sparse inode chunks for v5 superblocks

 fs/xfs/libxfs/xfs_alloc.c        |  42 ++-
 fs/xfs/libxfs/xfs_alloc.h        |   2 +
 fs/xfs/libxfs/xfs_format.h       |  48 +++-
 fs/xfs/libxfs/xfs_fs.h           |   1 +
 fs/xfs/libxfs/xfs_ialloc.c       | 541 +++++++++++++++++++++++++++++++++++----
 fs/xfs/libxfs/xfs_ialloc.h       |  12 +-
 fs/xfs/libxfs/xfs_ialloc_btree.c |  93 ++++++-
 fs/xfs/libxfs/xfs_ialloc_btree.h |  10 +
 fs/xfs/libxfs/xfs_sb.c           |  30 ++-
 fs/xfs/xfs_fsops.c               |   4 +-
 fs/xfs/xfs_inode.c               |  28 +-
 fs/xfs/xfs_itable.c              |  13 +-
 fs/xfs/xfs_log_recover.c         |  26 +-
 fs/xfs/xfs_mount.c               |  16 ++
 fs/xfs/xfs_mount.h               |   2 +
 fs/xfs/xfs_trace.h               |  47 ++++
 16 files changed, 829 insertions(+), 86 deletions(-)
Signature · 6 lines
1.9.3

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