linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: Hugh Dickins <hughd@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Amir Goldstein <amir73il@gmail.com>,
	kernel@collabora.com, Khazhismel Kumykov <khazhy@google.com>,
	Linux MM <linux-mm@kvack.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH RESEND 2/3] shmem: Introduce /sys/fs/tmpfs support
Date: Mon, 4 Apr 2022 14:02:38 +0000	[thread overview]
Message-ID: <Ykr6fmRjMwEhIjtk@zeniv-ca.linux.org.uk> (raw)
In-Reply-To: <20220404134137.26284-3-krisman@collabora.com>

On Mon, Apr 04, 2022 at 09:41:36AM -0400, Gabriel Krisman Bertazi wrote:
> In order to expose tmpfs statistics on sysfs, add the boilerplate code
> to create the /sys/fs/tmpfs structure.  As suggested on a previous
> review, this uses the minor as the volume directory in /sys/fs/.
> 
> This takes care of not exposing SB_NOUSER mounts.  I don't think we have
> a usecase for showing them and, since they don't appear elsewhere, they
> might be confusing to users.
> 
> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>

> +static void shmem_unregister_sysfs(struct super_block *sb)
> +{
> +	struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
> +
> +	kobject_del(&sbinfo->s_kobj);
> +	kobject_put(&sbinfo->s_kobj);
> +	wait_for_completion(&sbinfo->s_kobj_unregister);
> +}

If you embed kobject into something, you basically commit to
having the lifetime rules maintained by that kobject...


  reply	other threads:[~2022-04-04 14:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 13:41 [PATCH RESEND 0/3] shmem: Allow userspace monitoring of tmpfs for lack of space Gabriel Krisman Bertazi
2022-04-04 13:41 ` [PATCH RESEND 1/3] shmem: Keep track of out-of-memory and out-of-space errors Gabriel Krisman Bertazi
2022-04-04 13:41 ` [PATCH RESEND 2/3] shmem: Introduce /sys/fs/tmpfs support Gabriel Krisman Bertazi
2022-04-04 14:02   ` Al Viro [this message]
2022-04-04 19:02     ` Gabriel Krisman Bertazi
2022-04-04 13:41 ` [PATCH RESEND 3/3] shmem: Expose space and accounting error count Gabriel Krisman Bertazi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ykr6fmRjMwEhIjtk@zeniv-ca.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=amir73il@gmail.com \
    --cc=hughd@google.com \
    --cc=kernel@collabora.com \
    --cc=khazhy@google.com \
    --cc=krisman@collabora.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox