[Ocfs2-tools-devel] [PATCH 1/1] ocfs2_hb_ctl: Handle block devices with missing ioctl(BLKSSZGET)
Sunil Mushran
sunil.mushran at oracle.com
Tue Jul 28 15:42:08 PDT 2009
Make ocfs2_hb_ctl 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>
---
libocfs2/heartbeat.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/libocfs2/heartbeat.c b/libocfs2/heartbeat.c
index 193617a..7960d8e 100644
--- a/libocfs2/heartbeat.c
+++ b/libocfs2/heartbeat.c
@@ -54,8 +54,12 @@ errcode_t ocfs2_fill_heartbeat_desc(ocfs2_filesys *fs,
struct ocfs2_extent_rec *rec;
ret = ocfs2_get_device_sectsize(fs->fs_devname, §size);
- if (ret)
- goto leave;
+ if (ret) {
+ if (ret == OCFS2_ET_CANNOT_DETERMINE_SECTOR_SIZE)
+ sectsize = OCFS2_MIN_BLOCKSIZE;
+ else
+ goto leave;
+ }
sectsize_bits = ffs(sectsize) - 1;
--
1.6.0.4
More information about the Ocfs2-tools-devel
mailing list