diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2016-02-22 14:59:53 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-02-26 17:27:58 +0100 |
commit | e2e0dae926b2174c368ee6dbed610d9f98c193a5 (patch) | |
tree | 7918cae2e54c1ea658cb8676d8a15cb6aac2cd4c /ctree.h | |
parent | bfc2cb7cfbd4403a4ba6307e3f31ba4a654fd8aa (diff) |
btrfs-progs: volume: Fix a bug causing btrfs-find-root to skip first chunk
There is a small bug from 2011, where btrfs_next_bg (formally
btrfs_next_metadata) function will always skip the first chunk.
That's OK for that time, as there is always 3 empty temporary chunks.
But now, we may ended up with only one metadata or system chunk, with
empty chunk auto-remove from kernel or new mkfs.btrfs.
So fix it by checking the initial value so btrfs_next_bg() will return
the first chunk if its *logical parameter is 0.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'ctree.h')
0 files changed, 0 insertions, 0 deletions