From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: "Dmitry V. Levin" <ldv@altlinux.org>, Jens Axboe <axboe@kernel.dk>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] uapi: linux/blkzoned.h: fix BLKGETZONESZ and BLKGETNRZONES definitions
Date: Sun, 16 Dec 2018 23:50:50 +0000 [thread overview]
Message-ID: <BYAPR04MB5816E9F89EAF570A21C5D5A8E7A30@BYAPR04MB5816.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20181216014951.GA14229@altlinux.org
On 2018/12/16 10:50, Dmitry V. Levin wrote:
> According to the documentation in include/uapi/asm-generic/ioctl.h,
> _IOW means userspace is writing and kernel is reading, and
> _IOR means userspace is reading and kernel is writing.
>
> In case of these two ioctls, kernel is writing and userspace is reading,
> so they have to be _IOR instead of _IOW.
>
> Fixes: 72cd87576d1d8 ("block: Introduce BLKGETZONESZ ioctl")
> Fixes: 65e4e3eee83d7 ("block: Introduce BLKGETNRZONES ioctl")
> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
> ---
>
> Since both ioctls were introduced after 4.19,
> please make sure they are fixed in 4.20.
> Thanks.
>
> include/uapi/linux/blkzoned.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/uapi/linux/blkzoned.h b/include/uapi/linux/blkzoned.h
> index 8f08ff9bdea0..6fa38d001d84 100644
> --- a/include/uapi/linux/blkzoned.h
> +++ b/include/uapi/linux/blkzoned.h
> @@ -141,7 +141,7 @@ struct blk_zone_range {
> */
> #define BLKREPORTZONE _IOWR(0x12, 130, struct blk_zone_report)
> #define BLKRESETZONE _IOW(0x12, 131, struct blk_zone_range)
> -#define BLKGETZONESZ _IOW(0x12, 132, __u32)
> -#define BLKGETNRZONES _IOW(0x12, 133, __u32)
> +#define BLKGETZONESZ _IOR(0x12, 132, __u32)
> +#define BLKGETNRZONES _IOR(0x12, 133, __u32)
>
> #endif /* _UAPI_BLKZONED_H */
>
Indeed, my bad.
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2018-12-16 23:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-16 1:49 [PATCH] uapi: linux/blkzoned.h: fix BLKGETZONESZ and BLKGETNRZONES definitions Dmitry V. Levin
2018-12-16 23:50 ` Damien Le Moal [this message]
2018-12-17 2:52 ` Jens Axboe
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=BYAPR04MB5816E9F89EAF570A21C5D5A8E7A30@BYAPR04MB5816.namprd04.prod.outlook.com \
--to=damien.lemoal@wdc.com \
--cc=axboe@kernel.dk \
--cc=ldv@altlinux.org \
--cc=linux-kernel@vger.kernel.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).