uapi: linux/blkzoned.h: fix BLKGETZONESZ and BLKGETNRZONES definitions
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 16 Dec 2018 01:49:52 +0000 (04:49 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 17 Dec 2018 02:52:02 +0000 (19:52 -0700)
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")
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/uapi/linux/blkzoned.h

index 8f08ff9bdea091a001094119f753046c79f7dd9f..6fa38d001d84ff5af90fe6014e7874d18f8e2bc1 100644 (file)
@@ -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 */