From bc04bb238cbacd258c96384907079733e226ae5a Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Mon, 17 Dec 2018 13:45:05 +0000 Subject: [PATCH] block: decode BLKGETZONESZ and BLKGETNRZONES ioctls These ioctls were introduced by linux kernel commits v4.20-rc1~17^2~16 and v4.20-rc1~17^2~15, respectively. * block.c (block_ioctl): Handle BLKGETZONESZ and BLKGETNRZONES. * xlat/block_ioctl_cmds.in (BLKGETZONESZ, BLKGETNRZONES): New entries. --- block.c | 2 ++ xlat/block_ioctl_cmds.in | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/block.c b/block.c index a0475c30..af0945fc 100644 --- a/block.c +++ b/block.c @@ -116,6 +116,8 @@ MPERS_PRINTER_DECL(int, block_ioctl, struct tcb *const tcp, case BLKIOMIN: case BLKIOOPT: case BLKDISCARDZEROES: + case BLKGETZONESZ: + case BLKGETNRZONES: if (entering(tcp)) return 0; tprints(", "); diff --git a/xlat/block_ioctl_cmds.in b/xlat/block_ioctl_cmds.in index 7863ac15..45c402f2 100644 --- a/xlat/block_ioctl_cmds.in +++ b/xlat/block_ioctl_cmds.in @@ -33,3 +33,7 @@ BLKZEROOUT _IO(0x12, 127) /* BLKDAXSET _IO(0x12, 128) */ /* BLKDAXGET was present between v4.5-rc1~112^2^2~16 and v4.7-rc1~78^2^2~4 */ BLKDAXGET _IO(0x12, 129) +/* BLKREPORTZONE _IOWR(0x12, 130, struct blk_zone_report) */ +/* BLKRESETZONE _IOW(0x12, 131, struct blk_zone_range) */ +BLKGETZONESZ _IOR(0x12, 132, uint32_t) +BLKGETNRZONES _IOR(0x12, 133, uint32_t) -- 2.40.0