diff options
author | NeilBrown <neilb@suse.de> | 2011-07-26 11:35:19 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-07-26 11:35:19 +1000 |
commit | f2b3b44deee1524ca4f006048e0569f47eefdb74 (patch) | |
tree | 49f758f1f46ceb9bbab9bdaa40117030f031a0b8 /drivers/md/raid5.h | |
parent | 82e5a1718b9d0401b826341b9023766d04cb82f2 (diff) |
md/raid5: unify stripe_head_state and r6_state
'struct stripe_head_state' stores state about the 'current' stripe
that is passed around while handling the stripe.
For RAID6 there is an extension structure: r6_state, which is also
passed around.
There is no value in keeping these separate, so move the fields from
the latter into the former.
This means that all code now needs to treat s->failed_num as an small
array, but this is a small cost.
Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Namhyung Kim <namhyung@gmail.com>
Diffstat (limited to 'drivers/md/raid5.h')
-rw-r--r-- | drivers/md/raid5.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h index bb246d9e054..05ac5cde370 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h @@ -242,13 +242,9 @@ struct stripe_head_state { int syncing, expanding, expanded; int locked, uptodate, to_read, to_write, failed, written; int to_fill, compute, req_compute, non_overwrite; - int failed_num; + int failed_num[2]; unsigned long ops_request; -}; - -/* r6_state - extra state data only relevant to r6 */ -struct r6_state { - int p_failed, q_failed, failed_num[2]; + int p_failed, q_failed; }; /* Flags */ |