Bug 16430 - fsck doesn't pass -r parameter to fsck.vfat
Summary: fsck doesn't pass -r parameter to fsck.vfat
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-21 06:48 CEST by Ken Arromdee
Modified: 2015-07-31 09:43 CEST (History)
1 user (show)

See Also:
Source RPM: util-linux-2.25.2
CVE:
Status comment:


Attachments

Description Ken Arromdee 2015-07-21 06:48:23 CEST
Description of problem:


Version-Release number of selected component (if applicable): 
fsck from util-linux 2.25.2
fsck.fat 3.0.27 (2014-11-12)

How reproducible:
Always

Steps to Reproduce:

Find an SD card with vfat that needs some changes from fsck.

Without -r, both fsck and fsck.vfat default to doing nothing:


fsck /dev/sdb1
fsck from util-linux 2.25.2
fsck.fat 3.0.27 (2014-11-12)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
Leaving filesystem unchanged.


fsck.vfat /dev/sdb1
fsck.fat 3.0.27 (2014-11-12)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
Leaving filesystem unchanged.

The man page for fsck.vfat includes:

       -r  Interactively  repair  the filesystem. The user is asked for advice
           whenever there is more than one approach to fix an inconsistency.

The man page for fsck includes:

       -r     Interactively repair the  filesystem  (ask  for  confirmations).

However, -r works for fsck.vfat

fsck.vfat -r /dev/sdb1
fsck.fat 3.0.27 (2014-11-12)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
Perform changes ? (y/n)


while it does not work for plain fsck:

fsck -r /dev/sdb1
fsck from util-linux 2.25.2
fsck.fat 3.0.27 (2014-11-12)
0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
? 1
Leaving filesystem unchanged.


Although not all fsck filesystem types support -r, I expect that since fsck.vfat *does* support -r, plain fsck should pass the -r to fsck.vfat, and it obviously doesn't.

I had this problem in Mageia 4 as well.




Reproducible: 

Steps to Reproduce:
Comment 1 David Walser 2015-07-30 17:56:48 CEST
If that's the default upstream behavior, we won't just arbitrarily change it, it's probably that way for a reason.

If you really think this is incorrect behavior, I would suggest asking upstream util-linux.
Comment 2 Thierry Vignaud 2015-07-31 09:43:02 CEST
Indeed.
What's more fsck can be called non interactively at boot time and this would break if there was a vfat fs in /etc/fstab

Status: NEW => RESOLVED
CC: (none) => thierry.vignaud
Resolution: (none) => INVALID
Source RPM: (none) => util-linux-2.25.2


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