diff options
author | Christoph Hellwig <hch@lst.de> | 2023-01-21 07:50:29 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-02-15 19:38:53 +0100 |
commit | 243cf8d1b6737d4b53ac16b211987bbd299478e6 (patch) | |
tree | 39b752f16054c3728a24bf8e4cb043ff7ff93f7a /fs/btrfs/fs.h | |
parent | 35a8d7da3ca87d8612fa86a21fab4e07a70d35cb (diff) | |
download | lwn-243cf8d1b6737d4b53ac16b211987bbd299478e6.tar.gz lwn-243cf8d1b6737d4b53ac16b211987bbd299478e6.zip |
btrfs: calculate file system wide queue limit for zoned mode
To be able to split a write into properly sized zone append commands,
we need a queue_limits structure that contains the least common
denominator suitable for all devices.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/fs.h')
-rw-r--r-- | fs/btrfs/fs.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/fs.h b/fs/btrfs/fs.h index 3d8156fc8523..4c477eae6891 100644 --- a/fs/btrfs/fs.h +++ b/fs/btrfs/fs.h @@ -3,6 +3,7 @@ #ifndef BTRFS_FS_H #define BTRFS_FS_H +#include <linux/blkdev.h> #include <linux/fs.h> #include <linux/btrfs_tree.h> #include <linux/sizes.h> @@ -748,8 +749,10 @@ struct btrfs_fs_info { */ u64 zone_size; - /* Max size to emit ZONE_APPEND write command */ + /* Constraints for ZONE_APPEND commands: */ + struct queue_limits limits; u64 max_zone_append_size; + struct mutex zoned_meta_io_lock; spinlock_t treelog_bg_lock; u64 treelog_bg; |