Bug 240545 - gfs2_fsck should behave more like the other fscks.
gfs2_fsck should behave more like the other fscks.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gfs2-utils (Show other bugs)
5.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Feist
:
Depends On: 286211
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-18 08:36 EDT by Steve Whitehouse
Modified: 2010-01-11 22:38 EST (History)
0 users

See Also:
Fixed In Version: RHBA-2008-0350
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 13:19:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch to fix the problem (9.93 KB, patch)
2007-08-07 11:58 EDT, Robert Peterson
no flags Details | Diff
Addendum patch (915 bytes, patch)
2007-10-11 12:04 EDT, Robert Peterson
no flags Details | Diff
Addendum patch revised (759 bytes, patch)
2007-10-11 12:29 EDT, Robert Peterson
no flags Details | Diff

  None (edit)
Description Steve Whitehouse 2007-05-18 08:36:47 EDT
This bug is largely so I don't forget about it, but a couple of things occured
to me about fsck which should really be addressed at some stage:

1. The question asking code shouldn't require a <return> after asking a y/n
question so that its compatible with other fsck question asking interfaces.

2. Is there any reason we cannot rename the binary to fsck.gfs2 like all the
other filesystems? Obviously we need backwards compatibility, but a symlink in
the packaging should deal with that.
Comment 1 Robert Peterson 2007-05-18 10:23:59 EDT
1. Should be easy.
2. Should be easy.

I'd like to add #3:

When I made the changes to allow SIGINT to be caught and to ask the user
if he/she wants to skip the current pass, I got into a bind whereby
if you interrupt it while a question is being asked, it does not
re-ask the question, so the user may be left confused.  My solution at the
time was to ignore the interrupt while it's asking any Y/N questions.
The problem with that is obvious: If there is a massive amount of
fs corruption, it will keep asking annoying questions and never let
the user break out of it.  Unless, of course, they go to another
terminal cli and use the kill command.  That's bad because sometimes 
they may just want to get out and restart it with the -y option.
Shouldn't be too difficult, but not quite as easy as #1 and #2.

So #3: Allow <ctrl-c> interrupts to be processed in a friendly
manner while a Y/N question is being asked.
Comment 2 Robert Peterson 2007-08-07 11:58:05 EDT
Created attachment 160826 [details]
Proposed patch to fix the problem

This patch has been tested on system trin-10 by manually answering
questions with a single character (no enter), interrupting the various
passes, and interrupting the questions.
Comment 3 Robert Peterson 2007-08-15 17:20:38 EDT
I posted the proposed fix to cluster-devel on 08 August 2007.
Nobody commented on the proposed patch so I'm assuming it's good to
go for RHEL5.2.
Comment 4 Robert Peterson 2007-08-15 18:34:04 EDT
Tested on system trin-10.  Committed to cvs in HEAD and RHEL5 branches.
Changing status to Modified.
Comment 5 Rob Kenna 2007-09-11 11:57:04 EDT
splitting out bug 286211: gfs2_fsck not found by fsck wrapper
Comment 6 Robert Peterson 2007-10-11 11:23:59 EDT
Discovered a small problem with this fix.  Need a modify it slightly.
Resetting to assigned state, since it hasn't been built yet and still
doesn't have the right ack flags at this time.
Comment 7 Robert Peterson 2007-10-11 12:04:50 EDT
Created attachment 224531 [details]
Addendum patch

This addendum patch fixes the problem mentioned in comment #6.
Comment 8 Robert Peterson 2007-10-11 12:29:27 EDT
Created attachment 224551 [details]
Addendum patch revised

Fixed a stupid bug in the previous addendum patch.
Comment 9 Robert Peterson 2007-10-11 12:36:59 EDT
Fix tested on roth-01 then committed to HEAD and RHEL5 branches for
inclusion in 5.2.  Setting back to modified state.
Comment 12 errata-xmlrpc 2008-05-21 13:19:57 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0350.html

Note You need to log in before you can comment on or make changes to this bug.