[Ocfs2-tools-devel] [PATCH 2/5] tunefs.ocfs2: Fix - Do not allow resize while crossing 16TB
Goldwyn Rodrigues
rgoldwyn at gmail.com
Thu Dec 22 15:42:09 PST 2011
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 */
--
1.7.7
More information about the Ocfs2-tools-devel
mailing list