diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2016-08-25 18:08:27 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-09-26 17:59:49 +0200 |
commit | 49303381f19ab16a371a061b67e783d3f570d56e (patch) | |
tree | c70a9224882d29c4a6d6a68a53343517c2bc0e0e /fs/btrfs/backref.h | |
parent | 2571e739677f1e4c0c63f5ed49adcc0857923625 (diff) | |
download | linux-49303381f19ab16a371a061b67e783d3f570d56e.tar.gz linux-49303381f19ab16a371a061b67e783d3f570d56e.tar.bz2 linux-49303381f19ab16a371a061b67e783d3f570d56e.zip |
Btrfs: bail out if block group has different mixed flag
Currently we allow inconsistence about mixed flag
(BTRFS_BLOCK_GROUP_METADATA | BTRFS_BLOCK_GROUP_DATA).
We'd get ENOSPC if block group has mixed flag and btrfs doesn't.
If that happens, we have one space_info with mixed flag and another
space_info only with BTRFS_BLOCK_GROUP_METADATA, and
global_block_rsv.space_info points to the latter one, but all bytes
from block_group contributes to the mixed space_info, thus all the
allocation will fail with ENOSPC.
This adds a check for the above case.
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
[ updated message ]
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/backref.h')
0 files changed, 0 insertions, 0 deletions