Commit Graph

229 Commits (35a0bdd7e23a7f0c297c66ae26d11456e2ae30ba)

Author SHA1 Message Date
Theodore Ts'o 7664c7538a e2fsck: if any problems are fixed in pass 0, check the whole file system
If there are any PREEN_OK problems fixed in check_super_block(), don't
skip checking the full file system.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-05-04 23:15:49 -04:00
Theodore Ts'o 93d0db347e e2fsck: don't use e2fsck_global_ctx in e2fsck_set_bitmap_type()
There is no reason to use e2fsck_global_ctx in
e2fsck_set_bitmap_type(), since we can get the context structure from
fs->priv_data.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2014-03-04 19:11:56 -05:00
Theodore Ts'o dde6333b96 e2fsck: always make sure e2fsck_global_ctx is set
The e2fsck_global_ctx varible was only being set if HAVE_SIGNAL_H is
defined.  There are systems, such as Android, where this is not true.

This was causing e2fsck_set_bitmap_type() to seg fault since
e2fsck_global_ctx was not NULL.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: JP Abgrall <jpa@google.com>
2014-03-04 19:05:00 -05:00
Theodore Ts'o f404167dda Clean up sparse warnings
Mostly by adding static and removing excess extern qualifiers.  Also
convert a few remaining non-ANSI function declarations to ANSI.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-16 18:56:36 -05:00
Andreas Dilger 45ff69ffeb build: quiet LLVM non-literal string format warning
Compiling with LLVM generates a large number of warnings due
to the use of _() for wrapping strings for i18n:

    warning: format string is not a string literal
          (potentially insecure) [-Wformat-security]
    ./nls-enable.h:4:14: note: expanded from macro '_'
    #define _(a) (gettext (a))
                 ^~~~~~~~~~~~

These warnings are fixed by using "%s" as the format string,
and then _() is used as the string argument.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-15 22:12:16 -05:00
Darrick J. Wong f0131bdc6f e2fsck: fix memory leaks (on error path)
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-12 12:57:50 -05:00
Theodore Ts'o 974d57d3b1 e2fsck: use errcode_t to suppress some -Wconversion warnings
We need to store some error codes using an int to keep recovery.c as
close as possible to the recovery.c source file in the kernel.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-12-02 21:37:10 -05:00
Darrick J. Wong 4dbfd79d14 e2fsprogs: fix blk_t <- blk64_t assignment mismatches
Fix all the places where we should be using a blk64_t instead of a
blk_t.  These fixes are more severe because 64bit values could be
truncated silently.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-10-07 09:51:48 -04:00
Nickolai Zeldovich a046da5963 e2fsck: avoid memory corruption on ext2fs_open2 failure
In try_open_fs(), if ext2fs_open2() returns an error, do not try to
access the struct ext2_filesys.  The previous check 'if (ret_fs)' was
always true, but even 'if (*ret_fs)' might be incorrect in some cases,
so check 'retval==0' instead.

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-01-08 20:42:26 -05:00
Theodore Ts'o e3507739e4 Fix gcc -Wall nits
This fixes the last set of gcc -Wall complaints.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-01-01 13:28:27 -05:00
Andreas Dilger 1d6fd6d0c3 misc: cleanup unused variables on MacOS
Clean up unused variables found by GCC on MacOS.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-12-29 17:28:37 -05:00
Theodore Ts'o 87e56a995c e2fsck: print the number of blocks and inodes in the verbose statistics
In addition to the free blocks and free inodes, also print the number
of blocks and inodes in the verbose statistics.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 19:02:29 -04:00
Theodore Ts'o da0fa8f498 e2fsck: allow for bigger disks when printing verbose statistics
Disks have gotten bigger, so 8 digits might not be enough.  Allow for
12 digits worth of blocks, which is more than enough for 3 petabytes.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 19:00:09 -04:00
Theodore Ts'o c0a849660d e2fsck: add e2fsck.conf options for extra reporting
Add report_time, report_verbose, and report_features options to
e2fsck.conf which enable additional, more verbose reporting by e2fsck.
This is useful for large cloud installations where there are a large
number file systems being managed, and where it may not be obvious
from the e2fsck log files exactly how a particular file system is
configured.

