[Ocfs2-tools-devel] [PATCH 2/5] Fix: Resize check block_count > UINT32_MAX
Goldwyn Rodrigues
rgoldwyn at gmail.com
Tue Jan 17 12:10:12 PST 2012
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>
Signed-off-by: Michal Srb <msrb at suse.com>
---
tunefs.ocfs2/op_resize_volume.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/tunefs.ocfs2/op_resize_volume.c b/tunefs.ocfs2/op_resize_volume.c
index b16542f..c2f8ebd 100644
--- a/tunefs.ocfs2/op_resize_volume.c
+++ b/tunefs.ocfs2/op_resize_volume.c
@@ -552,8 +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 */
--
1.7.7
More information about the Ocfs2-tools-devel
mailing list