Grow: a data_offset should not be tested against 0.

It should always be tested against INVALID_SECTORS!!!

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2013-06-19 16:55:35 +10:00
parent 97882bc806
commit e09233d048
1 changed files with 1 additions and 1 deletions

2
Grow.c
View File

@ -2792,7 +2792,7 @@ static int reshape_array(char *container, int fd, char *devname,
Manage_subdevs(devname, fd, devlist, verbose,
0,NULL, 0);
if (reshape.backup_blocks == 0 && data_offset)
if (reshape.backup_blocks == 0 && data_offset != INVALID_SECTORS)
reshape.backup_blocks = reshape.before.data_disks * info->array.chunk_size/512;
if (reshape.backup_blocks == 0) {
/* No restriping needed, but we might need to impose