> On Jan 20, 2021, at 12:13 PM, Gabriel Krisman Bertazi <krisman@xxxxxxxxxxxxx> wrote: > > > My apologies for the long email. > > Please let me know your thoughts. > > 1 Summary > ========= > > I'm looking for a filesystem-agnostic mechanism to report filesystem > errors to a monitoring tool in userspace. I experimented first with > the watch_queue API but decided to move to fanotify for a few reasons. > I don’t quite follow what the point in such user-space tool because anybody can take a look into the syslog. Even it is possible to grep error messages related to particular file system. What’s the point of such tool? I can see some point to report about file system corruption but you are talking about any error message. Moreover, it could be not trivial to track corruption even on file system driver’s side. > > 2 Background > ============ > > I submitted a first set of patches, based on David Howells' original > superblock notifications patchset, that I expanded into error > reporting and had an example implementation for ext4. Upstream review > has revealed a few design problems: > > - Including the "function:line" tuple in the notification allows the > uniquely identification of the error origin but it also ties the > decodification of the error to the source code, i.e. <function:line> > is expected to change between releases. > Error message itself could identify the location without the necessity to know <function:line>. Only specially generated UID can be good solution, I suppose. > - Useful debug data (inode number, block group) have formats specific > to the filesystems, and my design wouldn't be expansible to > filesystems other than ext4. > Different file system volumes associate inode ids with completely different objects. So, if you haven’t access to the same volume then this information could be useless. What’s the point to share these details? Sometimes, to track the issue in file system driver requires to know much more details related to particular volume. Finally, what’s the concrete use-cases that this user-space tool can be used? Currently, I don’t see any point to use this tool. The syslog is much more productive way to debug and to investigate the issues in file system driver. Thanks, Viacheslav Dubeyko.