The report_time and report_verbose options, which are the same as the
-tt and -v command line options, respectively, are useful because they
are options specific to e2fsck, and the fsck program does not have a
way of passing certain options only to a specific /sbin/fsck.<fstype>
program.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 17:44:11 -04:00
Theodore Ts'o 78a0d2ba6d e2fsck: check a file system mounted read-only if forced
Previously e2fsck would only allow a mounted file system to be checked
if it was the root file system and it was mounted read-only.  Now
allow any file system mounted read-only if the -f option is specified.

This makes it easier to test how e2fsck handles checking file systems
which are mounted without having to test on the root file system.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 00:16:44 -04:00
Theodore Ts'o a85f83503a Revert "e2fsck: Skip journal checks if the fs is mounted and doesn't need recovery"
This reverts commit 47c1b8e166.

The original reason for this commit was to speed up boots for hard
drives.  However, I've measured the time difference on a 1TB laptop
drive, and it's not significant: 70ms vs 10ms when running e2fsck on a
clean file system.

The problem with this optimization is that we don't notice if the
journal superblock has a non-zero s_errno field.  If we don't transfer
the error indicator from the journal superblock to the file system
superblock, then the kernel will transfer it when the file system is
remounted read-write, causing scary messages to appear in the syslog.
(And since there was a bug in the kernel code which didn't clear the
error indicator in the journal superblock, it would never get
cleared.)

Reported-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-07-29 00:01:29 -04:00
Andreas Dilger cd5bb7c87b e2fsck: allow checking on mounted root fs
Commit 732e26b98e added checks to
prevent e2fsck from being run in filesystem-modifying mode against
a mounted or otherwise busy device, due to several bug reports of
users doing this even with the verbose warnings in check_mount().

However, it also prevented e2fsck from checking a mounted root
filesystem, which will prevent the node from booting.  Once again
allow e2fsck to run against the mounted root filesystem if it is
also mounted read-only at the time.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-05-31 16:41:41 -04:00
Andreas Dilger 732e26b98e e2fsck: fix checks done for mounted vs. read-only
Currently, if e2fsck is run without the "-n" flag (i.e. it
might modify the filesystem), there is no guarantee that it will
open the filesystem with the EXCLUSIVE flag (i.e. O_EXCL) to
prevent the block device from being checked (in most cases this
means mounted, but it could also be an MD/LVM member device).

Conversely, if e2fsck is run with "-n" (i.e. read-only), and
/etc/mtab or /proc/mounts does not report the block device as
mounted then e2fsck thinks the filesystem is unmounted.  In this
case, e2fsck incorrectly sets the EXCLUSIVE flag, which causes
the check to fail, even though e2fsck is running read-only.

To fix this, do not open with EXCLUSIVE if it is a read-only check,
and always open with EXCLUSIVE if the filesystem might be changed.
This also prevents filesystem mounts while e2fsck is running.

Also refuse allow e2fsck to run at all if the filesystem is BUSY.
The e2fsck check_mount() was checking for MOUNTED, but not BUSY,
and it should refuse to run outright if the block device is BUSY.
The previous MOUNTED heuristics pre-date the O_EXCL reservation
by the kernel, so there could be uncertainty due to stale /etc/mtab
data, but with newer kernels a busy device should never be modified.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-05-28 10:31:24 -04:00
Aditya Kali 7943ccf5f2 e2fsck,libquota: Update quota only if its inconsistent
Currently fsck recomputes quotas and overwrites quota files
whenever its run. This causes unnecessary modification of
filesystem even when quotas were never inconsistent. We also
lose the limits information because of this. With this patch,
e2fsck compares the computed quotas to the on-disk quotas
(while updating the in-memory limits) and writes out the
quota inode only if it is inconsistent.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-04-24 14:51:54 -04:00
Theodore Ts'o b24efa2187 Don't assume that the presence of mntent.h means that setmntent() exists
Change autoconf to test for setmntent() and use that to decide whether
to use getmntent() and setmntent(), since some systems don't have
setmntent() but they do have the mntent.h header file.

