All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Sam Li <faithilikerun@gmail.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, hare@suse.de,
	dmitry.fomichev@wdc.com, Kevin Wolf <kwolf@redhat.com>,
	damien.lemoal@opensource.wdc.com, Eric Blake <eblake@redhat.com>,
	Fam Zheng <fam@euphon.net>, Markus Armbruster <armbru@redhat.com>,
	Hanna Reitz <hreitz@redhat.com>
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	[thread overview]
Message-ID: <Yu5eprPN7WrJFvuy@fedora> (raw)
In-Reply-To: <20220805075751.77499-3-faithilikerun@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

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>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-08-08 13:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  7:57 [PATCH v6 0/8] Add support for zoned device Sam Li
2022-08-05  7:57 ` [PATCH v6 1/8] include: add zoned device structs Sam Li
2022-08-05  7:57 ` [PATCH v6 2/8] file-posix: introduce get_sysfs_long_val for the long sysfs attribute Sam Li
2022-08-06 12:29   ` Stefan Hajnoczi [this message]
2022-08-08 13:56     ` Sam Li
2022-08-05  7:57 ` [PATCH v6 3/8] file-posix: introduce get_sysfs_str_val for device zoned model Sam Li
2022-08-06 12:50   ` Stefan Hajnoczi
2022-08-08 13:59     ` Sam Li
2022-08-05  7:57 ` [PATCH v6 4/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls Sam Li
2022-08-06 13:07   ` Stefan Hajnoczi
2022-08-07 23:52   ` Sam Li
2022-08-05  7:57 ` [PATCH v6 5/8] raw-format: add zone operations to pass through requests Sam Li
2022-08-05  7:57 ` [PATCH v6 6/8] config: add check to block layer Sam Li
2022-08-06 12:23   ` Stefan Hajnoczi
2022-08-05  7:57 ` [PATCH v6 7/8] qemu-iotests: test new zone operations Sam Li
2022-08-05  7:57 ` [PATCH v6 8/8] docs/zoned-storage: add zoned device documentation Sam Li
2022-08-06 12:26   ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yu5eprPN7WrJFvuy@fedora \
    --to=stefanha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=dmitry.fomichev@wdc.com \
    --cc=eblake@redhat.com \
    --cc=faithilikerun@gmail.com \
    --cc=fam@euphon.net \
    --cc=hare@suse.de \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.