From: Dave Chinner <david@fromorbit.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH v2] xfs: refactor and tablise growfs
Date: Sat, 12 May 2018 08:50:57 +1000 [thread overview]
Message-ID: <20180511225107.27171-1-david@fromorbit.com> (raw)
Hi folks,
This is an update of the patch set I sent a while ago, and
Eric and Darrick have been bugging me to get sorted. The last
posting was here:
https://marc.info/?l=linux-xfs&m=151746732826277&w=2
This update addresses most of the comments that were made at the
time. most importantly, it gets rid of the use of uncached buffers
for secondary superblocks. Instead, I introduced a small helper to
mark a buffer as a "one-shot" buffer, which will cause the buffer to
be reclaimed when all active references go away rather than being
put on the LRU. If teh buffer is already on the LRU, then it
respects that and does not change the buffer behaviour (similar to
XFS_IGET_DONTCACHE for inodes). THis means the growfs code will
play nicely with scrub and other occasional users of secondary
superblocks, but not add any long term cache footprint.
The other addition since the last posting is moving all the code
that does the AG header setup to libxfs so it canbe shared with
userspace(*). Most of the functions have been moved to new files
fs/xfs/libxfs/xfs_ag.[ch], but the secondary superblock update got
moved to fs/xfs/libxfs/xfs_sb.c, because it's purely about
superblock updates.
The pastchset just passed an overnight QA run on v4 and v5
filesystems w/ both 1k and 4k block sizes.
Comments?
-Dave.
Version 2:
- rebase on current for-next
- add oneshot cached buffer support
- clean up more of the typedef usage.
- move id->nfree calc to per-ag hdr init function from the freespace
btree root initialisation.
- only use id->type and id->numrecs for the generic btree root block
init calls.
- only call xfs_growfs_data_private() if the size is actually being
changed.
- make sure we still update secondary superblocks if physical grow
fails with ENOSPC.
- change secondary superblock updates to use cached one-shot
buffers.
- moved the core code to libxfs so it can be shared easily with
userspace.
(*) e.g. mkfs. More interestingly, this provides a mechanism for a
simple offline grow implementation to be added to xfs_spaceman for
vm/container deployment infrastructures that have to mount an fs
image just to grow it during their setup phase.
next reply other threads:[~2018-05-11 22:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 22:50 Dave Chinner [this message]
2018-05-11 22:50 ` [PATCH 01/10] xfs: one-shot cached buffers Dave Chinner
2018-05-12 0:24 ` Darrick J. Wong
2018-05-12 2:06 ` Dave Chinner
2018-05-12 2:08 ` Darrick J. Wong
2018-05-11 22:50 ` [PATCH 02/10] xfs: factor out AG header initialisation from growfs core Dave Chinner
2018-05-12 0:36 ` Darrick J. Wong
2018-05-11 22:51 ` [PATCH 03/10] xfs: convert growfs AG header init to use buffer lists Dave Chinner
2018-05-12 0:39 ` Darrick J. Wong
2018-05-11 22:51 ` [PATCH 04/10] xfs: factor ag btree root block initialisation Dave Chinner
2018-05-12 0:48 ` Darrick J. Wong
2018-05-12 2:01 ` Dave Chinner
2018-05-11 22:51 ` [PATCH 05/10] xfs: turn ag header initialisation into a table driven operation Dave Chinner
2018-05-12 0:55 ` Darrick J. Wong
2018-05-12 2:03 ` Dave Chinner
2018-05-12 2:05 ` Darrick J. Wong
2018-05-11 22:51 ` [PATCH 06/10] xfs: make imaxpct changes in growfs separate Dave Chinner
2018-05-12 0:57 ` Darrick J. Wong
2018-05-11 22:51 ` [PATCH 07/10] xfs: separate secondary sb update in growfs Dave Chinner
2018-05-12 1:20 ` Darrick J. Wong
2018-05-11 22:51 ` [PATCH 08/10] xfs: rework secondary superblock updates " Dave Chinner
2018-05-12 1:47 ` Darrick J. Wong
2018-05-11 22:51 ` [PATCH 09/10] xfs: move growfs core to libxfs Dave Chinner
2018-05-12 1:48 ` Darrick J. Wong
2018-05-11 22:51 ` [PATCH 10/10] xfs: factor the ag length extension code into libxfs Dave Chinner
2018-05-12 1:48 ` Darrick J. Wong
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=20180511225107.27171-1-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).