On Thu, Nov 29, 2018 at 4:57 AM NeilBrown <neilb@xxxxxxxx> wrote: > > On Thu, Nov 29 2018, Ed Spiridonov wrote: > > The problem is here: > > blocks = (ochunk/512) * (nchunk/512) * odata * ndata / a; > > in compute_backup_blocks() in Grow.c in mdadm. Thanks, this patch works to me diff --git a/Grow.c b/Grow.c index 4436a4d..383a1d1 100644 --- a/Grow.c +++ b/Grow.c @@ -1196,7 +1196,7 @@ 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) * (nchunk/512) * odata * ndata / a; return blocks; }