lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20140507143646.GB28814@thunk.org> Date: Wed, 7 May 2014 10:36:46 -0400 From: Theodore Ts'o <tytso@....edu> To: Lukas Czerner <lczerner@...hat.com> Cc: linux-ext4@...r.kernel.org Subject: Re: [PATCH v2] ext4: add sysfs entry showing whether the fs contains errors On Wed, May 07, 2014 at 02:04:34PM +0200, Lukas Czerner wrote: > > cat /sys/fs/ext4/sda/errors > > If the file system is not marked as containing errors then the file > returns just 0. Otherwise it would print out the following information: > > <error count> first <first_error_time> <first_error_func>:<first_error_line> \ > last <last_error_time> <last_error_func>:<last_error_line> This goes against the typical way in which information is returned in sysfs. Personally, I've always preferred the scheme used by, for example /proc/acpi/battery/BAT0/info, versus needing to read N different files in /sys/class/power_supply/BAT0/*, but the argument is that it's easier for programs to parse information if they are in separate files. It's one of the reasons why I've kept /proc/fs/ext4/sda3/mb_groups, since trying to convert that file over to the Church of Sysfs's style guidelines was far more work than it was worth. I'm not actually sure it's that important to be able to expose the error function and error line number via sysfs or procfs. If a process wants a complete record of all of the various errors, then dmesg or maybe some netlink socket is really the best interface for getting this information. For sysfs, I suspect the primary use will be answering the questions: "is this file system healthy or not", and "when did it first become unhealthy". And for questoins like this, the errors_count and first_error_time and last_error_time is probably the most useful bits of information to expose. Cheers, - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists