[Ocfs2-tools-devel] [PATCH] mkfs.ocfs2: Handle block devices with missing ioctl(BLKSSZGET)
Sunil Mushran
sunil.mushran at oracle.com
Tue Jul 28 14:20:06 PDT 2009
Make mkfs.ocfs2 use the default minimum blocksize if the block device is missing
support for ioctl(BLKSSZGET).
Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
---
mkfs.ocfs2/mkfs.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/mkfs.ocfs2/mkfs.c b/mkfs.ocfs2/mkfs.c
index 2eac8a4..8e910fa 100644
--- a/mkfs.ocfs2/mkfs.c
+++ b/mkfs.ocfs2/mkfs.c
@@ -1205,10 +1205,14 @@ fill_defaults(State *s)
err = ocfs2_get_device_sectsize(s->device_name, §size);
if (err) {
- com_err(s->progname, err,
- "while getting hardware sector size of device %s",
- s->device_name);
- exit(1);
+ if (err == OCFS2_ET_CANNOT_DETERMINE_SECTOR_SIZE)
+ sectsize = 0;
+ else {
+ com_err(s->progname, err,
+ "while getting hardware sector size of "
+ "device %s", s->device_name);
+ exit(1);
+ }
}
if (!sectsize)
sectsize = OCFS2_MIN_BLOCKSIZE;
--
1.6.0.4
More information about the Ocfs2-tools-devel
mailing list