Dan Williams a445685647 raid5: refactor handle_stripe5 and handle_stripe6 (v3)
handle_stripe5 and handle_stripe6 have very deep logic paths handling the
various states of a stripe_head.  By introducing the 'stripe_head_state'
and 'r6_state' objects, large portions of the logic can be moved to
sub-routines.

'struct stripe_head_state' consumes all of the automatic variables that previously
stood alone in handle_stripe5,6.  'struct r6_state' contains the handle_stripe6
specific variables like p_failed and q_failed.

One of the nice side effects of the 'stripe_head_state' change is that it
allows for further reductions in code duplication between raid5 and raid6.
The following new routines are shared between raid5 and raid6:

	handle_completed_write_requests
	handle_requests_to_failed_array
	handle_stripe_expansion

Changes:
* v2: fixed 'conf->raid_disk-1' for the raid6 'handle_stripe_expansion' path
* v3: removed the unused 'dirty' field from struct stripe_head_state
* v3: coalesced open coded bi_end_io routines into return_io()

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-By: NeilBrown <neilb@suse.de>
2007-07-13 08:06:15 -07:00
..
2007-07-02 21:06:48 -07:00
2007-06-08 12:41:08 -07:00
2007-07-13 08:06:14 -07:00
2007-07-08 15:21:58 +02:00
2007-06-08 17:23:33 -07:00
2007-07-04 15:24:39 -07:00
2007-06-04 17:54:09 -07:00
2007-05-21 09:18:19 -07:00
2007-05-08 13:37:51 +10:00
2007-06-20 19:12:42 -04:00
2007-07-02 10:12:34 -04:00
2007-06-08 17:23:33 -07:00
2007-06-28 11:34:54 -07:00