Re: Using the upcoming fsinfo()

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

 



On Tue, May 14, 2019 at 08:23:02AM +0800, Ian Kent wrote:
> On Mon, 2019-05-13 at 11:08 +0200, Karel Zak wrote:
> > The nice place where is ugly overhead with the current mountinfo is
> > context_umount.c code, see lookup_umount_fs() and
> > mnt_context_find_umount_fs(). In this code we have mountpoint and we
> > need more information about it (due to redirection to umount.<type>
> > helpers, userspace mount options, etc.). It sounds like ideal to use
> > mnt_fsinfo_fill_fs() if possible.
> 
> That sounds like an ideal opportunity for improvement by using
> fsinfo(). I'll look there too.

Yes.

> > The most visible change will be to use mnt_fsinfo_fill_table() with in
> > mnt_table_parse_file() if the file name is "/proc/self/mountinfo".
> > This will be huge improvement as we use this function in systemd on
> > each mount table change...
> > 
> > The question is how easily will be to replace mountinfo with fsinfo().

Now when I think about it I'm not sure if create complete mount table
by fsinfo() is the right way. Maybe many fsinfo() calls will be more
slow than generate mountinfo file in kernel and read() in userspace.
Not sure.

> I've been looking at libmount but I'm not sure I was focusing on
> libmnt_fs so I'm not sure yet.
>
> A large part of doing this early is to find out what's missing
> and see if it's possible to update fsinfo().

Yes, it would be really nice if we can get all info from fsinfo(). It
opens a new possibilities for us to make things like umount, remount,
and systemd more effective.

> For example, the devanme in mountinfo which can be different to
> the devname returned by fsinfo(), David has said it's not straight
> forward to change but at least he's aware of it and thinking about
> it.

Do you mean "source" field (9th column in mountinfo)? The device is
defined by maj:min (3rd column) in the file (well, whatever the devno
means for things like btrfs;-).

The "source" should be unmodified string as specified in userspace for
mount(2) syscall, otherwise things like "mount -a" can not compare the
kernel mount table with fstab.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux