]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd882ec65460022a3fe36d99b068e8d9743ceadc2
treec54b572ad4c4c9b48f887a9ecc28ec7b6166d552
parentdef724b40d97e273c417bbc415af9522e65d46e7
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