From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: add dmesg output when mounting and unmounting
Date: Thu, 2 Nov 2023 21:18:18 +0100 [thread overview]
Message-ID: <20231102201818.GI11264@twin.jikos.cz> (raw)
In-Reply-To: <18fda4f8-8f3c-4dd1-8aca-667726e278df@oracle.com>
On Thu, Nov 02, 2023 at 09:16:19AM +0800, Anand Jain wrote:
> On 11/2/23 05:24, Qu Wenruo wrote:
> > There is a feature request to add dmesg output when unmounting a btrfs.
> >
> > There are several alternative methods to do the same thing, but with
> > their problems:
> >
> > - Use eBPF to watch btrfs_put_super()/open_ctree()
> > Not end user friendly, they have to dip their head into the source
> > code.
> >
> > - Watch for /sys/fs/<uuid>/
> > This is way more simpler, but still requires some simple device -> uuid
> > lookups.
> > And a script needs to use inotify to watch /sys/fs/.
> >
>
>
> > Compared to all these, directly outputting the information into dmesg
> > would be the most simple one, with both device and UUID included.
> >
>
> Well, I submitted a patch for this in 2017, but I'm not sure why it
> wasn't integrated or commented.
>
> https://lore.kernel.org/linux-btrfs/3352043d-dbb1-0055-f50a-c91ca43aff1d@oracle.com/
I think you sent it more than once and that I replied, messages about
mounting each subvolume (as in your patch) seem to be duplicating what
eg. audit or some policy layer should do. The same comment is in the
github issue.
The patch here and the request is to track only the first and last mount
of the same filesystem with a bit different use case, eg. properly
waiting until lazy umount finishe, or in container environments to be
sure that the last mount is gone.
The suggested waiting on /sys/fs/btrfs/UUID could eventually wrapped in
a subcommand, for conveniencie.
next prev parent reply other threads:[~2023-11-02 20:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 21:24 [PATCH] btrfs: add dmesg output when mounting and unmounting Qu Wenruo
2023-11-02 1:16 ` Anand Jain
2023-11-02 20:18 ` David Sterba [this message]
2023-11-03 5:02 ` Qu Wenruo
2023-11-13 17:45 ` David Sterba
2023-11-13 20:07 ` Qu Wenruo
2023-11-13 21:09 ` David Sterba
2023-11-14 0:38 ` Anand Jain
2023-11-14 11:12 ` Anand Jain
2023-11-14 12:03 ` David Sterba
2023-11-21 5:18 ` Anand Jain
2023-11-21 7:27 ` Anand Jain
2023-11-21 12:38 ` David Sterba
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=20231102201818.GI11264@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.com \
/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