From patchwork Mon Jul 2 23:03:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10502679 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D248760284 for ; Mon, 2 Jul 2018 23:04:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C37BE28C04 for ; Mon, 2 Jul 2018 23:04:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7BD328C17; Mon, 2 Jul 2018 23:04:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 645AD28C04 for ; Mon, 2 Jul 2018 23:04:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753053AbeGBXEJ (ORCPT ); Mon, 2 Jul 2018 19:04:09 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:37297 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752860AbeGBXEI (ORCPT ); Mon, 2 Jul 2018 19:04:08 -0400 Received: by mail-pf0-f195.google.com with SMTP id h20-v6so27976pfn.4 for ; Mon, 02 Jul 2018 16:04:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=j52PxxBZFD392YLxqXBfktYq+SYMg02NDKdDs6tKnm8=; b=nF9OpJdJbPbv6E6aCFXqAT8P3d3dwfGT/IAznuNxhguBoN0ZYt7Nt0rSKDB1TGKMVh moKTHe7q+yGwRMlOMCzGssEdL5EneXiBr0peMu/PUgnPvP2lcyQTUqfJQN9PcSu3cryk 9KBtcCrqJktlJOi7msYNf8YIS4hrkHVB2Zp2U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=j52PxxBZFD392YLxqXBfktYq+SYMg02NDKdDs6tKnm8=; b=Sra83Rql2mW0edifDeQjqYZv7vMyCbvJp2kGVm8CJ3drNiUqzB4ujwPW4EXnRFNr0i xHNSvjzvBJm4zdAKv39z+FakKBahFBBJ0BmlRDlXyXGbE66/Adoqjrnws0VA0MASX8f5 iqBQHPFVrkGewL8Axq7lQLR1uHYeclYdQt4r0QigGzrxgPk0bBgoDr6y52C5F20WV/L8 VR1waOIZJ+BuX5QHiUEhDw49hxJppLY3+uw8DjkiKyULWqZ3lHdE3NhW+ifrqsQZ5rPJ B80oOqNDAfZfXb2n3WLh2G/YnRPhlrpCayYUsMMmx2tZpLNvat1AGQlsoQW9wTBsWiWO LZRw== X-Gm-Message-State: APt69E2O3T0VWNT+KNYY5+FeSzQLbhc5eRk1nsseAa0CKrFdeJwrcpMz Uio197S4MTReySqUXYM1NOMHcw== X-Google-Smtp-Source: AAOMgpe0DRo0VWddcpNo0/LbQsEZnFYBLe2INQtW9JjeRSByPIyHPw9AKsv07gV3VAJ2/Zz8EGLTww== X-Received: by 2002:a62:c819:: with SMTP id z25-v6mr26201973pff.44.1530572647942; Mon, 02 Jul 2018 16:04:07 -0700 (PDT) Received: from evgreen2.mtv.corp.google.com ([2620:0:1000:1511:116f:8bf3:133b:f7fd]) by smtp.gmail.com with ESMTPSA id k13-v6sm48902509pfg.130.2018.07.02.16.04.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Jul 2018 16:04:06 -0700 (PDT) From: Evan Green To: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sam Hurst , Evan Green Subject: [PATCH] loop: Add LOOP_SET_BLOCK_SIZE in compat ioctl Date: Mon, 2 Jul 2018 16:03:46 -0700 Message-Id: <20180702230346.72350-1-evgreen@chromium.org> X-Mailer: git-send-email 2.16.4 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This change adds LOOP_SET_BLOCK_SIZE as one of the supported ioctls in lo_compat_ioctl. It only takes an unsigned long argument, and in practice a 32-bit value works fine. Signed-off-by: Evan Green Reviewed-by: Omar Sandoval --- drivers/block/loop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index d6b6f434fd4b..4cb1d1be3cfb 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1613,6 +1613,7 @@ static int lo_compat_ioctl(struct block_device *bdev, fmode_t mode, arg = (unsigned long) compat_ptr(arg); case LOOP_SET_FD: case LOOP_CHANGE_FD: + case LOOP_SET_BLOCK_SIZE: err = lo_ioctl(bdev, mode, cmd, arg); break; default: