Commit Graph

9 Commits (master)

Author SHA1 Message Date
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
Theodore Ts'o 010c49cf49 e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors
Print the actual errors returned by ext2fs_open2() and
ext2fs_check_desc() before we fall back to the backup block group
descriptors so that it's easier to see if there is some obscure
failure that is causing e2fsck to think that it should use the backup
block group descriptors.

Addresses-Google-Bug: #6208183

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-03-21 23:40:24 -04:00
Theodore Ts'o 7ae1983a23 Clean up e2fsck problem description messages for typo's and to make them
easier to understand (sorry, translators).

Add new @m (multiply-claimed) and @n (invalid) expansions for e2fsck
problem descriptions.

Add Dutch translation, and update French translation.

Add an explanation of how the @-expansion and %-exapansion works in 
e2fsck/problem.c to make life easier for the translators.

Synchronize and update po files.
2005-06-19 09:45:36 -04:00
Theodore Ts'o 0684a4f33b Overhaul extended attribute handling. Should now be correct with
respect to the latest V2 bestbits ACL code.
2002-08-17 10:19:44 -04:00
Theodore Ts'o f122632e6b E2fsck now prints ranges in pass 5 when printing deltas in
the block and inode bitmaps.
2002-03-07 02:47:07 -05:00
Theodore Ts'o d56385e77c ChangeLog, expect.1, expect.2:
f_badtable, f_illitable, f_lpf: Update to deal with the fact that
  	e2fsck will now create a lost+found directory at the end of
  	pass 3 if one isn't present.
ChangeLog:
  Oops; premature checkin of ChangeLog.
1998-12-04 06:18:58 +00:00
Theodore Ts'o 1b6bf1759a Many files:
pass*.c, super.c: Massive changes to avoid using printf and com_err
  	routines.  All diagnostic messages are now routed through the
  	fix_problem interface.
  pass2.c (check_dir_block): Check for duplicate '.' and '..' entries.
  problem.c, problem.h: Add new problem codes PR_2_DUP_DOT and
  	PR_2_DUP_DOT_DOT.
  problem.c: Added new problem codes for some of the superblock
  	corruption checks, and for the pass header messages.  ("Pass
  	1: xxxxx")
  util.c (print_resource_track): Now takes a description argument.
  super.c, unix.c, e2fsck.c: New files to separate out the
  	operating-specific operations out from e2fsck.c.  e2fsck.c now
  	contains the global e2fsck context management routines, and
  	super.c contains the "pass 0" initial validation of the
  	superblock and global block group descriptors.
  pass1.c, pass2.c, pass3.c, pass4.c, pass5.c, util.c: Eliminate
  	(nearly) all global variables and moved them to the e2fsck
  	context structure.
  problem.c, problem.h: Added new problem codes PR_0_SB_CORRUPT,
  	PR_0_FS_SIZE_WRONG, PR_0_NO_FRAGMENTS, PR_0_BLOCKS_PER_GROUP,
  	PR_0_FIRST_DATA_BLOCK
expect.1, expect.2:
  Updated tests to align with e2fsck problem.c changes.
1997-10-03 17:48:10 +00:00
Theodore Ts'o 521e368572 Many files:
Checked in e2fsprogs 1.08.
1997-04-29 17:48:10 +00:00
Theodore Ts'o 19c78dc07f Many files:
Checked in e2fsprogs-1.07
1997-04-29 16:17:09 +00:00