Also, remove the includes of mntent.h from e2fsck and mke2fs and other
places where it is not needed.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-04-05 15:31:09 -07:00
Theodore Ts'o e64e6761aa Fix gcc -Wall nitpicks
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-04-05 12:13:05 -07: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 349b8a37c5 e2fsck: avoid unnecessary close/reopen for non-MMP filesystems
For file systems that do not use MMP, there's no reason to close the
file system and then re-open the file system a second time, since
EXT2_FLAG_SKIP_MMP has no meaning for non-MMP file systems anyway.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger@whamcloud.com>
2012-03-21 23:18:49 -04:00
Theodore Ts'o 41cec3498f e2fsck: abort if ext2fs_check_desc() returns a memory failure
We were checking for ENOMEM, but in fact if the malloc() fails,
ext2fs_check_desc() will return EXT2_ET_NO_MEMORY.

Addresses-Google-Bug: #6208183

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-03-21 22:49:04 -04:00
Theodore Ts'o b0e91c8925 e2fsck: add logging capability
Add the ability to log messages about a file system to a specified
directory, using a file name templace that can be specified in
/etc/e2fsck.conf.  This allows us to suppress the output of overly
verbose e2fsck outputs while still allowing the full logging output to
go to an appropriate file.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-03-18 15:40:47 -04:00
Lukas Czerner f0fe5daecd e2fsck: do not discard when in read only mode
When argument '-n' was specified and should run in read-only mode, we
should not attempt to discard anything. In order to do that we have to
check for E2F_OPT_NO flag and clear E2F_OPT_DISCARD flag if E2F_OPT_NO
is set.

This commit fixes the problem when we would mark inode tables as zeroed
(EXT2_BG_INODE_ZEROED) even when e2fsck is running in read-only mode. We
also move the check for E2F_OPT_NO so we can clear E2F_OPT_DISCARD as
early as possible.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2012-03-11 15:38:28 -04:00
Theodore Ts'o ad880a0e2b e2fsck: check new sysfs interface to determine if we are on battery
...since the old way is deprecated.

Addresses-SourceForge-Bug: #3439277

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2012-02-20 19:10:19 -05:00
Theodore Ts'o 830b44f438 e2fsck: use different bitmap types as appropriate
Now that we have multiple backend implementations of the bitmap code,
this commit teaches e2fsck to use either the most appropriate backend
for each use case.

Since we don't know for sure if we will get it all right, the default
choices can be overridden via e2fsck.conf.  The various definitions
are shown here, with the current defaults (which may change as we add
more bitmap implementations and as learn what works better).

; EXT2FS_BAMP64_BITARRAY is 1
; EXT2FS_BMAP64_RBTREE is 2
; EXT2FS_BMAP64_AUTODIR is 3
[bitmaps]
	inode_used_map = 2	; pass1
	inode_dir_map = 3	; pass1
	inode_reg_map = 2	; pass1
	block_found_map = 2	; pass1
	inode_bad_map = 2	; pass1
	inode_imagic_map = 2	; pass1
	block_dup_map = 2	; pass1
	block_ea_map = 2	; pass1
	inode_link_info = 2	; pass1
	inode_dup_map = 2	; pass1b
	inode_done_map = 3	; pass3
	inode_loop_detect = 3	; pass3
	fs_bitmaps = 2

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-12-18 01:12:44 -05:00
Aditya Kali a86d55da8b libquota: cleanup libquota code
This patch cleans up the quota code as suggested in previous reviews. This
includes
* remove BUG_ON()s and 'exit()' calls from library code
* remove calls to malloc/free and instead use ext2fs_get/free_mem functions.
* lib/quota/common.c file in not needed anymore and is removed.
* rename exported functions to start with quota_
  (ex: init_quota_context --> quota_init_context)
* better error handling in quota library

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-11-14 10:55:54 -05:00
Theodore Ts'o 3fcd8fe8ac Fix more spelling errors found by translators and add pluralization
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-09 17:54:23 -04:00
Theodore Ts'o 9d4507c5b6 Pass the gettext() function to libcom_err
For those e2fsprogs programs which use libcom_err and are
internationalized, pass the gettext() function to libcom_err during
program initialization.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-10-05 01:00:30 -04:00
Darrick J. Wong 1660034c0a e2fsck: zero ctx->fs after freeing fs when restarting due to MMP
If MMP is enabled and e2fsck determines that it needs to restart
itself on account of various MMP conditions, it will close the current
fs and jump back to the start of fs checking.  However, closing fs
also frees it, which means that we need to set ctx->fs to NULL to
prevent subsequent open code from accessing the old deleted pointer.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-30 21:28:21 -04:00
Andreas Dilger 0f5eba7501 ext2fs: add multi-mount protection (INCOMPAT_MMP)
Multi-mount protection is feature that allows mke2fs, e2fsck, and
others to detect if the filesystem is mounted on a remote node (on
SAN disks) and avoid corrupting the filesystem.  For e2fsprogs this
means that it checks the MMP block to see if the filesystem is in use,
and marks the filesystem busy while e2fsck is running on the system.

