Skip to content

Btrfs: tree modification log

Jan Schmidt linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest15 patches 2 repliesIn review

Changes in v2 from the cover letter

- qgroups patches removed
- ulist realloc bugfix added (reported by Alexander Block)
- btrfs_find_parent_nodes bugfix (reported by Alexander Block)
- various smaller bugs in the v1 patch set fixed (reported by Alexander Block, Tsutomu Itoh and myself)
--

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15Btrfs: ulist realloc bugfixfs/btrfs/backref.c fs/btrfs/ulist.c fs/btrfs/ulist.h+29 -210 replies
2/15Btrfs: bugfix in btrfs_find_parent_nodesfs/btrfs/backref.c+3 -20 replies
3/15Btrfs: bugfix: ignore the wrong key for indirect tree block backrefsfs/btrfs/backref.c+135 -500 replies
4/15Btrfs: look into the extent during find_all_leafsfs/btrfs/backref.c fs/btrfs/backref.h+158 -840 replies
5/15Btrfs: don't set for_cow parameter for tree block functionsfs/btrfs/ctree.c fs/btrfs/ctree.h fs/btrfs/disk-io.c +2 more+20 -200 replies
6/15Btrfs: move struct seq_list to ctree.hfs/btrfs/ctree.h fs/btrfs/delayed-ref.h+7 -50 replies
7/15Btrfs: dummy extent buffers for tree mod logfs/btrfs/extent_io.c fs/btrfs/extent_io.h+76 -70 replies
8/15Btrfs: add tree mod log to fs_infofs/btrfs/ctree.h fs/btrfs/disk-io.c+14 -00 replies
9/15Btrfs: add tree modification log functionsfs/btrfs/ctree.c fs/btrfs/ctree.h+413 -10 replies
10/15Btrfs: put all block modifications into the tree mod logfs/btrfs/ctree.c+39 -00 replies
11/15Btrfs: add del_ptr and insert_ptr modifications to the tree mod logfs/btrfs/ctree.c+32 -100 replies
12/15Btrfs: add btrfs_search_old_slotfs/btrfs/ctree.c fs/btrfs/ctree.h+317 -40 replies
13/15Btrfs: use the tree modification log for backref resolvingfs/btrfs/backref.c fs/btrfs/backref.h+29 -170 replies
14/15Btrfs: fs_info variable for join_transactionfs/btrfs/transaction.c+19 -180 replies
15/15Btrfs: tree mod log sanity checks in join_transactionfs/btrfs/transaction.c+9 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/15] Btrfs: tree modification log

Chris: Please pull

git://git.jan-o-sch.net/btrfs-unstable for-chris

for 3.5, it's a major improvement for the backref resolver and a good base to build qgroups and "btrfs send" onto. And, besides all other, its implications on existing code outside backref.c are very small, mostly added lines with no effect outside the backref resolver.

This patch set is to provide reliable backref resolving on busy trees. The previous attempts to block certain tree modifications while we're resolving backrefs all ended up in (dead-) locking nightmares. What we now do is we record all the changes we make to fs trees while backref resolving is in progress into a tree modification log. During backref resolving we then merge the current state of the tree with the recorded modifications to get a consistent previous state of the tree.

The first three commits are plain bug fixes, but the tree mod log cannot function without them. So they're included in this patch set. To only these three fixes, you can pull

	git://git.jan-o-sch.net/btrfs-unstable 3.5-fixes

For the whole tree modification log, pull

git://git.jan-o-sch.net/btrfs-unstable tree-mod-log-v2

The tree-mod-log-v2 head is a stable alias for "for-chris".

Both branches are based on the current for-linus branch from Chris' repository. Checked with xfstests (fails 254 273 275, which i claim has nothing to do with this patch set) and hammered on the filesystem with fs_mark while resolving backrefs in a loop.

I removed the qgroups patch series still contained in v1 because I realized that the fs_mark tests I was doing weren't sufficient. When testing qgroups with fsstress only for a few seconds, the accounting breaks. Nothing really bad happens, but quota patches that don't get quotas right are of litte use. A new qgroup patch set might come out soon, but it won't make it into 3.5. There's a branch in my git repo called tree-mod-log-quota-v1+fixes holding the current qgroup state.

Test it, break it, report it :-)

-Jan

--
Changes v1->v2:
- qgroups patches removed
- ulist realloc bugfix added (reported by Alexander Block)
- btrfs_find_parent_nodes bugfix (reported by Alexander Block)
- various smaller bugs in the v1 patch set fixed (reported by Alexander Block, Tsutomu Itoh and myself)
--

Jan Schmidt (15):
Btrfs: ulist realloc bugfix
Btrfs: bugfix in btrfs_find_parent_nodes
Btrfs: bugfix: ignore the wrong key for indirect tree block backrefs
Btrfs: look into the extent during find_all_leafs
Btrfs: don't set for_cow parameter for tree block functions
Btrfs: move struct seq_list to ctree.h
Btrfs: dummy extent buffers for tree mod log
Btrfs: add tree mod log to fs_info
Btrfs: add tree modification log functions
Btrfs: put all block modifications into the tree mod log
Btrfs: add del_ptr and insert_ptr modifications to the tree mod log
Btrfs: add btrfs_search_old_slot
Btrfs: use the tree modification log for backref resolving
Btrfs: fs_info variable for join_transaction
Btrfs: tree mod log sanity checks in join_transaction

 fs/btrfs/backref.c     |  465 +++++++++++++++++++---------
 fs/btrfs/backref.h     |    3 +-
 fs/btrfs/ctree.c       |  831 ++++++++++++++++++++++++++++++++++++++++++++++--
 fs/btrfs/ctree.h       |   27 ++-
 fs/btrfs/delayed-ref.h |    5 -
 fs/btrfs/disk-io.c     |    7 +-
 fs/btrfs/extent-tree.c |   10 +-
 fs/btrfs/extent_io.c   |   80 +++++-
 fs/btrfs/extent_io.h   |    3 +
 fs/btrfs/ioctl.c       |    2 +-
 fs/btrfs/transaction.c |   46 ++-
 fs/btrfs/ulist.c       |   23 +-
 fs/btrfs/ulist.h       |    9 +-
 13 files changed, 1286 insertions(+), 225 deletions(-)
Signature · 1 line
1.7.3.4