From patchwork Thu Jan 15 16:19:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 18660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 84178DE169 for ; Fri, 16 Jan 2009 03:22:39 +1100 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1LNUwt-0006Wz-23; Thu, 15 Jan 2009 16:20:03 +0000 Received: from smtp.nokia.com ([192.100.105.134] helo=mgw-mx09.nokia.com) by bombadil.infradead.org with esmtps (Exim 4.69 #1 (Red Hat Linux)) id 1LNUwl-0006Nz-Mf for linux-mtd@lists.infradead.org; Thu, 15 Jan 2009 16:19:58 +0000 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx09.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n0FGJeFM005314; Thu, 15 Jan 2009 10:19:42 -0600 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 15 Jan 2009 18:19:12 +0200 Received: from mgw-int02.ntc.nokia.com ([172.21.143.97]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 15 Jan 2009 18:19:12 +0200 Received: from [172.21.40.72] (esdhcp04072.research.nokia.com [172.21.40.72]) by mgw-int02.ntc.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id n0FGJ8Ix014673; Thu, 15 Jan 2009 18:19:09 +0200 Subject: [PATCH] UBI: add ioctl compatibility From: Artem Bityutskiy To: Arnd Bergmann Date: Thu, 15 Jan 2009 18:19:41 +0200 Message-Id: <1232036381.25068.10.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 (2.24.2-3.fc10) X-OriginalArrivalTime: 15 Jan 2009 16:19:12.0089 (UTC) FILETIME=[00691490:01C9772D] X-Nokia-AV: Clean X-Spam-Score: -4.0 (----) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (-4.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -4.0 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [192.100.105.134 listed in list.dnswl.org] Cc: Geert Uytterhoeven , linux-mtd , LKML X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: dedekind@infradead.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hi Arnd, would you please glance if this patch all-right? From: Artem Bityutskiy Subject: [PATCH] UBI: add ioctl compatibility UBI ioctl's do not work when running 64-bit kernel and 32-bit user-land. Fix this by adding ioctl translation etries to fs/compat_ioctl.c Reported-by: Geert Uytterhoeven Signed-off-by: Artem Bityutskiy --- fs/compat_ioctl.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 5235c67..f1e00e1 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -95,6 +95,7 @@ #include #include #include +#include #include #include @@ -2423,6 +2424,19 @@ COMPATIBLE_IOCTL(MEMGETREGIONCOUNT) COMPATIBLE_IOCTL(MEMGETREGIONINFO) COMPATIBLE_IOCTL(MEMGETBADBLOCK) COMPATIBLE_IOCTL(MEMSETBADBLOCK) +/* UBI */ +COMPATIBLE_IOCTL(UBI_IOCMKVOL) +ULONG_IOCTL(UBI_IOCRMVOL) +COMPATIBLE_IOCTL(UBI_IOCRSVOL) +COMPATIBLE_IOCTL(UBI_IOCRNVOL) +COMPATIBLE_IOCTL(UBI_IOCATT) +ULONG_IOCTL(UBI_IOCDET) +ULONG_IOCTL(UBI_IOCVOLUP) +ULONG_IOCTL(UBI_IOCEBER) +ULONG_IOCTL(UBI_IOCEBCH) +ULONG_IOCTL(UBI_IOCEBMAP) +ULONG_IOCTL(UBI_IOCEBUNMAP) +ULONG_IOCTL(UBI_IOCEBISMAP) /* NBD */ ULONG_IOCTL(NBD_SET_SOCK) ULONG_IOCTL(NBD_SET_BLKSIZE)