git: hammer2 - Redo refactor code, fix races, add assertions
Matthew Dillon
dillon at crater.dragonflybsd.org
Sat Sep 28 23:36:42 PDT 2013
commit 294fa5f98cf8540c6be7dc17ae6d8f766846f89e
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Sat Sep 28 23:30:11 2013 -0700
hammer2 - Redo refactor code, fix races, add assertions
* Redo the refactor code which is used to detect when a chain
has been delete-duplicated so the caller can translate a stale
chain pointer into an up-to-date chain pointer.
The new code uses a simple chain flag, HAMMER2_CHAIN_DUPLICATED,
to flag that the original chain is now stale. The old code was
unnecessarily complex.
* Close several holes in the hardlink code where stale chains
were improperly being used as starting points for modifications,
resulting in filesystem corruption.
* Assert the a delete-duplicate is not performed on a stale chain.
Summary of changes:
sys/vfs/hammer2/hammer2.h | 27 +---------
sys/vfs/hammer2/hammer2_chain.c | 48 +++++++++++++----
sys/vfs/hammer2/hammer2_inode.c | 113 +++++++++++++++++-----------------------
3 files changed, 89 insertions(+), 99 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/294fa5f98cf8540c6be7dc17ae6d8f766846f89e
--
DragonFly BSD source repository
More information about the Commits
mailing list