Commit 98256376 authored by Dmitry V. Levin's avatar Dmitry V. Levin Committed by Jens Axboe

uapi: linux/blkzoned.h: fix BLKGETZONESZ and BLKGETNRZONES definitions

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: 72cd8757 ("block: Introduce BLKGETZONESZ ioctl")
Fixes: 65e4e3ee ("block: Introduce BLKGETNRZONES ioctl")
Reviewed-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: default avatarDmitry V. Levin <ldv@altlinux.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 927b6b2d
......@@ -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 */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment