linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/9] Btrfs: free space B-tree
@ 2015-09-14  6:04 Omar Sandoval
  2015-09-14  6:04 ` [PATCH v3 1/9] Btrfs: add extent buffer bitmap operations Omar Sandoval
                   ` (11 more replies)
  0 siblings, 12 replies; 18+ messages in thread
From: Omar Sandoval @ 2015-09-14  6:04 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Omar Sandoval

Hi, everyone,

I went back and fixed the issues that came up since v2. Changes below. I
removed Josef's Reviewed-by on patch 9 because it was completely
rewritten to change the mount options like Dave suggested. These are
still based on 4.2

Thanks!

Changes from v2->v3:

- Fixed a warning in the free space tree sanity tests caught by Zhao Lei.
- Moved the addition of a block group to the free space tree to occur either on
  the first attempt to modify the free space for the block group or in
  btrfs_create_pending_block_groups(), whichever happens first. This avoids a
  deadlock (lock recursion) when modifying the free space tree requires
  allocating a new block group. In order to do this, it was simpler to change
  the on-disk semantics: the superblock stripes will now appear to be free space
  according to the free space tree, but load_free_space_tree() will still
  exclude them when building the in-memory free space cache.
- Changed the free_space_tree option to space_cache=v2 and made clear_cache
  clear the free space tree. If the free space tree has been created,
  the mount will fail unless space_cache=v2 or nospace_cache,clear_cache
  is given because we cannot allow the free space tree to get out of
  date.
- Did a once-over of the code and caught a couple of error handling typos.

v2: http://www.spinics.net/lists/linux-btrfs/msg46796.html

Changes from v1->v2:

- Cleaned up a bunch of unnecessary instances of "if (ret) goto out; ret = 0"
- Added aborts in the free space tree code closer to the site the error is
  encountered: where we add or remove block groups, add or remove free space,
  and also when we convert formats
- Moved loading of the free space tree into caching_thread() and added a new
  patch 3 in preparation for it
- Commented a bunch of stuff in the extent buffer bitmap operations and
  refactored some of the complicated logic

v1: http://www.spinics.net/lists/linux-btrfs/msg46713.html

Omar Sandoval (9):
  Btrfs: add extent buffer bitmap operations
  Btrfs: add extent buffer bitmap sanity tests
  Btrfs: add helpers for read-only compat bits
  Btrfs: refactor caching_thread()
  Btrfs: introduce the free space B-tree on-disk format
  Btrfs: implement the free space B-tree
  Btrfs: add free space tree sanity tests
  Btrfs: wire up the free space tree to the extent tree
  Btrfs: add free space tree mount option

 fs/btrfs/Makefile                      |    5 +-
 fs/btrfs/ctree.h                       |  157 +++-
 fs/btrfs/disk-io.c                     |   38 +
 fs/btrfs/extent-tree.c                 |   98 +-
 fs/btrfs/extent_io.c                   |  183 +++-
 fs/btrfs/extent_io.h                   |   10 +-
 fs/btrfs/free-space-tree.c             | 1581 ++++++++++++++++++++++++++++++++
 fs/btrfs/free-space-tree.h             |   72 ++
 fs/btrfs/super.c                       |   56 +-
 fs/btrfs/tests/btrfs-tests.c           |   52 ++
 fs/btrfs/tests/btrfs-tests.h           |   10 +
 fs/btrfs/tests/extent-io-tests.c       |  138 ++-
 fs/btrfs/tests/free-space-tests.c      |   35 +-
 fs/btrfs/tests/free-space-tree-tests.c |  571 ++++++++++++
 fs/btrfs/tests/qgroup-tests.c          |   20 +-
 include/trace/events/btrfs.h           |    3 +-
 16 files changed, 2922 insertions(+), 107 deletions(-)
 create mode 100644 fs/btrfs/free-space-tree.c
 create mode 100644 fs/btrfs/free-space-tree.h
 create mode 100644 fs/btrfs/tests/free-space-tree-tests.c

-- 
2.5.2


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-09-15  2:56 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14  6:04 [PATCH v3 0/9] Btrfs: free space B-tree Omar Sandoval
2015-09-14  6:04 ` [PATCH v3 1/9] Btrfs: add extent buffer bitmap operations Omar Sandoval
2015-09-14  6:04 ` [PATCH v3 2/9] Btrfs: add extent buffer bitmap sanity tests Omar Sandoval
2015-09-14  6:04 ` [PATCH v3 3/9] Btrfs: add helpers for read-only compat bits Omar Sandoval
2015-09-14  6:04 ` [PATCH v3 4/9] Btrfs: refactor caching_thread() Omar Sandoval
2015-09-14  6:04 ` [PATCH v3 5/9] Btrfs: introduce the free space B-tree on-disk format Omar Sandoval
2015-09-14  6:04 ` [PATCH v3 6/9] Btrfs: implement the free space B-tree Omar Sandoval
2015-09-14  6:04 ` [PATCH v3 7/9] Btrfs: add free space tree sanity tests Omar Sandoval
2015-09-14  6:04 ` [PATCH v3 8/9] Btrfs: wire up the free space tree to the extent tree Omar Sandoval
2015-09-14  6:04 ` [PATCH v3 9/9] Btrfs: add free space tree mount option Omar Sandoval
2015-09-14  6:08 ` [PATCH v3 1/3] btrfs-progs: use calloc instead of malloc+memset for tree roots Omar Sandoval
2015-09-14  6:08   ` [PATCH v3 2/3] btrfs-progs: add basic awareness of the free space tree Omar Sandoval
2015-09-14  6:08   ` [PATCH v3 3/3] btrfs-progs: check the free space tree in btrfsck Omar Sandoval
2015-09-14 20:05   ` [PATCH v3 1/3] btrfs-progs: use calloc instead of malloc+memset for tree roots David Sterba
2015-09-14 14:51 ` [PATCH v3 0/9] Btrfs: free space B-tree Holger Hoffstätte
2015-09-15  2:56   ` Omar Sandoval
2015-09-14 15:18 ` Austin S Hemmelgarn
2015-09-15  2:56   ` Omar Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).