From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: tytso@thunk.org Date: Tue, 28 Apr 2015 13:13:03 -0400 From: "Theodore Ts'o" To: Stanislav Brabec Cc: Karel Zak , util-linux@vger.kernel.org Subject: Re: [PATCH] fsck: implement fsck -r {fd} Message-ID: <20150428171302.GA11351@thunk.org> References: <553E53D7.8020800@suse.cz> <20150428115210.GW27969@ws.net.home> <20150428141558.GA2569@thunk.org> <553FAD98.5070202@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <553FAD98.5070202@suse.cz> List-ID: On Tue, Apr 28, 2015 at 05:56:08PM +0200, Stanislav Brabec wrote: > > >We're not parsing the output; it's something that we look at in the > >log files manually (i.e., by humans when trying to debug a problem.) > > SUSE boot scripts parse this output (well, it uses just a part of the > information) to synchronize fsck and quota activation. Passing an opened > file descriptor is a good solution for these purposes. > > This needs just the one-line statistics generated by fsck, underlying FS > specific statistics are not needed. Actually, what of the one-line statistics do you need? Is it just "we're done checking /dev/sdXX", so you can activate quotas for /dev/sdXX? If so, one of the other patches which Frank Mayhar (one of my collegaues) implemented the ability for fsck to run a "completion handler" which was a program/shell script that would get executed for each file system the check was completed -- and which would pass the exit status for each specific file system along to the completion handler. That allowed us to take specific action on a per-file system basis if a file system couldn't be repaired, without having to parse any of the log outputs to determine which file system had uncorrectable file system problems. I wonder if something like that would be useful for SuSE? Regards, - Ted