diff options
author | NeilBrown <neilb@suse.de> | 2011-10-20 04:14:26 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-10-20 04:14:26 +0200 |
commit | 9c8c121881769c9ce77fd7d981608c976aac8b5b (patch) | |
tree | b2650cfa8a48ead49cf294d2c537730ad9507555 /super0.c | |
parent | imsm: fix: correct debug printing of the volume's name (diff) | |
download | mdadm-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |