[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 2/8] file-posix: introduce get_sysfs_long_val for the long
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v6 2/8] file-posix: introduce get_sysfs_long_val for the long sysfs attribute |
Date: |
Sat, 6 Aug 2022 08:29:26 -0400 |
On Fri, Aug 05, 2022 at 03:57:45PM +0800, Sam Li wrote:
> Use sysfs attribute files to get the long value of zoned device
> information.
>
> Signed-off-by: Sam Li <faithilikerun@gmail.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
> ---
> block/file-posix.c | 37 +++++++++++++++++++++++--------------
> 1 file changed, 23 insertions(+), 14 deletions(-)
>
> diff --git a/block/file-posix.c b/block/file-posix.c
> index 48cd096624..a40eab64a2 100644
> --- a/block/file-posix.c
> +++ b/block/file-posix.c
> @@ -1210,29 +1210,27 @@ static int hdev_get_max_hw_transfer(int fd, struct
> stat *st)
> #endif
> }
>
> -static int hdev_get_max_segments(int fd, struct stat *st)
> -{
> +/*
> + * Get zoned device information (chunk_sectors, zoned_append_max_bytes,
> + * max_open_zones, max_active_zones) through sysfs attribute files.
> + */
> +static long get_sysfs_long_val(int fd, struct stat *st,
> + const char *attribute) {
Is the fd argument used or can it be removed?
Other than that:
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature
- [PATCH v6 0/8] Add support for zoned device, Sam Li, 2022/08/05
- [PATCH v6 1/8] include: add zoned device structs, Sam Li, 2022/08/05
- [PATCH v6 2/8] file-posix: introduce get_sysfs_long_val for the long sysfs attribute, Sam Li, 2022/08/05
- Re: [PATCH v6 2/8] file-posix: introduce get_sysfs_long_val for the long sysfs attribute,
Stefan Hajnoczi <=
- [PATCH v6 3/8] file-posix: introduce get_sysfs_str_val for device zoned model, Sam Li, 2022/08/05
- [PATCH v6 4/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls, Sam Li, 2022/08/05
- [PATCH v6 5/8] raw-format: add zone operations to pass through requests, Sam Li, 2022/08/05
- [PATCH v6 6/8] config: add check to block layer, Sam Li, 2022/08/05