From patchwork Mon Jan 29 12:01:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 13535491 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9A0CC47422 for ; Mon, 29 Jan 2024 12:01:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 596796B00BC; Mon, 29 Jan 2024 07:01:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 547196B00BD; Mon, 29 Jan 2024 07:01:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 410006B00BE; Mon, 29 Jan 2024 07:01:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 2DD706B00BC for ; Mon, 29 Jan 2024 07:01:42 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 02094A083F for ; Mon, 29 Jan 2024 12:01:41 +0000 (UTC) X-FDA: 81732209244.19.C19FF4C Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf01.hostedemail.com (Postfix) with ESMTP id 524F340011 for ; Mon, 29 Jan 2024 12:01:38 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=fuh7GIov; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=IAAMcTG2; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=fuh7GIov; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=IAAMcTG2; dmarc=none; spf=pass (imf01.hostedemail.com: domain of jack@suse.cz designates 195.135.223.131 as permitted sender) smtp.mailfrom=jack@suse.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706529698; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=GBsciSU2PNLY2CEBW32KWvsIrDZHLVktcbvqikbyh/o=; b=Ik9xY5vmh6Ilm5SXQL8AKCnfVXvmt7dFLJbzBJJDN7Qr6jtUfygF5msQMaSQL4ZvwcHgNL VXmZa25jIknNxasWmsuNimJ0+a0TqZ3arJpBjf9AZZpHU7gg86SEesn+PcZdxKGTr4a6WV aTasejJZGtdBWjDAUozI9fRbPMPOimw= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=fuh7GIov; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=IAAMcTG2; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=fuh7GIov; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=IAAMcTG2; dmarc=none; spf=pass (imf01.hostedemail.com: domain of jack@suse.cz designates 195.135.223.131 as permitted sender) smtp.mailfrom=jack@suse.cz ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706529698; a=rsa-sha256; cv=none; b=FP+mBYrq2cB+ISsNTU5U7kVBOl8b5fk+oSwHDXzs96CmC7l6VdIoalsB9wTbJs3JnoG0DI sNznNwjifSo/+RtxePBIFTY4hldoNSbUv/UFSVmKmsg6/CsPhfA99VFiPUk+4azKyj5+eY S+acM4YKz+g2083Wo3ZoXf5kEoDJZEg= Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6B5821F7EB; Mon, 29 Jan 2024 12:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1706529696; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GBsciSU2PNLY2CEBW32KWvsIrDZHLVktcbvqikbyh/o=; b=fuh7GIovGgJWQmEwW9kXQtkde1iuGcbQrZla7tebpE6smMjJubTfF5KuTHe5uCHtQJbnXL 3HgcNlMbf5O28wuM8WCJjh3kilCWLO3dNjCe67f6oNc4btq00UidZ+IK2vM1Mz1Hji0Ocb YUtE3lkaDkEo+9Ypo+3JuB9NfZ34Zvw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1706529696; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GBsciSU2PNLY2CEBW32KWvsIrDZHLVktcbvqikbyh/o=; b=IAAMcTG2rsw8yNpSmyuBufzRaOKUIuVWlBES39tGJhYlouh8YDgZN+8TlQOigUoCGFuz+8 HHokUoa3fg+bkICA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1706529696; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GBsciSU2PNLY2CEBW32KWvsIrDZHLVktcbvqikbyh/o=; b=fuh7GIovGgJWQmEwW9kXQtkde1iuGcbQrZla7tebpE6smMjJubTfF5KuTHe5uCHtQJbnXL 3HgcNlMbf5O28wuM8WCJjh3kilCWLO3dNjCe67f6oNc4btq00UidZ+IK2vM1Mz1Hji0Ocb YUtE3lkaDkEo+9Ypo+3JuB9NfZ34Zvw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1706529696; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GBsciSU2PNLY2CEBW32KWvsIrDZHLVktcbvqikbyh/o=; b=IAAMcTG2rsw8yNpSmyuBufzRaOKUIuVWlBES39tGJhYlouh8YDgZN+8TlQOigUoCGFuz+8 HHokUoa3fg+bkICA== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 5452B132FA; Mon, 29 Jan 2024 12:01:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id dmWKFKCTt2WGZwAAn2gu4w (envelope-from ); Mon, 29 Jan 2024 12:01:36 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id F0714A0807; Mon, 29 Jan 2024 13:01:35 +0100 (CET) From: Jan Kara To: Hugh Dickins Cc: , Carlos Maiolino , Jan Kara Subject: [PATCH] shmem: Properly report quota mount options Date: Mon, 29 Jan 2024 13:01:31 +0100 Message-Id: <20240129120131.21145-1-jack@suse.cz> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1473; i=jack@suse.cz; h=from:subject; bh=SZTKwkMsYwXqNDIWyEnPp3ibGAvAgSCAejmpQ9U6RuE=; b=owEBbQGS/pANAwAIAZydqgc/ZEDZAcsmYgBlt5OVnX/LvvAUvVtPxX+5GjU5gWUKfJGLS1wlmNQT /SmpzVWJATMEAAEIAB0WIQSrWdEr1p4yirVVKBycnaoHP2RA2QUCZbeTlQAKCRCcnaoHP2RA2WqcB/ 4tCmolXxJZQKe/LVab+TAagsau+UmlIqNypk/ipvglXyuSUN1QtPsHDQnqMFGLabEWB2juCNEnJZpo zbOyXAuS6wrmp2lV2ORn5X7hzs9A4iGS29ueGGqTN6nwxnE7EQSqEhlfQQpyjCGw8MTjWB5vpWqK0b Wz+vK/jYOECIAuzwJEjKbW00QoqsPdJ/Df36M24xm2IYbBKzQGyvL9jmWBkxg/ev9kNnujVkojbId/ obrI8ON/pWt98pVNZiD6ReKA/eehY+IAEB2eV+OARbEW3FWUGZaq7ZVSwW1cnWPhZE+lN98aLu+F0C Wi3n+1puw7Ht756Pqg7PSErNvVYk2P X-Developer-Key: i=jack@suse.cz; a=openpgp; fpr=93C6099A142276A28BBE35D815BC833443038D8C X-Rspamd-Queue-Id: 524F340011 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: qhha56c3hch5ecwqomtrjj7jz8cjbobe X-HE-Tag: 1706529698-548404 X-HE-Meta: U2FsdGVkX1+JvdpKxT2XGsR7Si3wfRNIDfPuM0RlYjodyVNj2/cQ63id7gSP+GztP/LwOcM6Hc8pNrvzBITqRSGQgJRlV1EB92IopujdZjlBxsTgFbQs5HI4bse42NUx9qlMYu/YBW9f5zd/i13KbWtxA+0tiYLsjcuZCtcA/JlJqtMoulVkeUOMzYJBH6hOoHxdcOaHI8VONZysA6ajmvo0aaRJyv/V5ts4VSd9MVaz5YUO/+MnmQOQu+GxEXPjM2A07KK4+oh1H7DnsMatoY2q7k+sCy4CIqlUrPpZFwbH69i5vZUTApVyGMGfX5tZyDSVPlWwGK4n13S+vKjF3vFRNQ2bPC6zJlCGVUI2CIs2OyH9p79hz7WOABSC/ILUkW7JEPho3o3GUvStmeLsojg6GDgjnBl8zn1etjInRPc8/j5+1XTejeANO7LoA6/sjwdjXvth9xTIksvZwGDyzOxA760W3NVbDMAsTJoenJRvkBU3rETp7WoCF6M5BGypKmg7DSgwqBV5EDLpGe7yFM46Sc3Wjs5rdFU5ME5qaBeUcpNNtlPw4937C3SekX5rPIRxQCyg9aW7GWWAuWCO7R6fAM/AO/lPLbB8+J3QDhRm12Fd9KPgM7FXNDCV8yXP+NqToVUiKU0ucytt9wK1HS6EQypKK5xPYHylJpStgmbmB4kHIdfZ2xcg/ftCcT3p1qaDnKJz//L9DtkqVspxhowvZREez69JRvaQErNdrpE5kbfa0bk4rTEVS58lPg2FY6FoN/2hFRx4sV+mbbWSvcSpIQ3Wm1KGDWu0ryzoZTBtmohHBMFT+fyAlKvUvr2mO3h9TgaeAFG/ocie353QfKoCY7daFxrlIpH9feTEq3jFGzDUIaNTGG1HL+SDCh9/zdfAhrrW1I25wsDGdQSa1pOmAC/vfXpZLL0lKuE6TguTehgCLCzuEBG0yftApD3J8CFxvv5GeMpHr/n29K5 xQ+HUaut BqBMMX0CY3QMvTI1eCdUi91vgH5jqHhmfRR7Eac5SdSVLuJp/QCzVQ7DqQJKt2UwjxlLlm4xfME72OE/hM3nFSDiVJwFW7qfbH9JFKwmW/dznPngIp1QhWbU/Nrmf+OiUWTmKf7eE6YeQpNyi6+vG6nYijaTmAEGqmVhJactNUfrHqVST/GJaRiYd4A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Report quota options among the set of mount options. This allows proper user visibility into whether quotas are enabled or not. Fixes: e09764cff44b ("shmem: quota support") Signed-off-by: Jan Kara Reviewed-by: Carlos Maiolino Acked-by: Hugh Dickins --- mm/shmem.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) I've noticed this omission when testing quota-tools support for tmpfs... diff --git a/mm/shmem.c b/mm/shmem.c index d7c84ff62186..30c9dc862505 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -4265,6 +4265,24 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root) mpol_put(mpol); if (sbinfo->noswap) seq_printf(seq, ",noswap"); +#ifdef CONFIG_TMPFS_QUOTA + if (sb_has_quota_active(root->d_sb, USRQUOTA)) + seq_printf(seq, ",usrquota"); + if (sb_has_quota_active(root->d_sb, GRPQUOTA)) + seq_printf(seq, ",grpquota"); + if (sbinfo->qlimits.usrquota_bhardlimit) + seq_printf(seq, ",usrquota_block_hardlimit=%lld", + sbinfo->qlimits.usrquota_bhardlimit); + if (sbinfo->qlimits.grpquota_bhardlimit) + seq_printf(seq, ",grpquota_block_hardlimit=%lld", + sbinfo->qlimits.grpquota_bhardlimit); + if (sbinfo->qlimits.usrquota_ihardlimit) + seq_printf(seq, ",usrquota_inode_hardlimit=%lld", + sbinfo->qlimits.usrquota_ihardlimit); + if (sbinfo->qlimits.grpquota_ihardlimit) + seq_printf(seq, ",grpquota_inode_hardlimit=%lld", + sbinfo->qlimits.grpquota_ihardlimit); +#endif return 0; }