This is useful on SAN disks that are shared between high-availability
servers, or accessible by multiple nodes that aren't in HA pairs.  MMP
isn't intended to serve as a primary HA exclusion mechanism, but as a
failsafe to protect against user, software, or hardware errors.

There is no requirement that e2fsck updates the MMP block at regular
intervals, but e2fsck does this occasionally to provide useful
information to the sysadmin in case of a detected conflict.

For the kernel (since Linux 3.0) MMP adds a "heartbeat" mechanism to
periodically write to disk (every few seconds by default) to notify
other nodes that the filesystem is still in use and unsafe to modify.

Originally-by: Kalpak Shah <kalpak@clusterfs.com>

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-09-25 01:55:23 -04:00
Theodore Ts'o d1154eb460 Shorten compile commands run by the build system
The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and
this was starting to cause some tools heartburn.  It also made "make
V=1" almost useless, since trying to following the individual commands
run by make was lost in the noise of all of the defines.

So fix this by putting the configure-generated defines in lib/config.h
and the directory pathnames to lib/dirpaths.h.

In addition, clean up some vestigal defines in configure.in and in the
Makefiles to further shorten the cc command lines.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-09-18 17:34:37 -04:00
Eric Sandeen fe65f1ecfc e2fsprogs: Don't try to close an fd which is negative
These reflect either file descriptors which aren't tested
for failure, or closures of fd's which may have failed.

In setup_tdb(), test for failure of mkstemp and return
without trying to open the file (again).

In reserve_stdio_fds, rather than closing the "extra"
fd == 3 due to the way the loop is written, just
don't go that far by using while (fd <= 2).

In logsave, it forks and retries forever if open fails,
but at least make coverity happy by explicitly not
trying to close a negative file descriptor.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-09-16 19:55:55 -04:00
Aditya Kali 624e4a6466 e2fsck: add support for checking the built-in quota files
This patch adds support for doing quota accounting during full
e2fsck scan if the 'quota' feature was set on the superblock.
If user-visible quota inodes are in use, they will be hidden
and converted to the reserved quota inodes.

Signed-off-by: Aditya Kali <adityakali@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-08-31 16:31:13 -04:00
Theodore Ts'o 9b3018a82e e2fsck: catch termination signals and print information about them
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-08-11 14:56:49 -04:00
Theodore Ts'o a3efe48420 e2fsck: fix mysterious "FILE SYSTEM WAS MODIFIED" with no changes
Commit 2a77a784a3 (firest released in e2fsprogs 1.33) compared
superblock summary free blocks and inode counts with the allocation
bitmap counts before starting the file system check proper, and if
they differed, set the superblock and marked it as dirty.  If no other
file systme changes were required, this would cause a "*** FILE SYSTEM
WAS MODIFIED ***" message without any explanation of what e2fsck had
changed.

We fix this by only setting the superblock summary free block/inodes
counts if we are skipping a full check, and in non-preen mode, e2fsck
will now print an explicit message stating how the superblock had been
updated.

In a full check, any updates to the superblock free blocks/inodes
fields will be noted in pass5.

This change requires changing a few test results (essentially
reversing the changes made in commit 2a77a784a3).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-06-16 01:22:02 -04:00
Andreas Dilger 931b58e1cb ext2fs: Handle internal journal over 2^32 bytes
The write_journal_inode() code is only setting the low 32-bit i_size
for the journal size, even though it is possible to specify a journal
up to 10M blocks in size.  Trying to create a journal larger than 2GB
will succeed, but an immediate e2fsck would fail.  Store i_size_high
for the journal inode when creating it, and load it upon access.

Use s_jnl_blocks[15] to store the journal i_size_high backup.  This
field is currently unused, as EXT2_N_BLOCKS is 15, so it is using
s_jnl_blocks[0..14], and i_size is in s_jnl_blocks[16].

