]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - libxfs/xfs_rmap.h
xfs: propagate bmap updates to rmapbt
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 10 Aug 2016 04:52:14 +0000 (14:52 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 10 Aug 2016 04:52:14 +0000 (14:52 +1000)
commitd7f80320a50ecbe6fab8a254ad3217683e1836b3
tree07e414671e9bda661ffd04a8491fdce899927588
parent589b52d6814a97b95143c5ec4b67e8451b996f7c
xfs: propagate bmap updates to rmapbt

Source kernel commit: 9c19464469556a0cd342fc40a24926ab46d7d243

When we map, unmap, or convert an extent in a file's data or attr
fork, schedule a respective update in the rmapbt.  Previous versions
of this patch required a 1:1 correspondence between bmap and rmap,
but this is no longer true as we now have ability to make interval
queries against the rmapbt.

We use the deferred operations code to handle redo operations
atomically and deadlock free.  This plumbs in all five rmap actions
(map, unmap, convert extent, alloc, free); we'll use the first three
now for file data, and reflink will want the last two.  We also add
an error injection site to test log recovery.

Finally, we need to fix the bmap shift extent code to adjust the
rmaps correctly.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
include/xfs_trace.h
libxfs/xfs_bmap.c
libxfs/xfs_rmap.c
libxfs/xfs_rmap.h