Re: [PATCH RFC] vfs: add mount umount logs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux