[Ocfs2-tools-devel] [PATCH 5/5] tunefs.ocfs2: Deny block32 for device size in blocks > UINT32_MAX

Sunil Mushran sunil.mushran at oracle.com
Thu Jan 12 14:01:54 PST 2012


Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>

On 12/22/2011 03:42 PM, Goldwyn Rodrigues wrote:
> Signed-off-by: Goldwyn Rodrigues<rgoldwyn at suse.de>
> ---
>   tunefs.ocfs2/op_set_journal_block.c |    9 +++++++++
>   1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/tunefs.ocfs2/op_set_journal_block.c
> b/tunefs.ocfs2/op_set_journal_block.c
> index 61fbf39..5611ab4 100644
> --- a/tunefs.ocfs2/op_set_journal_block.c
> +++ b/tunefs.ocfs2/op_set_journal_block.c
> @@ -34,6 +34,15 @@ static int set_journal_block32_run(struct
> tunefs_operation *op,
>   	int rc = 0;
>   	ocfs2_fs_options mask, options;
>
> +	if (fs->fs_blocks>  UINT32_MAX) {
> +		tcom_err(TUNEFS_ET_OPERATION_FAILED,
> +			"- cannot set block32 on device - "
> +			"size(in blocks)>  %u) \"%s\"", UINT32_MAX,
> +			fs->fs_devname);
> +		rc = 1;
> +		goto out;
> +	}
> +
>   	memset(&mask,    0, sizeof(ocfs2_fs_options));
>   	memset(&options, 0, sizeof(ocfs2_fs_options));
>   	mask.opt_incompat |= JBD2_FEATURE_INCOMPAT_64BIT;




More information about the Ocfs2-tools-devel mailing list