* [PATCH] btrfs-progs: remove max_zone_append_size logic
@ 2021-09-23 12:42 Johannes Thumshirn
2021-09-23 19:19 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Thumshirn @ 2021-09-23 12:42 UTC (permalink / raw)
To: David Sterba; +Cc: linux-btrfs, Johannes Thumshirn
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(-)
diff --git a/kernel-shared/ctree.h b/kernel-shared/ctree.h
index e79b1e4ced60..8d8521b9d021 100644
--- a/kernel-shared/ctree.h
+++ b/kernel-shared/ctree.h
@@ -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)
diff --git a/kernel-shared/zoned.c b/kernel-shared/zoned.c
index c245e59249af..2475e7b097ce 100644
--- a/kernel-shared/zoned.c
+++ b/kernel-shared/zoned.c
@@ -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:
diff --git a/kernel-shared/zoned.h b/kernel-shared/zoned.h
index 99f8e9a2faac..1e4956475db9 100644
--- a/kernel-shared/zoned.h
+++ b/kernel-shared/zoned.h
@@ -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;
};
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs-progs: remove max_zone_append_size logic
2021-09-23 12:42 [PATCH] btrfs-progs: remove max_zone_append_size logic Johannes Thumshirn
@ 2021-09-23 19:19 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2021-09-23 19:19 UTC (permalink / raw)
To: Johannes Thumshirn; +Cc: David Sterba, linux-btrfs
On Thu, Sep 23, 2021 at 09:42:21PM +0900, Johannes Thumshirn wrote:
> 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>
Added to devel, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-23 19:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 12:42 [PATCH] btrfs-progs: remove max_zone_append_size logic Johannes Thumshirn
2021-09-23 19:19 ` David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.