diff options
| author | Jakub Kicinski <[email protected]> | 2023-07-27 22:21:46 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-07-27 22:22:46 +0000 |
| commit | 014acf26685cfcfae37c9e98b83c622c0b01cf19 (patch) | |
| tree | 85ce0217698aef25875fdc62f2332bbbbc1bff2c /fs/btrfs/disk-io.c | |
| parent | Merge branch 'virtio-vsock-some-updates-for-msg_peek-flag' (diff) | |
| parent | Merge tag 'net-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff) | |
| download | kernel-014acf26685cfcfae37c9e98b83c622c0b01cf19.tar.gz kernel-014acf26685cfcfae37c9e98b83c622c0b01cf19.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
No conflicts or adjacent changes.
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'fs/btrfs/disk-io.c')
| -rw-r--r-- | fs/btrfs/disk-io.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 7513388b0567..9b9914e5f03d 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -3438,11 +3438,16 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device * For devices supporting discard turn on discard=async automatically, * unless it's already set or disabled. This could be turned off by * nodiscard for the same mount. + * + * The zoned mode piggy backs on the discard functionality for + * resetting a zone. There is no reason to delay the zone reset as it is + * fast enough. So, do not enable async discard for zoned mode. */ if (!(btrfs_test_opt(fs_info, DISCARD_SYNC) || btrfs_test_opt(fs_info, DISCARD_ASYNC) || btrfs_test_opt(fs_info, NODISCARD)) && - fs_info->fs_devices->discardable) { + fs_info->fs_devices->discardable && + !btrfs_is_zoned(fs_info)) { btrfs_set_and_info(fs_info, DISCARD_ASYNC, "auto enabling async discard"); } |
