The patch titled md: simplify checking of available size when resizing an array has been removed from the -mm tree. Its filename was md-simplify-checking-of-available-size-when-resizing-an-array.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ Subject: md: simplify checking of available size when resizing an array From: NeilBrown <neilb@xxxxxxx> When "mdadm --grow --size=xxx" is used to resize an array (use more or less of each device), we check the new siza against the available space in each device. We already have that number recorded in rdev->size, so calculating it is pointless (and wrong in one obscure case). Signed-off-by: Neil Brown <neilb@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/md/md.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff -puN drivers/md/md.c~md-simplify-checking-of-available-size-when-resizing-an-array drivers/md/md.c --- a/drivers/md/md.c~md-simplify-checking-of-available-size-when-resizing-an-array +++ a/drivers/md/md.c @@ -4045,11 +4045,8 @@ static int update_size(mddev_t *mddev, u return -EBUSY; ITERATE_RDEV(mddev,rdev,tmp) { sector_t avail; - if (rdev->sb_offset > rdev->data_offset) - avail = (rdev->sb_offset*2) - rdev->data_offset; - else - avail = get_capacity(rdev->bdev->bd_disk) - - rdev->data_offset; + avail = rdev->size * 2; + if (fit && (size == 0 || size > avail/2)) size = avail/2; if (avail < ((sector_t)size << 1)) _ Patches currently in -mm which might be from neilb@xxxxxxx are origin.patch lockdep-annotate-nfs-nfsd-in-kernel-sockets.patch lockdep-annotate-nfs-nfsd-in-kernel-sockets-tidy.patch remove-lock_key-approach-to-managing-nested-bd_mutex-locks.patch simplify-some-aspects-of-bd_mutex-nesting.patch use-mutex_lock_nested-for-bd_mutex-to-avoid-lockdep-warning.patch avoid-lockdep-warning-in-md.patch lockdep-annotate-nfsd4-recover-code.patch md-conditionalize-some-code.patch md-dm-reduce-stack-usage-with-stacked-block-devices.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html