All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] xfs: refactor and tablise growfs
@ 2018-02-01  6:41 Dave Chinner
  2018-02-01  6:41 ` [PATCH 1/7] xfs: factor out AG header initialisation from growfs core Dave Chinner
                   ` (7 more replies)
  0 siblings, 8 replies; 32+ messages in thread
From: Dave Chinner @ 2018-02-01  6:41 UTC (permalink / raw)
  To: linux-xfs

Hi folks,

This is a series I posted months ago with the first thinspace
filesystem support. There was no comments on any of these patches
because all the heat and light got focussed on the growfs API.
I'm posting this separately to avoid that problem again....

Anyway, the core of this change is to make the growfs code much
simpler to extend. Most of the code that does structure
initialisation is cookie-cutter code and it's whacked into one great
big function. This patch set splits it up into separate functions
and uses common helper functions where possible. The different
structures and their initialisation definitions are now held in a
table, so when we add new stuctures or modify existing structures
it's a simple and isolate change.

The reworked initialisation code is suitable for moving to libxfs
and converting mkfs.xfs to use it for the initial formatting of
the filesystem. This will take more work to acheive, so this
patch set stops short of moving the code to libxfs.

The other changes to the growfs code in this patchset also isolate
separate parts of the growfs functionality, such as updating the
secondary superblocks and changing imaxpct. This makes adding
thinspace functionality to growfs much easier.

Finally, there are optimisations to make a large AG count growfs
much faster. Instead of initialising and writing headers one at a
time synchronously, they are added to a delwri buffer list and
written in bulk and asynchronously. This means AG headers get merged
by the block layer and it can reduce the IO wait time by an order of
magnitude or more.

There are also mods to the secondary superblock update algorithm
which make it more resilient in the face of writeback failures. We
use a two pass update now - the main growfs loop now initialised
secondary superblocks with sb_inprogess = 1 to indicate it is not
in a valid state before we make any modifications, then after teh
transactional grow we do a second pass to set sb_inprogess = 0 and
mark them valid.

This means that if we fail to write any secondary superblock, repair
is not going to get confused by partial grow state. If we crash
during the initial write, nothing has changed in the primary
superblock. If we crash after the primary sb grow, then we'll know
exactly what secondary superblocks did not get updated because
they'll be the ones with sb_inprogress = 1 in them. Hence the
recovery process becomes much easier as the parts of the fs that
need updating are obvious....

Cheers,

Dave.


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

end of thread, other threads:[~2018-03-24  0:37 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-01  6:41 [PATCH 0/7] xfs: refactor and tablise growfs Dave Chinner
2018-02-01  6:41 ` [PATCH 1/7] xfs: factor out AG header initialisation from growfs core Dave Chinner
2018-02-08 18:53   ` Brian Foster
2018-02-01  6:41 ` [PATCH 2/7] xfs: convert growfs AG header init to use buffer lists Dave Chinner
2018-02-08 18:53   ` Brian Foster
2018-02-01  6:41 ` [PATCH 3/7] xfs: factor ag btree reoot block initialisation Dave Chinner
2018-02-08 18:54   ` Brian Foster
2018-02-08 20:00     ` Darrick J. Wong
2018-02-09 13:10       ` Brian Foster
2018-02-12  0:45         ` Darrick J. Wong
2018-02-15  5:53           ` Darrick J. Wong
2018-02-01  6:41 ` [PATCH 4/7] xfs: turn ag header initialisation into a table driven operation Dave Chinner
2018-02-09 16:11   ` Brian Foster
2018-02-01  6:42 ` [PATCH 5/7] xfs: make imaxpct changes in growfs separate Dave Chinner
2018-02-09 16:11   ` Brian Foster
2018-02-15 22:10     ` Dave Chinner
2018-02-01  6:42 ` [PATCH 6/7] xfs: separate secondary sb update in growfs Dave Chinner
2018-02-09 16:11   ` Brian Foster
2018-02-15 22:23     ` Dave Chinner
2018-02-16 12:31       ` Brian Foster
2018-02-01  6:42 ` [PATCH 7/7] xfs: rework secondary superblock updates " Dave Chinner
2018-02-09 16:12   ` Brian Foster
2018-02-15 22:31     ` Dave Chinner
2018-02-16 12:56       ` Brian Foster
2018-02-16 16:20         ` Darrick J. Wong
2018-02-19  2:16         ` Dave Chinner
2018-02-19 13:21           ` Brian Foster
2018-02-19 22:14             ` Dave Chinner
2018-02-20 12:44               ` Brian Foster
2018-03-24  0:37                 ` Darrick J. Wong
2018-02-06 23:44 ` [PATCH 0/7] xfs: refactor and tablise growfs Darrick J. Wong
2018-02-07  7:10   ` Dave Chinner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.