]> bbs.cooldavid.org Git - net-next-2.6.git/commit - drivers/md/raid5.c
md: handle_stripe5 - add request/completion logic for async expand ops
authorDan Williams <dan.j.williams@intel.com>
Tue, 2 Jan 2007 20:52:31 +0000 (13:52 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 13 Jul 2007 15:06:17 +0000 (08:06 -0700)
commitf0a50d3754c7f1b7f05f45b1c0b35d20445316b5
treec54b572ad4c4c9b48f887a9ecc28ec7b6166d552
parentb5e98d65d34a1c11a2135ea8a9b2619dbc7216c8
md: handle_stripe5 - add request/completion logic for async expand ops

When a stripe is being expanded bulk copying takes place to move the data
from the old stripe to the new.  Since raid5_run_ops only operates on one
stripe at a time these bulk copies are handled in-line under the stripe
lock.  In the dma offload case we poll for the completion of the operation.

After the data has been copied into the new stripe the parity needs to be
recalculated across the new disks.  We reuse the existing postxor
functionality to carry out this calculation.  By setting STRIPE_OP_POSTXOR
without setting STRIPE_OP_BIODRAIN the completion path in handle stripe
can differentiate expand operations from normal write operations.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-By: NeilBrown <neilb@suse.de>
drivers/md/raid5.c