From: Stefan Hajnoczi <stefanha@redhat.com>
To: Sam Li <faithilikerun@gmail.com>
Cc: qemu-devel@nongnu.org, hare@suse.de, Fam Zheng <fam@euphon.net>,
Kevin Wolf <kwolf@redhat.com>, Eric Blake <eblake@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Hanna Reitz <hreitz@redhat.com>,
dmitry.fomichev@wdc.com, qemu-block@nongnu.org,
damien.lemoal@opensource.wdc.com
Subject: Re: [PATCH v7 2/8] file-posix: introduce get_sysfs_str_val for device zoned model
Date: Mon, 22 Aug 2022 19:05:20 -0400 [thread overview]
Message-ID: <YwQLsL01jP89Dp5k@fedora> (raw)
In-Reply-To: <20220816062522.85714-3-faithilikerun@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]
On Tue, Aug 16, 2022 at 02:25:16PM +0800, Sam Li wrote:
> +static int hdev_get_max_segments(int fd, struct stat *st) {
> + int ret;
> + if (S_ISCHR(st->st_mode)) {
> + if (ioctl(fd, SG_GET_SG_TABLESIZE, &ret) == 0) {
The ioctl must be within #ifdef CONFIG_LINUX since SG_GET_SG_TABLESIZE
will be undefined on other operating systems and a compiler error will
be encountered. Maybe keep the #ifdef around the entire body of this
hdev_get_max_segments().
> + return ret;
> + }
> + return -ENOTSUP;
> }
> - g_free(sysfspath);
> - return ret;
> -#else
> - return -ENOTSUP;
> -#endif
> + return get_sysfs_long_val(st, "max_segments");
Where is get_sysfs_long_val() defined? Maybe in a later patch? The code
must compile after each patch. You can test this with "git rebase -i
origin/master" and then adding "x make" lines after each commit in the
interactive rebase file. When rebase runs it will execute make after
each commit and will stop if make fails.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-08-22 23:07 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 6:25 [PATCH v7 0/8] Add support for zoned device Sam Li
2022-08-16 6:25 ` [PATCH v7 1/8] include: add zoned device structs Sam Li
2022-08-16 17:27 ` Damien Le Moal
2022-08-16 6:25 ` [PATCH v7 2/8] file-posix: introduce get_sysfs_str_val for device zoned model Sam Li
2022-08-16 16:11 ` Sam Li
2022-08-16 17:32 ` Damien Le Moal
2022-08-22 23:05 ` Stefan Hajnoczi [this message]
2022-08-23 4:31 ` Sam Li
2022-08-16 6:25 ` [PATCH v7 3/8] file-posix: introduce get_sysfs_long_val for the long sysfs attribute Sam Li
2022-08-16 16:13 ` Sam Li
2022-08-16 17:35 ` Damien Le Moal
2022-08-16 17:53 ` Sam Li
2022-08-16 17:55 ` Damien Le Moal
2022-08-16 6:25 ` [PATCH v7 4/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls Sam Li
2022-08-16 17:50 ` Damien Le Moal
2022-08-26 12:20 ` Sam Li
2022-08-23 0:49 ` Stefan Hajnoczi
2022-08-23 4:12 ` Sam Li
2022-08-23 12:40 ` Stefan Hajnoczi
2022-08-24 23:46 ` Damien Le Moal
2022-08-24 23:53 ` Damien Le Moal
2022-08-16 6:25 ` [PATCH v7 5/8] raw-format: add zone operations to pass through requests Sam Li
2022-08-16 6:25 ` [PATCH v7 6/8] config: add check to block layer Sam Li
2022-08-23 0:54 ` Stefan Hajnoczi
2022-08-23 4:25 ` Sam Li
2022-08-23 12:36 ` Stefan Hajnoczi
2022-08-16 6:25 ` [PATCH v7 7/8] qemu-iotests: test new zone operations Sam Li
2022-08-16 6:25 ` [PATCH v7 8/8] docs/zoned-storage: add zoned device documentation Sam Li
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=YwQLsL01jP89Dp5k@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).