Whamcloud - gitweb
e2fsck: Make the -n always open the file system read-only
authorTheodore Ts'o <tytso@mit.edu>
Sat, 13 Mar 2010 00:18:20 +0000 (19:18 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 15 Mar 2010 04:14:12 +0000 (00:14 -0400)
commit298c9c2f2e7cbe4250d054d2e0f4bef007a940ac
tree9e30147166148eb8bc57d281e9346cb2c8cd94a7
parentecced2c3586fed83750dad2b82780c9d201f6973
e2fsck: Make the -n always open the file system read-only

A user was surprised when -n -D caused the file system to be opened
read/write, and then outsmarted himself when e2fsck asked the question:

   WARNING!!!  Running e2fsck on a mounted filesystem may cause
   SEVERE filesystem damage.

   Do you really want to continue (y/n)?

This is partially our fault for not documenting the fact that -D
overrode opening the filesystem read-write.  But the bottom line is it
much safer if -n *always* opens the file system read-only, so there
can be no confusion.  This means that we have to disable certain
combination of options, such as "-n -c", "-n -l", and "-n -L", and
"-n -D", but the utility of these combinations is pretty low, and
is more than offset by making e2fsck idiot-proof.

Addresses-Launchpad-Bug: #537483

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/e2fsck.8.in
e2fsck/unix.c