Skip to content

random bugfixes of the space management

Miao Xie linux-btrfs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 4 repliesIn review
  2. v26 patches 3 repliesSuperseded
  3. v16 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- fix panic caused by freeing a invalid memory address.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6btrfs: fix wrong data space statisticsfs/btrfs/super.c+3 -41 reply
2/6btrfs: try to reclaim some space when chunk allocation failsfs/btrfs/extent-tree.c+7 -20 replies
3/6btrfs: fix wrong calculation of stripe sizefs/btrfs/volumes.c+8 -21 reply
4/6btrfs: restructure find_free_dev_extent()fs/btrfs/extent-tree.c fs/btrfs/volumes.c+91 -680 replies
5/6btrfs: make the chunk allocator utilize the devices betterfs/btrfs/volumes.c fs/btrfs/volumes.h+300 -1030 replies
6/6btrfs: fix wrong free space information of btrfsfs/btrfs/ctree.h fs/btrfs/extent-tree.c fs/btrfs/super.c +2 more+286 -70 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchJosef Bacik
1/6R-b
2/6R-b
3/6R-b
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH V3 0/6] random bugfixes of the space management

Hello, Chris

I have a bunch of random fixes of the space management in

git://repo.or.cz/linux-btrfs-devel.git space-manage

They are the ENOSPC fixes, as well as fixes for df command.
The first one and the last one fixed the wrong free space information reported by df command. The second one fixed ENOSPC when there is tiny space in the filesystem. And The third fixed wrong calculation of stripe size. And the 4th and 5th patches fixed the chunk allocation problem when the block devices have no enough space to allocate a default-size chunk.

Changelog V2 -> V3:
- fix panic caused by freeing a invalid memory address.

Changelog V1 -> V2:
- fix compiler errors on x86_32 machines.
- fix some bugs when allocating dup chunks.
- break the chunk allocation when errors happen.
- just allocate min_stripes stripes when the free space is not enough.
- cleanup redundant code.

If you want to merge this patchset to your "next" branch for testing, you can merge it directly after dropping the top four patches of the "next" branch.

Thanks
Miao

---
 fs/btrfs/ctree.h       |    2 +
 fs/btrfs/extent-tree.c |   71 +++++-
 fs/btrfs/super.c       |  147 +++++++++++-
 fs/btrfs/volumes.c     |  614 +++++++++++++++++++++++++++++++++++-------------
 fs/btrfs/volumes.h     |   27 ++
 5 files changed, 685 insertions(+), 176 deletions(-)