[Ocfs2-tools-devel] [PATCH 2/5] tunefs.ocfs2: Fix - Do not allow resize while crossing 16TB

Sunil Mushran sunil.mushran at oracle.com
Thu Jan 12 13:40:47 PST 2012


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

On 12/22/2011 03:42 PM, Goldwyn Rodrigues wrote:
> The code to check resize while crossing 16TB boundaries is
> already present. However, there is a bug in bit manipulation
> which allowed the check to pass.
>
> However, this needs addition checks for block64 journal options.
>
> Signed-off-by: Goldwyn Rodrigues<rgoldwyn at suse.de>
> ---
>   tunefs.ocfs2/op_resize_volume.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tunefs.ocfs2/op_resize_volume.c b/tunefs.ocfs2/op_resize_volume.c
> index 0426d41..1409c08 100644
> --- a/tunefs.ocfs2/op_resize_volume.c
> +++ b/tunefs.ocfs2/op_resize_volume.c
> @@ -552,7 +552,7 @@ static errcode_t check_new_size(ocfs2_filesys *fs,
> uint64_t new_size,
>   		}
>   		try_clusters = device_clusters;
>   	}
> -	try_blocks = try_clusters<<  b_to_c_bits;
> +	try_blocks = (uint64_t)try_clusters<<  b_to_c_bits;
>
>   	/* Now we're guaranteed that try_clusters is within range */
>




More information about the Ocfs2-tools-devel mailing list