Rename the "size" argument "num_blocks" for the journal creation functions
to clarify this parameter is in units of filesystem blocks and not bytes.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2011-06-11 12:17:29 -04:00
Theodore Ts'o b18c5fd51e Merge branch 'maint' into next 2011-05-07 23:24:55 -04:00
Theodore Ts'o 1760d167b2 e2fsck: make the "fs is mounted; continue?" prompt more paranoid
A user received the "file system is mounted; do you really want to
continue" prompt, and then instead of typing "n" for no, forgot that
he hadn't declined to continuation question, and typed the up-arrow
key, which in his locale, the 'A' in "^[[A" was interpreted as "yes",
and he lost data.

This was clearly the user's fault, but to make e2fsck a bit safer
against user stupidity/carelessness, we will change the "fs is
mounted; continue?" prompt to default to no, and treat the escape
character (along with the return and space characters, currently) as a
request for the default answer.

Addresses-Debian-Bug: #619859
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-05-07 23:14:06 -04:00
Theodore Ts'o 25623feab4 Merge branch 'master' into next
Conflicts:
	e2fsck/e2fsck.h
	e2fsck/unix.c
2010-12-16 23:20:11 -05:00
Theodore Ts'o 0358c9f9a4 Merge branch 'maint' into next
Conflicts:
	e2fsck/pass4.c
	misc/dumpe2fs.c
	resize/online.c
2010-12-13 09:16:09 -05:00
Bernd Schubert 71873b1730 e2fsck: add an option which causes it to only do a journal replay
As recently discussed on linux-ext4@vger.kernel.org add an option to e2fsck
to allow to replay the journal only. That will allow scripts, such as
pacemakers 'Filesystem' RA to first replay the journal and if that sets
an error state from the journal replay, further check for that error
(dumpe2fh -h | grep "Filesystem state:") and if that shows and error
to refuse to mount. It also allows automatic e2fsck scripts to first
replay the journal and on a second run after the real pass1 to passX checks
to test for the return code.

Signed-off-by: Bernd Schubert <bschubert@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2010-12-06 17:15:55 -05:00
Theodore Ts'o b95ca92811 e2fsck: Do blkid interpretation on the external journal specifier
If the user specifies "e2fsck -j UUID=XXX", e2fsck should do blkid
interpretation, since e2fsck does it with the base file system name.
So from the sake of consistency and user convenience, we should do it
here too.

Addresses-Debian-Bug: #559315

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-12-06 17:07:27 -05:00
Lukas Czerner efa1a355a1 e2fsck: Discard free data and inode blocks.
In Pass 5 when we are checking block and inode bitmaps we have great
opportunity to discard free space and unused inodes on the device,
because bitmaps has just been verified as valid. This commit takes
advantage of this opportunity and discards both, all free space and
unused inodes.

I have added new set of options, 'nodiscard' and 'discard'. When the
underlying devices does not support discard, or discard ends with an
error, or when any kind of error occurs on the filesystem, no further
discard attempt will be made and the e2fsck will behave as it would
with nodiscard option provided.

As an addition, when there is any not-yet-zeroed inode table and
discard zeroes data, then inode table is marked as zeroed.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2010-11-22 21:01:41 -05:00
Theodore Ts'o 9d92a201de Merge branch 'maint' into next
Conflicts:
	configure
	configure.in
	lib/ext2fs/ext2fs.h
	misc/mke2fs.c
2010-09-24 22:40:21 -04:00
Jan Kara 32f66cc791 e2fsck: Improve error message when device name misspelled
When a device name is misspelled, we output the full text about specifying
alternate superblock. This is slightly misleading because when the device
cannot be open because of ENOENT, this certainly won't help. So just print
that device does not exist and exit.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2010-09-19 22:54:58 -04:00
Theodore Ts'o db0bdb49f4 Merge branch 'maint' into next
Conflicts:
	resize/extent.c
2010-07-19 02:37:41 -04:00
Theodore Ts'o 22ff06d5f7 e2fsck: Add missing ext2fs_close() call when going back to original superblock
In the case where the original superblock and the backup superblock
are both invalid in some way, e2fsck will try to go back to the
orignal superblock.  To do that, it must close the attempted open
using the backup superblock first (since otherwise the exclusive open
will prevent the subsequent open from succeding).

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-07-05 15:06:37 -04:00