]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid10: unify handling of write completion.
authorNeilBrown <neilb@suse.de>
Tue, 6 Sep 2011 01:28:22 +0000 (11:28 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 6 Sep 2011 01:28:22 +0000 (11:28 +1000)
commitaf06bd9e6eb82e7d9f096f6ceeb2f00911042c9d
tree547781761f3d2acbd504b9ecf802a20e5cfba68d
parent0df163707dfa8a8da1d76600bd9c5c48327c9ecb
md/raid10: unify handling of write completion.

A write can complete at two different places:
1/ when the last member-device write completes, through
   raid10_end_write_request
2/ in make_request() when we remove the initial bias from ->remaining.

These two should do exactly the same thing and the comment says they
do, but they don't.

So factor the correct code out into a function and call it in both
places.  This makes the code much more similar to RAID1.

The difference is only significant if there is an error, and they
usually take a while, so it is unlikely that there will be an error
already when make_request is completing, so this is unlikely to cause
real problems.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid10.c