public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: xfs@oss.sgi.com
Subject: Re: [PATCH v4 00/18] xfs: sparse inode chunks
Date: Fri, 13 Feb 2015 15:07:17 -0500	[thread overview]
Message-ID: <20150213200717.GA7498@laptop.bfoster> (raw)
In-Reply-To: <1423765045-15791-1-git-send-email-bfoster@redhat.com>

On Thu, Feb 12, 2015 at 01:17:07PM -0500, Brian Foster wrote:
> Hi all,
> 
> Here's v4 of sparse inode support for XFS. The changes are primarily
> based on Dave's review comments from v3. The highlights are a refactor
> of the on-disk inobt record format and sparse inode chunk allocation and
> record management code.
> 
> The inobt record refactor introduces a union to distinguish the original
> on-disk format from the new format and an associated change in behavior
> where the in-core record fields can be unconditionally considered valid.
> For example, higher level code can refer to the in-core ir_count field
> regardless of whether the sparse inodes feature is enabled or not. This
> reduces the need for helpers and sb feature check clutter throughout the
> code.
> 
> The sparse chunk allocation refactor cleans up the sparse record
> management code such that record merge and inobt updates do not involve
> multiple tree lookups. It also condenses the sparse record management
> code into a single helper (a la xfs_inobt_insert() for full inode
> chunks) that can be used for the inobt and finobt.
> 
> Patches 1-3 are generic preparation patches that do not depend on sparse
> inode bits. Patches 4-7 introduce the sb alignment field, mount feature
> helpers and associated bits. Patches 8-12 introduce the inobt record
> data structure update and associated bits/helpers. Patches 13-17
> implement the sparse chunk and individual inode allocation and free
> mechanisms. Finally, patch 18 enables the ability to mount sparse inode
> enabled filesystems.
> 
> Thoughts, reviews, flames appreciated...
> 

FYI, having looked a bit into pulling some of this back into userspace,
I think I'm going to try and go back to using some of the native bitmap
routines as done in v1 rather than using the generic bitmap stuff. The
only real benefit I see is the use of bitmap_weight(), and that's just
for a debug mode check. I'm not sure it's worth the divergence the whole
thing creates with userspace.

I'll send a new version once I have something, but I'd appreciate any
feedback on the refactoring in patches 8 and 13 in the meantime...

Brian

> Brian
> 
> v4:
> - 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: helpers to convert holemask to/from generic 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       |  50 +++-
>  fs/xfs/libxfs/xfs_fs.h           |   1 +
>  fs/xfs/libxfs/xfs_ialloc.c       | 533 +++++++++++++++++++++++++++++++++++----
>  fs/xfs/libxfs/xfs_ialloc.h       |  12 +-
>  fs/xfs/libxfs/xfs_ialloc_btree.c | 123 ++++++++-
>  fs/xfs/libxfs/xfs_ialloc_btree.h |  14 +
>  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, 857 insertions(+), 86 deletions(-)
> 
> -- 
> 1.8.3.1
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

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

      parent reply	other threads:[~2015-02-13 20:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 18:17 [PATCH v4 00/18] xfs: sparse inode chunks Brian Foster
2015-02-12 18:17 ` [PATCH v4 01/18] xfs: create individual inode alloc. helper Brian Foster
2015-02-12 18:17 ` [PATCH v4 02/18] xfs: update free inode record logic to support sparse inode records Brian Foster
2015-02-12 18:17 ` [PATCH v4 03/18] xfs: support min/max agbno args in block allocator Brian Foster
2015-02-12 18:17 ` [PATCH v4 04/18] xfs: add sparse inode chunk alignment superblock field Brian Foster
2015-02-12 18:17 ` [PATCH v4 05/18] xfs: use sparse chunk alignment for min. inode allocation requirement Brian Foster
2015-02-12 18:17 ` [PATCH v4 06/18] xfs: sparse inode chunks feature helpers and mount requirements Brian Foster
2015-02-12 18:17 ` [PATCH v4 07/18] xfs: add fs geometry bit for sparse inode chunks Brian Foster
2015-02-12 18:17 ` [PATCH v4 08/18] xfs: introduce inode record hole mask " Brian Foster
2015-02-12 18:17 ` [PATCH v4 09/18] xfs: use actual inode count for sparse records in bulkstat/inumbers Brian Foster
2015-02-12 18:17 ` [PATCH v4 10/18] xfs: pass inode count through ordered icreate log item Brian Foster
2015-02-12 18:17 ` [PATCH v4 11/18] xfs: handle sparse inode chunks in icreate log recovery Brian Foster
2015-02-12 18:17 ` [PATCH v4 12/18] xfs: helpers to convert holemask to/from generic bitmap Brian Foster
2015-02-12 18:17 ` [PATCH v4 13/18] xfs: allocate sparse inode chunks on full chunk allocation failure Brian Foster
2015-02-12 18:17 ` [PATCH v4 14/18] xfs: randomly do sparse inode allocations in DEBUG mode Brian Foster
2015-02-12 18:17 ` [PATCH v4 15/18] xfs: filter out sparse regions from individual inode allocation Brian Foster
2015-02-12 18:17 ` [PATCH v4 16/18] xfs: only free allocated regions of inode chunks Brian Foster
2015-02-12 18:17 ` [PATCH v4 17/18] xfs: skip unallocated regions of inode chunks in xfs_ifree_cluster() Brian Foster
2015-02-12 18:17 ` [PATCH v4 18/18] xfs: enable sparse inode chunks for v5 superblocks Brian Foster
2015-02-13 20:07 ` Brian Foster [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150213200717.GA7498@laptop.bfoster \
    --to=bfoster@redhat.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox