Commit ede7ee8b authored by NeilBrown's avatar NeilBrown

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: default avatarDan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 671488cc
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
* The possible state transitions are: * The possible state transitions are:
* *
* Empty -> Want - on read or write to get old data for parity calc * Empty -> Want - on read or write to get old data for parity calc
* Empty -> Dirty - on compute_parity to satisfy write/sync request.(RECONSTRUCT_WRITE) * Empty -> Dirty - on compute_parity to satisfy write/sync request.
* Empty -> Clean - on compute_block when computing a block for failed drive * Empty -> Clean - on compute_block when computing a block for failed drive
* Want -> Empty - on failed read * Want -> Empty - on failed read
* Want -> Clean - on successful completion of read request * Want -> Clean - on successful completion of read request
...@@ -284,15 +284,6 @@ enum r5dev_flags { ...@@ -284,15 +284,6 @@ enum r5dev_flags {
R5_MadeGoodRepl,/* A bad block on the replacement device has been R5_MadeGoodRepl,/* A bad block on the replacement device has been
* fixed by writing to it */ * fixed by writing to it */
}; };
/*
* Write method
*/
#define RECONSTRUCT_WRITE 1
#define READ_MODIFY_WRITE 2
/* not a write method, but a compute_parity mode */
#define CHECK_PARITY 3
/* Additional compute_parity mode -- updates the parity w/o LOCKING */
#define UPDATE_PARITY 4
/* /*
* Stripe state * Stripe state
...@@ -320,13 +311,14 @@ enum { ...@@ -320,13 +311,14 @@ enum {
/* /*
* Operation request flags * Operation request flags
*/ */
#define STRIPE_OP_BIOFILL 0 enum {
#define STRIPE_OP_COMPUTE_BLK 1 STRIPE_OP_BIOFILL,
#define STRIPE_OP_PREXOR 2 STRIPE_OP_COMPUTE_BLK,
#define STRIPE_OP_BIODRAIN 3 STRIPE_OP_PREXOR,
#define STRIPE_OP_RECONSTRUCT 4 STRIPE_OP_BIODRAIN,
#define STRIPE_OP_CHECK 5 STRIPE_OP_RECONSTRUCT,
STRIPE_OP_CHECK,
};
/* /*
* Plugging: * Plugging:
* *
...@@ -359,7 +351,6 @@ struct disk_info { ...@@ -359,7 +351,6 @@ struct disk_info {
struct r5conf { struct r5conf {
struct hlist_head *stripe_hashtbl; struct hlist_head *stripe_hashtbl;
struct mddev *mddev; struct mddev *mddev;
struct disk_info *spare;
int chunk_sectors; int chunk_sectors;
int level, algorithm; int level, algorithm;
int max_degraded; int max_degraded;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment