diff options
author | Theodore Ts'o <tytso@mit.edu> | 2007-06-04 01:14:52 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2007-06-04 01:14:52 -0400 |
commit | d2af1bdd0526603b762c875630e82e0dd9eff059 (patch) | |
tree | 4aee4eaa6f78a591705d5d4a4b3e2ba6166fd1bb /e2fsck/e2fsck.h | |
parent | a2b2ff61c88ac7583f288a1723d8195a0b7f2f83 (diff) | |
download | e2fsprogs-d2af1bdd0526603b762c875630e82e0dd9eff059.tar.gz |
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>
Diffstat (limited to 'e2fsck/e2fsck.h')
-rw-r--r-- | e2fsck/e2fsck.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/e2fsck/e2fsck.h b/e2fsck/e2fsck.h index ae337907..96b83dab 100644 --- a/e2fsck/e2fsck.h +++ b/e2fsck/e2fsck.h @@ -170,6 +170,7 @@ struct resource_track { * specified by the user */ #define E2F_FLAG_RESTARTED 0x0200 /* E2fsck has been restarted */ #define E2F_FLAG_RESIZE_INODE 0x0400 /* Request to recreate resize inode */ +#define E2F_FLAG_GOT_DEVSIZE 0x0800 /* Device size has been fetched */ /* * Defines for indicating the e2fsck pass number @@ -452,7 +453,6 @@ void e2fsck_rehash_directories(e2fsck_t ctx); /* super.c */ void check_super_block(e2fsck_t ctx); -errcode_t e2fsck_get_device_size(e2fsck_t ctx); /* swapfs.c */ void swap_filesys(e2fsck_t ctx); |