From: Anand Jain <anand.jain@oracle.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org,
dsterba@suse.com, quwenruo@cn.fujitsu.com
Subject: Re: [PATCH RFC] vfs: add mount umount logs
Date: Wed, 24 May 2017 16:26:09 +0800 [thread overview]
Message-ID: <933a6b73-4e36-fe4f-951c-324e3de579d7@oracle.com> (raw)
In-Reply-To: <20170519150138.i65ycwawfhru6skz@thunk.org>
Thanks for the comments.
On 05/19/2017 11:01 PM, Theodore Ts'o wrote:
> On Fri, May 19, 2017 at 08:17:55AM +0800, Anand Jain wrote:
>>> XFS already logs its own unmounts.
>>
>> Nice. as far as I know its only in XFS.
>
> Ext4 logs mounts, but not unmounts.
>
>>> I prefer to let each filesystem log
>>> its own unmount, because then the mount/unmount messages also have the
>>> same prefix as all other messages coming from that filesystem driver.
>>
>> Ok. One nitpick though there are other mount types (remount, bind..),
>> and subsequent mounts of the same FS and FS driver can't log them
>> effectively.
>
> The other issue is there is a difference between when an unmount is
> started, or when a file system is unmounted in one namespace, and when
> the file system as a whole is unmounted by the low-level because there
> are no longer any references to the file system in any namespace.
> More than once I've gotten a bug report for ext4 that was really
> caused by the fact that some program had forked a daemon process in
> its own namespace, so when the USB thumbdrive was unmounted, it wasn't
> *really* unmounted. So being able to clearly express that in the logs
> is also a good thing.
Thanks.
> I think the way to do that is to have one set of logs for when the
> file system is unmounted from one mount namespace (or from a bind
> mount), with perhaps an indication of the number of remaining
> refcounts, and to make this be distinct from the unmount of the
> underlying low file system code, which should be logged by the file
> system code itself.
Thanks for suggesting. I have added sb->s_active in V2 in the ML.
And s_active value taken after mount and before umount, so it
may be a little confusing that the number is not seen as decremented
when umount is run. Also I didn't want to manipulate it (like -1) at
the time of logging. Unless if there is a better parameter to track
though.
Thanks, Anand
> - Ted
next prev parent reply other threads:[~2017-05-24 8:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 10:08 [PATCH RFC] vfs: add mount umount logs Anand Jain
2017-05-18 12:23 ` Carlos Maiolino
2017-05-18 22:04 ` Anand Jain
2017-05-18 17:39 ` Darrick J. Wong
2017-05-19 0:17 ` Anand Jain
2017-05-19 15:01 ` Theodore Ts'o
2017-05-24 8:26 ` Anand Jain [this message]
2017-05-19 15:17 ` Colin Walters
2017-05-24 8:20 ` Anand Jain
2017-05-24 8:19 ` [PATCH v2] " Anand Jain
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=933a6b73-4e36-fe4f-951c-324e3de579d7@oracle.com \
--to=anand.jain@oracle.com \
--cc=darrick.wong@oracle.com \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.com \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).