From 9c8c121881769c9ce77fd7d981608c976aac8b5b Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 20 Oct 2011 13:14:26 +1100 Subject: 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 --- super0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'super0.c') 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); -- cgit v1.2.3