git: DragonFly_RELEASE_5_4 hammer2 - refactor filesystem sync 1/N
dillon at crater.dragonflybsd.org
Mon Dec 17 13:55:52 PST 2018
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Sun Nov 4 17:31:07 2018 -0800
hammer2 - refactor filesystem sync 1/N
* Change H2 to allow concurrent filesystem sync and modifying
* FLUSH transactions no longer block modifying frontend
* Change filesystem sync operation to put all modified
inodes on the pmp->syncq (which is also combined with
any inodes on pmp->sideq), and then iterating the
syncq to flush each inode.
After this is done, stage 2 will flush the meta-data tree
leading to each inode.
This code will also handle delayed inode creation and
destruction ops, which require modifications to the meta-data
tree governing the inodes themselves (so we don't want the
frontend to do it and interfere with the flush).
* Modifying operations against inodes already queued for a
filesystem sync that is in progress will now reorder the
inode to the front of the filesystem sync in progress and
wait for the sync on that inode to complete before proceeding.
This is handled by blocking in the exclusive inode lock code.
* hammer2_inode_get() does not need to pass 'dip' any more
because regular inodes are inserted under the iroot (PFS root
inode) and no longer inserted hierarchically.
* Separate out hammer2_inode_create() into hammer2_inode_create_pfs()
and hammer2_inode_create_normal(). These two forms are now distinct
enough that the code is a mess if we try to leave them combined.
Summary of changes:
sys/vfs/hammer2/hammer2.h | 68 +++++--
sys/vfs/hammer2/hammer2_flush.c | 48 ++---
sys/vfs/hammer2/hammer2_inode.c | 398 ++++++++++++++++++++++++--------------
sys/vfs/hammer2/hammer2_ioctl.c | 25 +--
sys/vfs/hammer2/hammer2_synchro.c | 2 +-
sys/vfs/hammer2/hammer2_vfsops.c | 183 ++++++++++++------
sys/vfs/hammer2/hammer2_vnops.c | 56 +++---
7 files changed, 488 insertions(+), 292 deletions(-)
DragonFly BSD source repository
More information about the Commits