Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1221647imu; Sat, 15 Dec 2018 17:53:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/UnNsGINfW6F8xhILXsVAtbctHqnzCUqgYxD6hHTAy1prE1MsV2SDfDxjD4vEO4NMYkXo6p X-Received: by 2002:a63:cf02:: with SMTP id j2mr7257183pgg.113.1544925184772; Sat, 15 Dec 2018 17:53:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544925184; cv=none; d=google.com; s=arc-20160816; b=OE2Ol2aDk3HU37FouubHOFeoeWWOoWVMHcBRoC3Qy61WuY43TIP2o9maIec2ft1CEu iyurzgPXyOytc8fkNF9Vnd+JIQ3/n0h6LXpz2ozhBOzDjUPUlLyhYH4e7nF12RoLY6OH ASVwXpo8TXiyuNCEdM5JblUUZ2q/aVHcRGc/D4jqpDq0vkcHm0qEB3RDMgY0DGndnxge 4yZv0THKTAGTQfTLGZTqEu/IRsHT8QABeURuehVdaADAuy+FN7DB85vuEOd9j1y/HRyW ADutacFOVkG3QjVbpY4VGgFbbVFFk6X0vPIOAtkI7p6erDmlxf4SdoYotlPe/m/XXEdo gNWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :message-id:subject:cc:to:from:date; bh=y+mb1kLworj1nuPc0CKegsH3DF1BFXXJULt4lyb8idw=; b=V1BBQSZ+6Y5h6vQCYoSeDJxLKUL6tywwHOk8zw9yU1cxORsYsIuqgzgboYuQD525fj 4wJW5zCzYDtJMmHg1RoGi27cItLvSbri2TW2HlJd0QAA26Rcgt+qXR/djmuPzDePfBy7 Jy8CTryHQAGp1KNP8aEprVtqOLLKsp2smS83wVGbxChfq5xD3nfuMDvECpDBstxcvoV9 +QJAIkIi/YftNwWoZHMnO7Wx3TVg9/zhl48j+BVXblV8dMpASx2XxOXZ0GarzbOYTGMX vHnzA+CxKGaExUnkUCBvFpy+229YbhRwRgb1mF8mI5Al6yr5OZ9NscCeQ2UkTl7h7Eaq Xz/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d7si7597700pfo.108.2018.12.15.17.52.49; Sat, 15 Dec 2018 17:53:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729832AbeLPBtz (ORCPT + 99 others); Sat, 15 Dec 2018 20:49:55 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:60414 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727227AbeLPBty (ORCPT ); Sat, 15 Dec 2018 20:49:54 -0500 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 9CC2472CC59; Sun, 16 Dec 2018 04:49:52 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 8F8AB964F90; Sun, 16 Dec 2018 04:49:52 +0300 (MSK) Date: Sun, 16 Dec 2018 04:49:52 +0300 From: "Dmitry V. Levin" To: Jens Axboe , Damien Le Moal Cc: linux-kernel@vger.kernel.org Subject: [PATCH] uapi: linux/blkzoned.h: fix BLKGETZONESZ and BLKGETNRZONES definitions Message-ID: <20181216014951.GA14229@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 */ -- ldv