public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/17] xfs: sparse inode chunks
@ 2014-11-03 16:12 Brian Foster
  2014-11-03 16:12 ` [PATCH v2 01/17] xfs: add sparse inode chunk alignment superblock field Brian Foster
                   ` (16 more replies)
  0 siblings, 17 replies; 24+ messages in thread
From: Brian Foster @ 2014-11-03 16:12 UTC (permalink / raw)
  To: xfs

Hi all,

Here's another pass of sparse inode chunk support. There are still some
outstanding things to resolve, but I think this hits on some of the
larger comments of v1 and serves as a decent checkpoint.

My biggest open question at this point is how to handle backwards
compatibility in relation to the behavior of the new ir_count field
introduced in v2. The current behavior is to use ir_count whenever
sparse inode chunk support is enabled (from a feature bit perspective,
see xfs_inobt_insert()). The side effect of this is that backwards
compatibility is no longer solely tied to the existence of sparse inode
chunks. In other words, we cannot simply toggle off a feature bit for
fs' without sparse inode allocations, as the existing allocations have
an ir_count == 64 value in the upper bytes of the old ir_free field.

We can follow a couple alternate directions that I can think of:

- Only use ir_count for actual sparse chunks. E.g., ir_count == 0 for
  chunks with XFS_INODES_PER_CHUNK inodes. 
- Always use ir_count when feature bit enabled, consider inverting
  ir_holemask to ir_allocmask or some such to simplify.

The further I progress on this work, the more I think the backwards
compatibility has limited utility, poor cost-benefit and I lean towards
the second approach.

That said, I don't necessarily see a problem with retaining the
backwards compatible nature of the on-disk structures with the
understanding that the ability for such conversions probably will not be
provided in the near term. E.g., backwards compat. simply becomes a
design characteristic to leave the window open for future work. But I'm
also not a huge fan of letting some unknown conversion mechanism from
the future put too many constraints on simplification of an existing
design. E.g., what's the point if the end result ends up being some kind
of userspace conversion via xfs_repair (for example) that can track
sparse chunks and fix up the records appropriately?

Thoughts?

Brian

v2:
- 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 (17):
  xfs: add sparse inode chunk alignment superblock field
  xfs: use sparse chunk alignment for min. inode allocation requirement
  xfs: define sparse inode chunks v5 sb feature bit and helper function
  xfs: introduce inode record hole mask for sparse inode chunks
  xfs: create macros/helpers for dealing with sparse inode chunks
  xfs: pass inode count through ordered icreate log item
  xfs: handle sparse inode chunks in icreate log recovery
  xfs: create helper to manage record overlap for sparse inode chunks
  xfs: allocate sparse inode chunks on full chunk allocation failure
  xfs: helpers to convert holemask to/from generic bitmap
  xfs: filter out sparse regions from individual inode allocation
  xfs: update free inode record logic to support sparse inode records
  xfs: only free allocated regions of inode chunks
  xfs: skip unallocated regions of inode chunks in xfs_ifree_cluster()
  xfs: use actual inode count for sparse records in bulkstat/inumbers
  xfs: add fs geometry bit for sparse inode chunks
  xfs: enable sparse inode chunks for v5 superblocks

 fs/xfs/libxfs/xfs_format.h       |  17 +-
 fs/xfs/libxfs/xfs_ialloc.c       | 456 ++++++++++++++++++++++++++++++++++++---
 fs/xfs/libxfs/xfs_ialloc.h       |  17 +-
 fs/xfs/libxfs/xfs_ialloc_btree.c |   4 +-
 fs/xfs/libxfs/xfs_sb.c           |   9 +-
 fs/xfs/libxfs/xfs_sb.h           |  16 +-
 fs/xfs/xfs_fs.h                  |   1 +
 fs/xfs/xfs_fsops.c               |   4 +-
 fs/xfs/xfs_inode.c               |  28 ++-
 fs/xfs/xfs_itable.c              |  16 +-
 fs/xfs/xfs_log_recover.c         |  23 +-
 fs/xfs/xfs_mount.h               |   2 +
 12 files changed, 525 insertions(+), 68 deletions(-)

-- 
1.8.3.1

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2014-11-04 12:15 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-03 16:12 [PATCH v2 00/17] xfs: sparse inode chunks Brian Foster
2014-11-03 16:12 ` [PATCH v2 01/17] xfs: add sparse inode chunk alignment superblock field Brian Foster
2014-11-03 16:12 ` [PATCH v2 02/17] xfs: use sparse chunk alignment for min. inode allocation requirement Brian Foster
2014-11-03 16:12 ` [PATCH v2 03/17] xfs: define sparse inode chunks v5 sb feature bit and helper function Brian Foster
2014-11-03 16:12 ` [PATCH v2 04/17] xfs: introduce inode record hole mask for sparse inode chunks Brian Foster
2014-11-03 16:12 ` [PATCH v2 05/17] xfs: create macros/helpers for dealing with " Brian Foster
2014-11-03 22:12   ` Fanael Linithien
2014-11-03 22:34     ` Brian Foster
2014-11-03 23:56       ` Fanael Linithien
2014-11-04  1:33         ` Dave Chinner
2014-11-04 12:15           ` Brian Foster
2014-11-04 12:14         ` Brian Foster
2014-11-03 16:12 ` [PATCH v2 06/17] xfs: pass inode count through ordered icreate log item Brian Foster
2014-11-03 16:12 ` [PATCH v2 07/17] xfs: handle sparse inode chunks in icreate log recovery Brian Foster
2014-11-03 16:12 ` [PATCH v2 08/17] xfs: create helper to manage record overlap for sparse inode chunks Brian Foster
2014-11-03 16:12 ` [PATCH v2 09/17] xfs: allocate sparse inode chunks on full chunk allocation failure Brian Foster
2014-11-03 16:12 ` [PATCH v2 10/17] xfs: helpers to convert holemask to/from generic bitmap Brian Foster
2014-11-03 16:12 ` [PATCH v2 11/17] xfs: filter out sparse regions from individual inode allocation Brian Foster
2014-11-03 16:12 ` [PATCH v2 12/17] xfs: update free inode record logic to support sparse inode records Brian Foster
2014-11-03 16:12 ` [PATCH v2 13/17] xfs: only free allocated regions of inode chunks Brian Foster
2014-11-03 16:12 ` [PATCH v2 14/17] xfs: skip unallocated regions of inode chunks in xfs_ifree_cluster() Brian Foster
2014-11-03 16:12 ` [PATCH v2 15/17] xfs: use actual inode count for sparse records in bulkstat/inumbers Brian Foster
2014-11-03 16:12 ` [PATCH v2 16/17] xfs: add fs geometry bit for sparse inode chunks Brian Foster
2014-11-03 16:12 ` [PATCH v2 17/17] xfs: enable sparse inode chunks for v5 superblocks Brian Foster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox