]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: add sequence numbers to delayed refs
authorArne Jansen <sensille@gmx.net>
Wed, 14 Sep 2011 10:37:00 +0000 (12:37 +0200)
committerJan Schmidt <list.btrfs@jan-o-sch.net>
Wed, 4 Jan 2012 15:12:42 +0000 (16:12 +0100)
commit118b61246d569016240b3f60c54b362081c49e33
treefd85a5f4b374aac035388b0cbf8ef572578d5578
parent0b955233ab680f1db4573eb532e969cacbe72aa6
Btrfs: add sequence numbers to delayed refs

Sequence numbers are needed to reconstruct the backrefs of a given extent to
a certain point in time. The total set of backrefs consist of the set of
backrefs recorded on disk plus the enqueued delayed refs for it that existed
at that moment.

This patch also adds a list that records all delayed refs which are
currently in the process of being added.

When walking all refs of an extent in btrfs_find_all_roots(), we freeze the
current state of delayed refs, honor anythinh up to this point and prevent
processing newer delayed refs to assert consistency.

Signed-off-by: Arne Jansen <sensille@gmx.net>
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
fs/btrfs/delayed-ref.c
fs/btrfs/delayed-ref.h
fs/btrfs/transaction.c