[Ocfs2-tools-devel] [PATCH 1/1] ocfs2_hb_ctl: Handle block devices with missing ioctl(BLKSSZGET)

Joel Becker Joel.Becker at oracle.com
Thu Jul 30 12:33:11 PDT 2009


saab

On Tue, Jul 28, 2009 at 03:42:08PM -0700, Sunil Mushran wrote:
> 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, &sectsize);
> -	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
> 
> 
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel

-- 

Life's Little Instruction Book #3

	"Watch a sunrise at least once a year."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list