On 2/23/24 9:06 AM, 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 *nod* > but it's hidden behind DEBUG. Yup. > 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? Sounds fine. Since we're trying to get a few more filesystems converted (hopefully all!) I just wanted to be sure that doing so doesn't end up losing useful information for the user. I guess we could do conversions in 2 passes, and wait to switch to warnf() and friends until util-linux makes use of it, but I'd hoped to not have to touch everything twice, hence thinking about logging to dmesg in the short term. But there are downsides and complexities to that as well. I'm not wedded to it, hence the RFC. :) Let's see what kzak thinks? We could also just delay any conversions that would need to pipe information through warnf(). Thanks, -Eric