Skip to content

Btrfs: tree modification log and qgroup patch set

Jan Schmidt linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest24 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24Btrfs: bugfix: ignore the wrong key for indirect tree block backrefsfs/btrfs/backref.c+135 -500 replies
2/24Btrfs: look into the extent during find_all_leafsfs/btrfs/backref.c fs/btrfs/backref.h+188 -360 replies
3/24Btrfs: 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
4/24Btrfs: move struct seq_list to ctree.hfs/btrfs/ctree.h fs/btrfs/delayed-ref.h+7 -50 replies
5/24Btrfs: dummy extent buffers for tree mod logfs/btrfs/extent_io.c fs/btrfs/extent_io.h+70 -60 replies
6/24Btrfs: add tree mod log to fs_infofs/btrfs/ctree.h fs/btrfs/disk-io.c+14 -00 replies
7/24Btrfs: add tree modification log functionsfs/btrfs/ctree.c fs/btrfs/ctree.h fs/btrfs/disk-io.c+416 -22 replies
8/24Btrfs: put all modifications into the tree mod logfs/btrfs/ctree.c+79 -470 replies
9/24Btrfs: add btrfs_search_old_slotfs/btrfs/ctree.c fs/btrfs/ctree.h+294 -60 replies
10/24Btrfs: use the tree modification log for backref resolvingfs/btrfs/backref.c fs/btrfs/backref.h+29 -170 replies
11/24Btrfs: fs_info variable for join_transactionfs/btrfs/transaction.c+19 -180 replies
12/24Btrfs: tree mod log sanity checks in join_transactionfs/btrfs/transaction.c+9 -00 replies
13/24Btrfs: qgroup on-disk formatfs/btrfs/ctree.h+136 -00 replies
14/24Btrfs: add helper for tree enumerationfs/btrfs/ctree.c fs/btrfs/ctree.h+75 -00 replies
15/24Btrfs: check the root passed to btrfs_end_transactionfs/btrfs/transaction.c fs/btrfs/transaction.h+12 -00 replies
16/24Btrfs: added helper to create new treesfs/btrfs/disk-io.c fs/btrfs/disk-io.h+82 -10 replies
17/24Btrfs: qgroup state and initializationfs/btrfs/ctree.h fs/btrfs/disk-io.c+38 -00 replies
18/24Btrfs: Test code to change the order of delayed-ref processingfs/btrfs/extent-tree.c+50 -10 replies
19/24Btrfs: qgroup implementation and prototypesfs/btrfs/Makefile fs/btrfs/ctree.h fs/btrfs/ioctl.h +1 more+1589 -11 reply
20/24Btrfs: quota tree support and startupfs/btrfs/ctree.h fs/btrfs/disk-io.c fs/btrfs/qgroup.c+44 -80 replies
21/24Btrfs: hooks for qgroup to record delayed refsfs/btrfs/delayed-ref.c fs/btrfs/transaction.c+30 -60 replies
22/24Btrfs: hooks to reserve qgroup spacefs/btrfs/extent-tree.c fs/btrfs/transaction.c fs/btrfs/transaction.h+29 -00 replies
23/24Btrfs: add qgroup ioctlsfs/btrfs/ioctl.c fs/btrfs/ioctl.h+212 -01 reply
24/24Btrfs: add qgroup inheritancefs/btrfs/ioctl.c fs/btrfs/ioctl.h fs/btrfs/transaction.c +1 more+61 -180 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/24] Btrfs: tree modification log and qgroup patch set

This is a combination of three things:

The first commit fixes a false assumption concerning indirect tree block backrefs. That one should definitely go into 3.5, thanks to Alexander Block for finding and testing it.

Commit 2 to 12 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. I'd like to see this in 3.5, too.

Commit 13 to 24 finally add quota groups. This is Arne Jansen's patch set sent last October [1] rebased on top of the reliable backref resolver. See his cover letter and [2] for background and usage information on qgroups. Would be nice if that went into 3.5 as well.

All three stages can be pulled from my git repository, for patch 1 pull:

git://git.jan-o-sch.net/btrfs-unstable backref-bugfix

For patches 1 to 12 pull:

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

For patches 1 to 24 pull:

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

All these 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. Qgroup functionality was tested with a private test we might turn into an xfstest soon.

Test it, break it, report it :-)

-Jan

Arne Jansen (12):
Btrfs: qgroup on-disk format
Btrfs: add helper for tree enumeration
Btrfs: check the root passed to btrfs_end_transaction
Btrfs: added helper to create new trees
Btrfs: qgroup state and initialization
Btrfs: Test code to change the order of delayed-ref processing
Btrfs: qgroup implementation and prototypes
Btrfs: quota tree support and startup
Btrfs: hooks for qgroup to record delayed refs
Btrfs: hooks to reserve qgroup space
Btrfs: add qgroup ioctls
Btrfs: add qgroup inheritance

Jan Schmidt (12):
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 modifications into 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/Makefile      |    2 +-
 fs/btrfs/backref.c     |  424 +++++++++++---
 fs/btrfs/backref.h     |    3 +-
 fs/btrfs/ctree.c       |  927 +++++++++++++++++++++++++++--
 fs/btrfs/ctree.h       |  231 ++++++++-
 fs/btrfs/delayed-ref.c |   29 +-
 fs/btrfs/delayed-ref.h |    5 -
 fs/btrfs/disk-io.c     |  139 ++++-
 fs/btrfs/disk-io.h     |    5 +
 fs/btrfs/extent-tree.c |   73 +++-
 fs/btrfs/extent_io.c   |   73 +++-
 fs/btrfs/extent_io.h   |    3 +
 fs/btrfs/ioctl.c       |  246 +++++++-
 fs/btrfs/ioctl.h       |   62 ++-
 fs/btrfs/qgroup.c      | 1531 ++++++++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/transaction.c |   83 ++-
 fs/btrfs/transaction.h |    8 +
 17 files changed, 3620 insertions(+), 224 deletions(-)
 create mode 100644 fs/btrfs/qgroup.c
Signature · 1 line
1.7.3.4