Re: [PATCH RFC] vfs: always log mount API fs context messages to dmesg

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

 



On Fri, Feb 23, 2024 at 04:06:29PM +0100, Christian Brauner wrote:
> On Thu, Feb 22, 2024 at 09:22:52AM -0600, Eric Sandeen wrote:
> > As filesystems are converted to the new mount API, informational messages,
> > errors, and warnings are being routed through infof, errorf, and warnf
> > type functions provided by the mount API, which places these messages in
> > the log buffer associated with the filesystem context rather than
> > in the kernel log / dmesg.
> > 
> > However, userspace is not yet extracting these messages, so they are
> > essentially getting lost. mount(8) still refers the user to dmesg(1)
> > on failure.
> 
> I mean sure we can do this. But we should try without a Kconfig option
> for this.
> 
> But mount(8) and util-linux have been switched to the new mount api in
> v2.39 and libmount already has the code to read and print the error
> messages:
> 
> https://github.com/util-linux/util-linux/blob/7ca98ca6aab919f271a15e40276cbb411e62f0e4/libmount/src/hook_mount.c#L68
> 
> but it's hidden behind DEBUG. So to me it seems much easier to just make
> util-linux and log those extra messages than start putting them into
> dmesg. Can't we try that first?

While it's true that libmount should be more intelligent in this
regard, I still believe that having all the messages accessible via
dmesg(1) is a good idea.

dmesg(1) collects messages from multiple mount calls, making it easy
to access messages generated by mount(8) when invoked from scripts,
systemd, etc. Having a single point to check for errors is convenient.

And dmesg(8) is also the traditional location where users and
documentation expect to find errors.

    Karel

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





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

  Powered by Linux