From patchwork Sat Dec 7 00:20:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13898151 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BC04139E for ; Sat, 7 Dec 2024 00:20:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733530806; cv=none; b=MvFAMSxowv9oG+782ARIltLYXen8+mlsjfLnf+pCUcixIGGlPeEd4pBmcmJGHZdDOMSDQmagVmZgg9eNDlfKLTmAs61LYGZa2TMN95Yf//SWPHjml9duDLp3DZ22yGt9PPVuEq40GbbpvHXyQVn0DDcwDWpVaYBJqs0TxdXUol0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733530806; c=relaxed/simple; bh=aWndZv9SlS+JGwBkKxym/air6iUpjsabbVa3W3/NuiA=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aBMBRSml7qs1UC3Y12y8yWxjE7x4/6kIT1f1YOuZdTRfU4aDjivEgbOt0YePfqatRREQWuyfsI4OH/3/FM1C8q2HmS43RpZiX78I2/+K9wRa5rpuBR6LnoLq1iSCRhu+bFzsl+eKY/5eGyxfMk8BgMw8zknGuQez+FALBxbKctQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lLSF1TD2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lLSF1TD2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 688FBC4CED1; Sat, 7 Dec 2024 00:20:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733530806; bh=aWndZv9SlS+JGwBkKxym/air6iUpjsabbVa3W3/NuiA=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=lLSF1TD2QZ11wrxNGEasmYmPEW6qoGUzA3zhaREF00wLwU1Tdd4P7CQrdGzMsTdcZ DKltibV11SPbkRzk3VXvHe8tKsvKDfP3wnrai6RGfOoXLsil7a9H5LEQxRx8/I7u5H 5cBBBPoNJ7CLEUTygacGZjm1NYfZb8iQHWsQOrhGEH+G8n8upDEgQVfy9m14dEbw1D SfsdEpmxGoMJ5cHQfcKgPG/TouP4PB0LkRI1gJMvOX5k5zdbqdNZSbrRTbjotO+PTB on2JG7JI0gb3N/Peds2M0NcCx5I7YpzbUPVneMgXwcyja12StHdpVJRuPS7FHVQYHE lj1Tnkpvq6gUQ== Date: Fri, 06 Dec 2024 16:20:04 -0800 Subject: [PATCH 1/2] xfs_quota: report warning limits for realtime space quotas From: "Darrick J. Wong" To: aalbersh@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <173352753972.129972.7804228230884394394.stgit@frogsfrogsfrogs> In-Reply-To: <173352753955.129972.8619019803110503641.stgit@frogsfrogsfrogs> References: <173352753955.129972.8619019803110503641.stgit@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Darrick J. Wong Report the number of warnings that a user will get for exceeding the soft limit of a realtime volume. Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig --- include/xqm.h | 5 ++++- quota/state.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/xqm.h b/include/xqm.h index 573441db98601a..045af9b67fdf2b 100644 --- a/include/xqm.h +++ b/include/xqm.h @@ -184,7 +184,10 @@ struct fs_quota_statv { __s32 qs_rtbtimelimit;/* limit for rt blks timer */ __u16 qs_bwarnlimit; /* limit for num warnings */ __u16 qs_iwarnlimit; /* limit for num warnings */ - __u64 qs_pad2[8]; /* for future proofing */ + __u16 qs_rtbwarnlimit;/* limit for rt blks warnings */ + __u16 qs_pad3; + __u32 qs_pad4; + __u64 qs_pad2[7]; /* for future proofing */ }; #endif /* __XQM_H__ */ diff --git a/quota/state.c b/quota/state.c index 260ef51db18072..43fb700f9a7317 100644 --- a/quota/state.c +++ b/quota/state.c @@ -244,6 +244,7 @@ state_quotafile_stat( state_warnlimit(fp, XFS_INODE_QUOTA, sv->qs_iwarnlimit); state_timelimit(fp, XFS_RTBLOCK_QUOTA, sv->qs_rtbtimelimit); + state_warnlimit(fp, XFS_RTBLOCK_QUOTA, sv->qs_rtbwarnlimit); } static void From patchwork Sat Dec 7 00:20:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13898152 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77DC228E8 for ; Sat, 7 Dec 2024 00:20:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733530822; cv=none; b=XxxlyoTJ/R6jHP7BErpSelwLFYJAN15gG0BFRDFpLcQqM2Xr+6ZW9w5H/HnMUXZh0UIifu4CRoZ4MJDBYooiAljIwzj9B1tCg+FthQHDiJbrsvznwrEI3jIwgSUTE3ogS0QcrHSSCmFHqyCt3Xe/9lwayEQUT5sGHKqYs4iIlSE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733530822; c=relaxed/simple; bh=seDNnXomwU4qkXH6pArd155eNtZ7h6reqWpZjtCx6YY=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GC/z3eBThHVvukZ4RA/6ab1+ddGTz491eCmMR0zkt1CRYtuqIjv7huiGFaYuZ26YWEdlLAegKnBCXPihaREPkj1EEXWfseuE0cd9Z5MUzh8BbdHW0kynpSXs1gN/lZM0EpGUTTI3/UdAUQ4vOc/yKPpgYReuN4VwG825uOz7RTY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D0L0/Kh5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D0L0/Kh5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00EE7C4CED1; Sat, 7 Dec 2024 00:20:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733530822; bh=seDNnXomwU4qkXH6pArd155eNtZ7h6reqWpZjtCx6YY=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=D0L0/Kh5YsUK/o8a0VJfwtH2jLYpdVxFdCEmI0faaYIk8IVh8xM1hlTudAk0uejzS UES6l0+j/2zBclIENx41rDKoO2eiv/GZ6XTyMtNE5MQQDSnEBdMYvReh6S/yZkUNOk hj7iPSBcym6jh6xY++5n7ZFW11MB2Ujf1/4p+wQT+wgzGyjhiCAjfRpCpTuyY7Oc9A IxVUlOHKfMRVQ8Enbyxcp/HYqvb/CpYeLx4h9n7en0avbji1CONXdak6Hd0VzTXOGL V9PqZaYwTFxHHduexVQhfwd0k4zOEnSwBPqzTO4mTjCgaCHPt1p3tPlN64F5SpsMmZ wYFPz3FuFccpQ== Date: Fri, 06 Dec 2024 16:20:21 -0800 Subject: [PATCH 2/2] mkfs: enable rt quota options From: "Darrick J. Wong" To: aalbersh@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <173352753987.129972.1053967457172318865.stgit@frogsfrogsfrogs> In-Reply-To: <173352753955.129972.8619019803110503641.stgit@frogsfrogsfrogs> References: <173352753955.129972.8619019803110503641.stgit@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Darrick J. Wong Now that the kernel supports quota and realtime devices, allow people to format filesystems with permanent quota options. Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig --- mkfs/xfs_mkfs.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index b644022a5091ba..b141e2c09c7bfb 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -2650,12 +2650,6 @@ _("cowextsize not supported without reflink support\n")); cli->sb_feat.exchrange = true; } - if (cli->sb_feat.qflags && cli->xi->rt.name) { - fprintf(stderr, -_("persistent quota flags not supported with realtime volumes\n")); - usage(); - } - /* * Persistent quota flags requires metadir support because older * kernels (or current kernels with old filesystems) will reset qflags