From patchwork Wed Mar 5 13:02:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 326761 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D37C72C00AF for ; Thu, 6 Mar 2014 00:02:52 +1100 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WLBT5-0002xR-R4; Wed, 05 Mar 2014 13:02:40 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WLBT4-0000fi-8x; Wed, 05 Mar 2014 13:02:38 +0000 Received: from mga02.intel.com ([134.134.136.20]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WLBT1-0000ec-Gp for linux-mtd@lists.infradead.org; Wed, 05 Mar 2014 13:02:36 +0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 05 Mar 2014 05:02:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,592,1389772800"; d="scan'208";a="467024212" Received: from blue.fi.intel.com ([10.237.72.156]) by orsmga001.jf.intel.com with ESMTP; 05 Mar 2014 05:02:12 -0800 From: Artem Bityutskiy To: Ezequiel Garcia Subject: [PATCH] UBI: rename block device ioctls Date: Wed, 5 Mar 2014 15:02:10 +0200 Message-Id: <1394024530-17379-1-git-send-email-dedekind1@gmail.com> X-Mailer: git-send-email 1.9.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140305_080235_658338_C7452EFF X-CRM114-Status: GOOD ( 16.04 ) X-Spam-Score: -5.1 (-----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-5.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [134.134.136.20 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dedekind1[at]gmail.com) 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (dedekind1[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.9 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list Cc: MTD Maling List X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Artem Bityutskiy Rename the UBI_IOCVOLATTBLK and UBI_IOCVOLDETBLK to UBI_IOCVOLCRBLK and UBI_IOCVOLRMBLK, because we do not use terms "attach" and "detach" for the R/O block devices on top of UBI volumes. Instead, we use terms "create" and "remove". This patch also amends the related commentaries. Signed-off-by: Artem Bityutskiy Acked-by: Ezequiel Garcia --- drivers/mtd/ubi/block.c | 2 +- drivers/mtd/ubi/cdev.c | 8 ++++---- include/uapi/mtd/ubi-user.h | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c index 16e6731..69a74fd 100644 --- a/drivers/mtd/ubi/block.c +++ b/drivers/mtd/ubi/block.c @@ -32,7 +32,7 @@ * This feature is compiled in the UBI core, and adds a 'block' parameter * to allow early creation of block devices on top of UBI volumes. Runtime * block creation/removal for UBI volumes is provided through two UBI ioctls: - * UBI_IOCVOLATTBLK and UBI_IOCVOLDETBLK. + * UBI_IOCVOLCRBLK and UBI_IOCVOLRMBLK. */ #include diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index 11c8473..f54562a 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c @@ -561,8 +561,8 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd, break; } - /* Attach a block device to an UBI volume */ - case UBI_IOCVOLATTBLK: + /* Create a R/O block device on top of the UBI volume */ + case UBI_IOCVOLCRBLK: { struct ubi_volume_info vi; @@ -571,8 +571,8 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd, break; } - /* Dettach a block device from an UBI volume */ - case UBI_IOCVOLDETBLK: + /* Remove the R/O block device */ + case UBI_IOCVOLRMBLK: { struct ubi_volume_info vi; diff --git a/include/uapi/mtd/ubi-user.h b/include/uapi/mtd/ubi-user.h index b98585a..9c885e2 100644 --- a/include/uapi/mtd/ubi-user.h +++ b/include/uapi/mtd/ubi-user.h @@ -138,9 +138,9 @@ * Block devices on UBI volumes * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * - * To attach or detach a block device from an UBI volume the %UBI_IOCVOLATTBLK - * and %UBI_IOCVOLDETBLK ioctl commands should be used, respectively. - * These commands take no arguments. + * To create or remove a R/O block device on top of an UBI volume the + * %UBI_IOCVOLCRBLK and %UBI_IOCVOLRMBLK ioctl commands should be used, + * respectively. These commands take no arguments. */ /* @@ -198,10 +198,10 @@ /* Set an UBI volume property */ #define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \ struct ubi_set_vol_prop_req) -/* Attach a block device to an UBI volume */ -#define UBI_IOCVOLATTBLK _IO(UBI_VOL_IOC_MAGIC, 7) -/* Detach a block device from an UBI volume */ -#define UBI_IOCVOLDETBLK _IO(UBI_VOL_IOC_MAGIC, 8) +/* Create a R/O block device on top of an UBI volume */ +#define UBI_IOCVOLCRBLK _IO(UBI_VOL_IOC_MAGIC, 7) +/* Remove the R/O block device */ +#define UBI_IOCVOLRMBLK _IO(UBI_VOL_IOC_MAGIC, 8) /* Maximum MTD device name length supported by UBI */ #define MAX_UBI_MTD_NAME_LEN 127