diff options
author | NeilBrown <neilb@suse.de> | 2011-10-11 01:48:52 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-10-11 01:48:52 -0400 |
commit | 8f1ae43dd27eff2d71708be46fad339dbdd70bd1 (patch) | |
tree | 7e4a4e991e96a94fe98ffb811da9bf25ace4d283 /drivers/md | |
parent | a71207713a36e73fb1bc264453a9c594b95d3af1 (diff) |
md/faulty: remove typedef: conf_t -> struct faulty_conf
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/faulty.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c index a2d4c46ff2a1..571445e52541 100644 --- a/drivers/md/faulty.c +++ b/drivers/md/faulty.c | |||
@@ -81,16 +81,16 @@ static void faulty_fail(struct bio *bio, int error) | |||
81 | bio_io_error(b); | 81 | bio_io_error(b); |
82 | } | 82 | } |
83 | 83 | ||
84 | typedef struct faulty_conf { | 84 | struct faulty_conf { |
85 | int period[Modes]; | 85 | int period[Modes]; |
86 | atomic_t counters[Modes]; | 86 | atomic_t counters[Modes]; |
87 | sector_t faults[MaxFault]; | 87 | sector_t faults[MaxFault]; |
88 | int modes[MaxFault]; | 88 | int modes[MaxFault]; |
89 | int nfaults; | 89 | int nfaults; |
90 | struct md_rdev *rdev; | 90 | struct md_rdev *rdev; |
91 | } conf_t; | 91 | }; |
92 | 92 | ||
93 | static int check_mode(conf_t *conf, int mode) | 93 | static int check_mode(struct faulty_conf *conf, int mode) |
94 | { | 94 | { |
95 | if (conf->period[mode] == 0 && | 95 | if (conf->period[mode] == 0 && |
96 | atomic_read(&conf->counters[mode]) <= 0) | 96 | atomic_read(&conf->counters[mode]) <= 0) |
@@ -105,7 +105,7 @@ static int check_mode(conf_t *conf, int mode) | |||
105 | return 0; | 105 | return 0; |
106 | } | 106 | } |
107 | 107 | ||
108 | static int check_sector(conf_t *conf, sector_t start, sector_t end, int dir) | 108 | static int check_sector(struct faulty_conf *conf, sector_t start, sector_t end, int dir) |
109 | { | 109 | { |
110 | /* If we find a ReadFixable sector, we fix it ... */ | 110 | /* If we find a ReadFixable sector, we fix it ... */ |
111 | int i; | 111 | int i; |
@@ -129,7 +129,7 @@ static int check_sector(conf_t *conf, sector_t start, sector_t end, int dir) | |||
129 | return 0; | 129 | return 0; |
130 | } | 130 | } |
131 | 131 | ||
132 | static void add_sector(conf_t *conf, sector_t start, int mode) | 132 | static void add_sector(struct faulty_conf *conf, sector_t start, int mode) |
133 | { | 133 | { |
134 | int i; | 134 | int i; |
135 | int n = conf->nfaults; | 135 | int n = conf->nfaults; |
@@ -171,7 +171,7 @@ static void add_sector(conf_t *conf, sector_t start, int mode) | |||
171 | 171 | ||
172 | static int make_request(struct mddev *mddev, struct bio *bio) | 172 | static int make_request(struct mddev *mddev, struct bio *bio) |
173 | { | 173 | { |
174 | conf_t *conf = mddev->private; | 174 | struct faulty_conf *conf = mddev->private; |
175 | int failit = 0; | 175 | int failit = 0; |
176 | 176 | ||
177 | if (bio_data_dir(bio) == WRITE) { | 177 | if (bio_data_dir(bio) == WRITE) { |
@@ -224,7 +224,7 @@ static int make_request(struct mddev *mddev, struct bio *bio) | |||
224 | 224 | ||
225 | static void status(struct seq_file *seq, struct mddev *mddev) | 225 | static void status(struct seq_file *seq, struct mddev *mddev) |
226 | { | 226 | { |
227 | conf_t *conf = mddev->private; | 227 | struct faulty_conf *conf = mddev->private; |
228 | int n; | 228 | int n; |
229 | 229 | ||
230 | if ((n=atomic_read(&conf->counters[WriteTransient])) != 0) | 230 | if ((n=atomic_read(&conf->counters[WriteTransient])) != 0) |
@@ -259,7 +259,7 @@ static int reshape(struct mddev *mddev) | |||
259 | { | 259 | { |
260 | int mode = mddev->new_layout & ModeMask; | 260 | int mode = mddev->new_layout & ModeMask; |
261 | int count = mddev->new_layout >> ModeShift; | 261 | int count = mddev->new_layout >> ModeShift; |
262 | conf_t *conf = mddev->private; | 262 | struct faulty_conf *conf = mddev->private; |
263 | 263 | ||
264 | if (mddev->new_layout < 0) | 264 | if (mddev->new_layout < 0) |
265 | return 0; | 265 | return 0; |
@@ -299,7 +299,7 @@ static int run(struct mddev *mddev) | |||
299 | { | 299 | { |
300 | struct md_rdev *rdev; | 300 | struct md_rdev *rdev; |
301 | int i; | 301 | int i; |
302 | conf_t *conf; | 302 | struct faulty_conf *conf; |
303 | 303 | ||
304 | if (md_check_no_bitmap(mddev)) | 304 | if (md_check_no_bitmap(mddev)) |
305 | return -EINVAL; | 305 | return -EINVAL; |
@@ -327,7 +327,7 @@ static int run(struct mddev *mddev) | |||
327 | 327 | ||
328 | static int stop(struct mddev *mddev) | 328 | static int stop(struct mddev *mddev) |
329 | { | 329 | { |
330 | conf_t *conf = mddev->private; | 330 | struct faulty_conf *conf = mddev->private; |
331 | 331 | ||
332 | kfree(conf); | 332 | kfree(conf); |
333 | mddev->private = NULL; | 333 | mddev->private = NULL; |