]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit - e2fsck/super.c
Fix e2fsck's get_size logic so it will work with the Linux floppy driver
authorTheodore Ts'o <tytso@mit.edu>
Mon, 4 Jun 2007 05:14:52 +0000 (01:14 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 4 Jun 2007 05:14:52 +0000 (01:14 -0400)
commitd2af1bdd0526603b762c875630e82e0dd9eff059
tree4aee4eaa6f78a591705d5d4a4b3e2ba6166fd1bb
parenta2b2ff61c88ac7583f288a1723d8195a0b7f2f83
Fix e2fsck's get_size logic so it will work with the Linux floppy driver

The Linux floppy driver is a bit different from the other block device
drivers, in that if the device has been opened with O_EXCL, it disallows
another open(), even if the second open() does not have the O_EXCL flag.
So this patch moves the call to ext2fs_get_device_size() so that if it
returns EBUSY, e2fsck can close the filesystem, retry the device size,
and then reopen it.  This rather complicated approach is required since
we need to know the blocksize of the filesystem before we can call
ext2fs_get_device_size().

Addresses Debian Bug: #410569

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