e2fsprogs/tests/f_illitable
Darrick J. Wong b729b7dfab e2fsck: reserve blocks for root/lost+found directory repair
If we think we're going to need to repair either the root directory or
the lost+found directory, reserve a block at the end of pass 1 to
reduce the likelihood of an e2fsck abort while reconstructing
root/lost+found during pass 3.

If / and/or /lost+found are corrupt and duplicate processing in pass
1b allocates all the free blocks in the FS, fsck aborts with an
unusable FS since pass 3 can't recreate / or /lost+found.  If either
of those directories are missing, an admin can't easily mount the FS
and access the directory tree to move files off the injured FS and
free up space; this in turn prevents subsequent runs of e2fsck from
being able to continue repairs of the FS.

(One could migrate files manually with debugfs without the help of
path names, but it seems easier if users can simply mount the FS and
use regular FS management tools.)

[ Fixed up an obvious C trap: const char * and const char [] are not
  the same thing when you are taking the size of the parameter.
  People, run your regression tests!  Like spinach, it's good for you.  :-)
  -- tytso ]

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-07-26 15:45:42 -04:00
..
expect.1 e2fsck: reserve blocks for root/lost+found directory repair 2014-07-26 15:45:42 -04:00
expect.2 ChangeLog, expect.1, expect.2: 1998-12-04 06:18:58 +00:00
image.gz Many files: 1997-04-29 16:17:09 +00:00
name Many files: 1997-04-29 16:17:09 +00:00