]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: disable fallocate in ZONED mode
authorNaohiro Aota <naohiro.aota@wdc.com>
Tue, 10 Nov 2020 11:26:12 +0000 (20:26 +0900)
committerDavid Sterba <dsterba@suse.com>
Wed, 9 Dec 2020 18:16:04 +0000 (19:16 +0100)
commit72e0239f1417fa137a3b0a555beba25f5a9971da
treee27f0aeedd1d03201235235394f5d3210edfe14f
parent0b565fb7485a446d534273546fa17358f20762a4
btrfs: disable fallocate in ZONED mode

fallocate() is implemented by reserving actual extent instead of
reservations. This can result in exposing the sequential write
constraint of host-managed zoned block devices to the application, which
would break the POSIX semantic for the fallocated file.  To avoid this,
report fallocate() as not supported when in ZONED mode for now.

In the future, we may be able to implement "in-memory" fallocate() in
ZONED mode by utilizing space_info->bytes_may_use or similar, so this
returns EOPNOTSUPP.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
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/file.c