aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-12-22 18:17:52 -0500
committerNeilBrown <neilb@suse.de>2011-12-22 18:17:52 -0500
commitede7ee8b4d007f308aa033be676b1a048f99e9db (patch)
tree2ce0dad4009b0f05617976034686855883f382bd
parent671488cc25f7c194c7c7a9f258bab1df17a6ff69 (diff)
md/raid5: raid5.h cleanup
Remove some #defines that are no longer used, and replace some others with an enum. And remove an unused field. Reviewed-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--drivers/md/raid5.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index 43106f01862d..4cfd8016010e 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -27,7 +27,7 @@
27 * The possible state transitions are: 27 * The possible state transitions are:
28 * 28 *
29 * Empty -> Want - on read or write to get old data for parity calc 29 * Empty -> Want - on read or write to get old data for parity calc
30 * Empty -> Dirty - on compute_parity to satisfy write/sync request.(RECONSTRUCT_WRITE) 30 * Empty -> Dirty - on compute_parity to satisfy write/sync request.
31 * Empty -> Clean - on compute_block when computing a block for failed drive 31 * Empty -> Clean - on compute_block when computing a block for failed drive
32 * Want -> Empty - on failed read 32 * Want -> Empty - on failed read
33 * Want -> Clean - on successful completion of read request 33 * Want -> Clean - on successful completion of read request
@@ -284,15 +284,6 @@ enum r5dev_flags {
284 R5_MadeGoodRepl,/* A bad block on the replacement device has been 284 R5_MadeGoodRepl,/* A bad block on the replacement device has been
285 * fixed by writing to it */ 285 * fixed by writing to it */
286}; 286};
287/*
288 * Write method
289 */
290#define RECONSTRUCT_WRITE 1
291#define READ_MODIFY_WRITE 2
292/* not a write method, but a compute_parity mode */
293#define CHECK_PARITY 3
294/* Additional compute_parity mode -- updates the parity w/o LOCKING */
295#define UPDATE_PARITY 4
296 287
297/* 288/*
298 * Stripe state 289 * Stripe state
@@ -320,13 +311,14 @@ enum {
320/* 311/*
321 * Operation request flags 312 * Operation request flags
322 */ 313 */
323#define STRIPE_OP_BIOFILL 0 314enum {
324#define STRIPE_OP_COMPUTE_BLK 1 315 STRIPE_OP_BIOFILL,
325#define STRIPE_OP_PREXOR 2 316 STRIPE_OP_COMPUTE_BLK,
326#define STRIPE_OP_BIODRAIN 3 317 STRIPE_OP_PREXOR,
327#define STRIPE_OP_RECONSTRUCT 4 318 STRIPE_OP_BIODRAIN,
328#define STRIPE_OP_CHECK 5 319 STRIPE_OP_RECONSTRUCT,
329 320 STRIPE_OP_CHECK,
321};
330/* 322/*
331 * Plugging: 323 * Plugging:
332 * 324 *
@@ -359,7 +351,6 @@ struct disk_info {
359struct r5conf { 351struct r5conf {
360 struct hlist_head *stripe_hashtbl; 352 struct hlist_head *stripe_hashtbl;
361 struct mddev *mddev; 353 struct mddev *mddev;
362 struct disk_info *spare;
363 int chunk_sectors; 354 int chunk_sectors;
364 int level, algorithm; 355 int level, algorithm;
365 int max_degraded; 356 int max_degraded;