* [PATCH] shmem: Properly report quota mount options @ 2024-01-29 12:01 ` Jan Kara 2024-02-05 11:51 ` Carlos Maiolino 0 siblings, 1 reply; 3+ messages in thread From: Jan Kara @ 2024-01-29 12:01 UTC (permalink / raw) To: Hugh Dickins; +Cc: linux-mm, Carlos Maiolino, Jan Kara 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 <jack@suse.cz> --- 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; } -- 2.35.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] shmem: Properly report quota mount options 2024-01-29 12:01 ` [PATCH] shmem: Properly report quota mount options Jan Kara @ 2024-02-05 11:51 ` Carlos Maiolino 2024-02-20 4:19 ` Hugh Dickins 0 siblings, 1 reply; 3+ messages in thread From: Carlos Maiolino @ 2024-02-05 11:51 UTC (permalink / raw) To: Jan Kara; +Cc: Hugh Dickins, linux-mm On Mon, Jan 29, 2024 at 01:01:31PM +0100, Jan Kara wrote: > 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 <jack@suse.cz> > --- > 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; >a } Looks good, thanks Honza. Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> > > -- > 2.35.3 > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] shmem: Properly report quota mount options 2024-02-05 11:51 ` Carlos Maiolino @ 2024-02-20 4:19 ` Hugh Dickins 0 siblings, 0 replies; 3+ messages in thread From: Hugh Dickins @ 2024-02-20 4:19 UTC (permalink / raw) To: Andrew Morton; +Cc: Carlos Maiolino, Jan Kara, Hugh Dickins, linux-mm On Mon, 5 Feb 2024, Carlos Maiolino wrote: > On Mon, Jan 29, 2024 at 01:01:31PM +0100, Jan Kara wrote: > > 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 <jack@suse.cz> > > --- > > 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; > >a } > > Looks good, thanks Honza. > > Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Acked-by: Hugh Dickins <hughd@google.com> Andrew, you were not on the Cc when Jan posted this, and I have been dilatory: but please pick it up now for mm-unstable. Original is at https://lore.kernel.org/linux-mm/20240129120131.21145-1-jack@suse.cz/ with Carlos' reviewed-by to be appended. Many thanks for looking after it all while I'm preoccupied (and even when I'm not), Hugh ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-20 4:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <B3mb7-ghi6siV8b3hS5IoZowfCUcLLx6r4421dKPwl7GJmH4tPtdEeIFC2yMyhkEX8Iwy6O_1teb62U2xn_hEA==@protonmail.internalid>
2024-01-29 12:01 ` [PATCH] shmem: Properly report quota mount options Jan Kara
2024-02-05 11:51 ` Carlos Maiolino
2024-02-20 4:19 ` Hugh Dickins
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).