@@ -1238,9 +1238,6 @@ struct btrfs_fs_info {
u64 zone_size;
u64 zoned;
};
-
- /* Max size to emit ZONE_APPEND write command */
- u64 max_zone_append_size;
};
static inline bool btrfs_is_zoned(const struct btrfs_fs_info *fs_info)
@@ -303,13 +303,12 @@ static int report_zones(int fd, const char *file,
/* Allocate the zone information array */
zinfo->zone_size = zone_bytes;
- zinfo->max_zone_append_size = max_zone_append_size(file);
zinfo->nr_zones = device_size / zone_bytes;
if (device_size & (zone_bytes - 1))
zinfo->nr_zones++;
if (zoned_model(file) != ZONED_NONE &&
- zinfo->max_zone_append_size == 0) {
+ max_zone_append_size(file) == 0) {
error(
"zoned: device %s does not support ZONE_APPEND command", file);
exit(1);
@@ -1106,7 +1105,6 @@ int btrfs_check_zoned_mode(struct btrfs_fs_info *fs_info)
u64 zoned_devices = 0;
u64 nr_devices = 0;
u64 zone_size = 0;
- u64 max_zone_append_size = 0;
const bool incompat_zoned = btrfs_fs_incompat(fs_info, ZONED);
int ret = 0;
@@ -1141,11 +1139,6 @@ int btrfs_check_zoned_mode(struct btrfs_fs_info *fs_info)
ret = -EINVAL;
goto out;
}
- if (!max_zone_append_size ||
- (zone_info->max_zone_append_size &&
- zone_info->max_zone_append_size < max_zone_append_size))
- max_zone_append_size =
- zone_info->max_zone_append_size;
}
nr_devices++;
}
@@ -1191,7 +1184,6 @@ int btrfs_check_zoned_mode(struct btrfs_fs_info *fs_info)
}
fs_info->zone_size = zone_size;
- fs_info->max_zone_append_size = max_zone_append_size;
fs_info->fs_devices->chunk_alloc_policy = BTRFS_CHUNK_ALLOC_ZONED;
out:
@@ -51,7 +51,6 @@ enum btrfs_zoned_model {
struct btrfs_zoned_device_info {
enum btrfs_zoned_model model;
u64 zone_size;
- u64 max_zone_append_size;
u32 nr_zones;
struct blk_zone *zones;
};
max_zone_append_size is unused and can as well be removed just like we did on the kernel side. Keep one sanity check though, so we're not adding devices to a zoned FS that aren't supporting zone append. Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> --- kernel-shared/ctree.h | 3 --- kernel-shared/zoned.c | 10 +--------- kernel-shared/zoned.h | 1 - 3 files changed, 1 insertion(+), 13 deletions(-)