Skip to content

Btrfs: save free space cache to the disk V2

Josef Bacik linux-btrfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

V1->V2 from the cover letter

- This includes my previous fix for the Incompat flags that I posted earlier
- Fix kunmap() to use the page and not the vaddr, I messed this up when going from kmap_atomic to kmap

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Btrfs: create special free space cache inode FORMAT CHANGEfs/btrfs/ctree.h fs/btrfs/disk-io.c fs/btrfs/extent-tree.c +7 more+654 -450 replies
2/3Btrfs: write out free space cachefs/btrfs/ctree.h fs/btrfs/disk-io.c fs/btrfs/extent-tree.c +3 more+393 -130 replies
3/3Btrfs: load free space cache if it existsfs/btrfs/extent-tree.c fs/btrfs/free-space-cache.c fs/btrfs/free-space-cache.h+345 -30 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] Btrfs: save free space cache to the disk V2

V1->V2
- This includes my previous fix for the Incompat flags that I posted earlier
- Fix kunmap() to use the page and not the vaddr, I messed this up when going from kmap_atomic to kmap

This patch series introduces the ability for btrfs to store the free space cache ondisk to make the caching of a block group much quicker. Previously we had to search the entire extent-tree to look for gaps everytime we wanted to allocate in a block group. This approach instead dumps all of the free space cache to disk for every dirtied block group each time we commit the transaction. This is a disk format change, but in order to use the feature you will have to mount with -o space_cache, and then from then on you won't be able to use old kernels with your filesystem. You can pull these patches from my git tree

git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work.git

and they should pull right onto Chris's btrfs-unstable tree. Please test this as it's a big change and I can only test so much. That being said this has been run through xfstests thoroughly and I've been running it on a VM with btrfs as root. Thanks,

Josef