summaryrefslogtreecommitdiffstats
path: root/super0.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-10-20 04:14:26 +0200
committerNeilBrown <neilb@suse.de>2011-10-20 04:14:26 +0200
commit9c8c121881769c9ce77fd7d981608c976aac8b5b (patch)
treeb2650cfa8a48ead49cf294d2c537730ad9507555 /super0.c
parentimsm: fix: correct debug printing of the volume's name (diff)
downloadmdadm-9c8c121881769c9ce77fd7d981608c976aac8b5b.tar.xz
mdadm-9c8c121881769c9ce77fd7d981608c976aac8b5b.zip
super0: fix overflow when checking max size.
We need to force multiplication to use ULL before they get to big, else it overflows. So move the "2ULL" to the start. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super0.c')
-rw-r--r--super0.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/super0.c b/super0.c
index 3061ecfe..f3d0c07c 100644
--- a/super0.c
+++ b/super0.c
@@ -1142,7 +1142,7 @@ static int validate_geometry0(struct supertype *st, int level,
MD_SB_DISKS);
return 0;
}
- if (size >= tbmax * 1024*1024*1024*2ULL) {
+ if (size >= tbmax * 2ULL*1024*1024*1024) {
if (verbose)
fprintf(stderr, Name ": 0.90 metadata supports at most "
"%d terabytes per device\n", tbmax);