]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: disallow mixed-bg in ZONED mode
authorNaohiro Aota <naohiro.aota@wdc.com>
Tue, 10 Nov 2020 11:26:13 +0000 (20:26 +0900)
committerDavid Sterba <dsterba@suse.com>
Wed, 9 Dec 2020 18:16:04 +0000 (19:16 +0100)
commita11ddfabb441aeac61d25862b0c23644ab87f193
tree6229761672e5ee35f2ea8fcb6589273a33cb71ac
parent00af96144ccef082ac2b9517e998e2331a437b6f
btrfs: disallow mixed-bg in ZONED mode

Placing both data and metadata in a block group is impossible in ZONED
mode. For data, we can allocate a space for it and write it immediately
after the allocation. For metadata, however, we cannot do that, because
the logical addresses are recorded in other metadata buffers to build up
the trees. As a result, a data buffer can be placed after a metadata
buffer, which is not written yet. Writing out the data buffer will break
the sequential write rule.

Check and disallow MIXED_BG with ZONED mode.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c