diff options
author | Dimitri John Ledkov <xnox@ubuntu.com> | 2019-01-15 18:40:20 +0000 |
---|---|---|
committer | Dimitri John Ledkov <xnox@ubuntu.com> | 2019-01-15 18:41:08 +0000 |
commit | ada795fa8e7b1e27c134fe7d5aedf4517cd082f5 (patch) | |
tree | 5717f98c75f6b1a9fbae50b88c35f13d07993226 /Grow.c | |
parent | 88ee7cfa1e00aabcfc8f48b57f4b226e7b5c2158 (diff) |
New upstream release
* New upstream release
* Cherrypick patches from master up to 757e55435997e355ee9b03e5d913b5496a3c39a8.
Diffstat (limited to 'Grow.c')
-rw-r--r-- | Grow.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -754,7 +754,8 @@ static int check_idle(struct supertype *st) for (e = ent ; e; e = e->next) { if (!is_container_member(e, container)) continue; - if (e->percent >= 0) { + /* frozen array is not idle*/ + if (e->percent >= 0 || e->metadata_version[9] == '-') { is_idle = 0; break; } @@ -1195,7 +1196,8 @@ unsigned long compute_backup_blocks(int nchunk, int ochunk, /* Find GCD */ a = GCD(a, b); /* LCM == product / GCD */ - blocks = (ochunk/512) * (nchunk/512) * odata * ndata / a; + blocks = (unsigned long)(ochunk/512) * (unsigned long)(nchunk/512) * + odata * ndata / a; return blocks; } @@ -3284,7 +3286,7 @@ static int reshape_array(char *container, int fd, char *devname, goto release; } else if (verbose >= 0) printf("chunk size for %s set to %d\n", - devname, array.chunk_size); + devname, info->new_chunk); } unfreeze(st); return 0; |