From patchwork Wed Dec 11 20:42:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11286381 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 77B90112B for ; Wed, 11 Dec 2019 20:50:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 607EF2173E for ; Wed, 11 Dec 2019 20:50:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727142AbfLKUu2 (ORCPT ); Wed, 11 Dec 2019 15:50:28 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:35685 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727140AbfLKUu1 (ORCPT ); Wed, 11 Dec 2019 15:50:27 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MRCBm-1iK9Wr1CTc-00N6b3; Wed, 11 Dec 2019 21:45:01 +0100 From: Arnd Bergmann To: Jens Axboe , "James E.J. Bottomley" , "Martin K. Petersen" , Alexander Viro , Jens Axboe Cc: linux-kernel@vger.kernel.org, y2038@lists.linaro.org, Arnd Bergmann , stable@vger.kernel.org, Christoph Hellwig , linux-block@vger.kernel.org Subject: [PATCH 06/24] compat_ioctl: block: handle Persistent Reservations Date: Wed, 11 Dec 2019 21:42:40 +0100 Message-Id: <20191211204306.1207817-7-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191211204306.1207817-1-arnd@arndb.de> References: <20191211204306.1207817-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:MERO8zqQm/hzGxvh7HZnjW9vQ1ZkuwnxVUEsPHkICjTXF72Y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W7tbUaNsiJYR/5Za2agv6fEKGSLJ+o6uCXNcdnFHxoaYFTO 26SDlJk8ZBEKbCH6Zjyg== Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org These were added to blkdev_ioctl() in linux-5.5 but not blkdev_compat_ioctl, so add them now. Cc: # v4.4+ Fixes: bbd3e064362e ("block: add an API for Persistent Reservations") Signed-off-by: Arnd Bergmann --- block/compat_ioctl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c index 5b13e344229c..f16ae92065d7 100644 --- a/block/compat_ioctl.c +++ b/block/compat_ioctl.c @@ -408,6 +408,14 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg) case BLKTRACETEARDOWN: /* compatible */ ret = blk_trace_ioctl(bdev, cmd, compat_ptr(arg)); return ret; + case IOC_PR_REGISTER: + case IOC_PR_RESERVE: + case IOC_PR_RELEASE: + case IOC_PR_PREEMPT: + case IOC_PR_PREEMPT_ABORT: + case IOC_PR_CLEAR: + return blkdev_ioctl(bdev, mode, cmd, + (unsigned long)compat_ptr(arg)); default: if (disk->fops->compat_ioctl) ret = disk->fops->compat_ioctl(bdev, mode, cmd, arg);