git: hammer2 - refactor filesystem sync 4/N
Matthew Dillon
dillon at crater.dragonflybsd.org
Wed Dec 5 14:29:27 PST 2018
commit 6f445d15835c6677a0a79c8d168ef44d0b9b22c3
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Tue Nov 13 13:32:33 2018 -0800
hammer2 - refactor filesystem sync 4/N
* Save synchronized iroot blockmaps for snapshot code, and use them
in the snapshot code.
* Improve dependency handling and syncq/sideq flagging for
dependencies. Also improve the hammer2_inode_t reordering
code that allows the frontend to continue operating on dirty
inodes simultaneous with a filesystem sync.
* Move inode deletion into the filesystem sync code (in addition to
creation), for the same reason.
* Fix lost ref counts in the snapshot code which were causing umount
panics.
* Stabilization pass on volume flush code. Since flushes stop at
inode boundaries, we must properly flush the superroot before
flushing the volume header. That is, the flush sequence is:
- flush inodes for PFS (flushes inode content)
- flush PFS root inode (flushes through to inodes)
- flush superroot inode (flushes through to PFS root)
- flush volume header (flushes voulume header to superroot)
Theoretically this allows the filesystem asynchronously write data
and inodes flushed by the kernel's buffer cache and vnode code
concurrent with a filesystem flush without messing up filesystem
consistency, because these asynchronously flushed inodes are not
included (or have already been flushed) in the filesystem flush that
is already underway.
* Filesystem consistency still not perfect (using snapshot-debug
directive to test during heavy filesystem modification loads,
directory entries are sometimes desynchronized from their inodes).
Summary of changes:
sys/vfs/hammer2/hammer2.h | 6 +-
sys/vfs/hammer2/hammer2_flush.c | 60 +++++--
sys/vfs/hammer2/hammer2_inode.c | 197 ++++++++-------------
sys/vfs/hammer2/hammer2_ioctl.c | 18 +-
sys/vfs/hammer2/hammer2_vfsops.c | 358 ++++++++++++++++++++++++---------------
sys/vfs/hammer2/hammer2_vnops.c | 30 ++--
6 files changed, 368 insertions(+), 301 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6f445d15835c6677a0a79c8d168ef44d0b9b22c3
--
DragonFly BSD source repository
More information about the Commits
mailing list