Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269261
b: refs/heads/master
c: 8f1ae43
h: refs/heads/master
i:
  269259: 593caf5
v: v3
  • Loading branch information
NeilBrown committed Oct 11, 2011
1 parent 49fa368 commit 8d1c394
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a71207713a36e73fb1bc264453a9c594b95d3af1
refs/heads/master: 8f1ae43dd27eff2d71708be46fad339dbdd70bd1
20 changes: 10 additions & 10 deletions trunk/drivers/md/faulty.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ static void faulty_fail(struct bio *bio, int error)
bio_io_error(b);
}

typedef struct faulty_conf {
struct faulty_conf {
int period[Modes];
atomic_t counters[Modes];
sector_t faults[MaxFault];
int modes[MaxFault];
int nfaults;
struct md_rdev *rdev;
} conf_t;
};

static int check_mode(conf_t *conf, int mode)
static int check_mode(struct faulty_conf *conf, int mode)
{
if (conf->period[mode] == 0 &&
atomic_read(&conf->counters[mode]) <= 0)
Expand All @@ -105,7 +105,7 @@ static int check_mode(conf_t *conf, int mode)
return 0;
}

static int check_sector(conf_t *conf, sector_t start, sector_t end, int dir)
static int check_sector(struct faulty_conf *conf, sector_t start, sector_t end, int dir)
{
/* If we find a ReadFixable sector, we fix it ... */
int i;
Expand All @@ -129,7 +129,7 @@ static int check_sector(conf_t *conf, sector_t start, sector_t end, int dir)
return 0;
}

static void add_sector(conf_t *conf, sector_t start, int mode)
static void add_sector(struct faulty_conf *conf, sector_t start, int mode)
{
int i;
int n = conf->nfaults;
Expand Down Expand Up @@ -171,7 +171,7 @@ static void add_sector(conf_t *conf, sector_t start, int mode)

static int make_request(struct mddev *mddev, struct bio *bio)
{
conf_t *conf = mddev->private;
struct faulty_conf *conf = mddev->private;
int failit = 0;

if (bio_data_dir(bio) == WRITE) {
Expand Down Expand Up @@ -224,7 +224,7 @@ static int make_request(struct mddev *mddev, struct bio *bio)

static void status(struct seq_file *seq, struct mddev *mddev)
{
conf_t *conf = mddev->private;
struct faulty_conf *conf = mddev->private;
int n;

if ((n=atomic_read(&conf->counters[WriteTransient])) != 0)
Expand Down Expand Up @@ -259,7 +259,7 @@ static int reshape(struct mddev *mddev)
{
int mode = mddev->new_layout & ModeMask;
int count = mddev->new_layout >> ModeShift;
conf_t *conf = mddev->private;
struct faulty_conf *conf = mddev->private;

if (mddev->new_layout < 0)
return 0;
Expand Down Expand Up @@ -299,7 +299,7 @@ static int run(struct mddev *mddev)
{
struct md_rdev *rdev;
int i;
conf_t *conf;
struct faulty_conf *conf;

if (md_check_no_bitmap(mddev))
return -EINVAL;
Expand Down Expand Up @@ -327,7 +327,7 @@ static int run(struct mddev *mddev)

static int stop(struct mddev *mddev)
{
conf_t *conf = mddev->private;
struct faulty_conf *conf = mddev->private;

kfree(conf);
mddev->private = NULL;
Expand Down

0 comments on commit 8d1c394

Please sign in to comment.