Grow: set component size prior to array size
It is a partial revert of commit 758b327cf5
("Grow: Remove unnecessary
optimization"). For native metadata component size is set in kernel for
entire disk space. As external metadata supports multiple arrays within
one disk, the component size is set to array size. If component size is
not updated prior to array size update, the grow operation fails.
Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
This commit is contained in:
parent
ea1c4a8722
commit
07c45a1871
2
Grow.c
2
Grow.c
|
@ -1977,6 +1977,8 @@ int Grow_reshape(char *devname, int fd,
|
|||
*/
|
||||
min_csize = 0;
|
||||
for (mdi = sra->devs; mdi; mdi = mdi->next) {
|
||||
sysfs_set_num(sra, mdi, "size", s->size == MAX_SIZE ? 0
|
||||
: s->size);
|
||||
if (array.not_persistent == 0 &&
|
||||
array.major_version == 0 &&
|
||||
get_linux_version() < 3001000) {
|
||||
|
|
Loading…
Reference in New Issue