diff options
author | Roman Sobanski <roman.sobanski@intel.com> | 2018-04-27 12:12:21 +0200 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2018-04-27 15:30:32 +0200 |
commit | 5d518de84e7cd3382b4984cc1243ddb4102aa4f4 (patch) | |
tree | fb48b204eacce149b07354c58f1919a88457799f /Grow.c | |
parent | Prevent create IMSM volume with size smaller than 1M or chunk (diff) | |
download | mdadm-5d518de84e7cd3382b4984cc1243ddb4102aa4f4.tar.xz mdadm-5d518de84e7cd3382b4984cc1243ddb4102aa4f4.zip |
mdadm/grow: correct size and chunk_size casting
With commit 4b74a905a67e
("mdadm/grow: Component size must be larger than chunk size") mdadm returns
incorrect message if size given to grow was greater than 2 147 483 647 K.
Cast chunk_size to "unsigned long long" instead of casting size to "int".
Signed-off-by: Roman Sobanski <roman.sobanski@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'Grow.c')
-rw-r--r-- | Grow.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1821,7 +1821,7 @@ int Grow_reshape(char *devname, int fd, } if (array.level > 1 && s->size > 1 && - (array.chunk_size / 1024) > (int)s->size) { + (unsigned long long) (array.chunk_size / 1024) > s->size) { pr_err("component size must be larger than chunk size.\n"); return 1; } |