From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA70DC433E6 for ; Thu, 4 Mar 2021 12:38:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8412964F11 for ; Thu, 4 Mar 2021 12:38:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240906AbhCDMhh (ORCPT ); Thu, 4 Mar 2021 07:37:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241040AbhCDMhZ (ORCPT ); Thu, 4 Mar 2021 07:37:25 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10EABC0613DC for ; Thu, 4 Mar 2021 04:36:14 -0800 (PST) Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lHnD1-0006vy-1P; Thu, 04 Mar 2021 13:36:03 +0100 Received: from sha by dude02.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lHnCz-000437-TQ; Thu, 04 Mar 2021 13:36:01 +0100 From: Sascha Hauer To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Christoph Hellwig , kernel@pengutronix.de, Jan Kara , Richard Weinberger , Sascha Hauer Subject: [PATCH v3 0/2] quota: Add mountpath based quota support Date: Thu, 4 Mar 2021 13:35:38 +0100 Message-Id: <20210304123541.30749-1-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-api@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org Current quotactl syscall uses a path to a block device to specify the filesystem to work on which makes it unsuitable for filesystems that do not have a block device. This series adds a new syscall quotactl_path() which replaces the path to the block device with a mountpath, but otherwise behaves like original quotactl. This is done to add quota support to UBIFS. UBIFS quota support has been posted several times with different approaches to put the mountpath into the existing quotactl() syscall until it has been suggested to make it a new syscall instead, so here it is. I'm not posting the full UBIFS quota series here as it remains unchanged and I'd like to get feedback to the new syscall first. For those interested the most recent series can be found here: https://lwn.net/Articles/810463/ Changes since v2: - Rebase on v5.12-rc1 - replace mountpath.dentry->d_inode->i_sb with mountpath.mnt->mnt_sb - fix wrong macro usage in arch/x86/entry/syscalls/syscall_32.tbl - +Cc linux-api@vger.kernel.org Changes since (implicit) v1: - Ignore second path argument to Q_QUOTAON. With this quotactl_path() can only do the Q_QUOTAON operation on filesystems which use hidden inodes for quota metadata storage - Drop unnecessary quotactl_cmd_onoff() check Sascha Hauer (2): quota: Add mountpath based quota support quota: wire up quotactl_path arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch/arm/tools/syscall.tbl | 1 + arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 2 + arch/ia64/kernel/syscalls/syscall.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 + arch/microblaze/kernel/syscalls/syscall.tbl | 1 + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + arch/parisc/kernel/syscalls/syscall.tbl | 1 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + arch/s390/kernel/syscalls/syscall.tbl | 1 + arch/sh/kernel/syscalls/syscall.tbl | 1 + arch/sparc/kernel/syscalls/syscall.tbl | 1 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + fs/quota/quota.c | 49 +++++++++++++++++++-- include/linux/syscalls.h | 2 + include/uapi/asm-generic/unistd.h | 4 +- kernel/sys_ni.c | 1 + 22 files changed, 71 insertions(+), 5 deletions(-) -- 2.29.2