projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
[deliverable/linux.git]
/
drivers
/
md
/
raid10.c
diff --git
a/drivers/md/raid10.c
b/drivers/md/raid10.c
index a88aeb5198c76a6c3a5ed58693d71f751ae975a7..f0d082f749bea117522d7fc45be67320fb5ce9fc 100644
(file)
--- a/
drivers/md/raid10.c
+++ b/
drivers/md/raid10.c
@@
-799,13
+799,14
@@
static int make_request(mddev_t *mddev, struct bio * bio)
int i;
int chunk_sects = conf->chunk_mask + 1;
const int rw = bio_data_dir(bio);
int i;
int chunk_sects = conf->chunk_mask + 1;
const int rw = bio_data_dir(bio);
- const bool do_sync = (bio->bi_rw & REQ_SYNC);
+ const unsigned long do_sync = (bio->bi_rw & REQ_SYNC);
+ const unsigned long do_fua = (bio->bi_rw & REQ_FUA);
struct bio_list bl;
unsigned long flags;
mdk_rdev_t *blocked_rdev;
struct bio_list bl;
unsigned long flags;
mdk_rdev_t *blocked_rdev;
- if (unlikely(bio->bi_rw & REQ_
HARDBARRIER
)) {
- md_
barrier
_request(mddev, bio);
+ if (unlikely(bio->bi_rw & REQ_
FLUSH
)) {
+ md_
flush
_request(mddev, bio);
return 0;
}
return 0;
}
@@
-965,7
+966,7
@@
static int make_request(mddev_t *mddev, struct bio * bio)
conf->mirrors[d].rdev->data_offset;
mbio->bi_bdev = conf->mirrors[d].rdev->bdev;
mbio->bi_end_io = raid10_end_write_request;
conf->mirrors[d].rdev->data_offset;
mbio->bi_bdev = conf->mirrors[d].rdev->bdev;
mbio->bi_end_io = raid10_end_write_request;
- mbio->bi_rw = WRITE | do_sync;
+ mbio->bi_rw = WRITE | do_sync
| do_fua
;
mbio->bi_private = r10_bio;
atomic_inc(&r10_bio->remaining);
mbio->bi_private = r10_bio;
atomic_inc(&r10_bio->remaining);
@@
-1116,6
+1117,8
@@
static int raid10_spare_active(mddev_t *mddev)
int i;
conf_t *conf = mddev->private;
mirror_info_t *tmp;
int i;
conf_t *conf = mddev->private;
mirror_info_t *tmp;
+ int count = 0;
+ unsigned long flags;
/*
* Find all non-in_sync disks within the RAID10 configuration
/*
* Find all non-in_sync disks within the RAID10 configuration
@@
-1126,15
+1129,16
@@
static int raid10_spare_active(mddev_t *mddev)
if (tmp->rdev
&& !test_bit(Faulty, &tmp->rdev->flags)
&& !test_and_set_bit(In_sync, &tmp->rdev->flags)) {
if (tmp->rdev
&& !test_bit(Faulty, &tmp->rdev->flags)
&& !test_and_set_bit(In_sync, &tmp->rdev->flags)) {
- unsigned long flags;
- spin_lock_irqsave(&conf->device_lock, flags);
- mddev->degraded--;
- spin_unlock_irqrestore(&conf->device_lock, flags);
+ count++;
+ sysfs_notify_dirent(tmp->rdev->sysfs_state);
}
}
}
}
+ spin_lock_irqsave(&conf->device_lock, flags);
+ mddev->degraded -= count;
+ spin_unlock_irqrestore(&conf->device_lock, flags);
print_conf(conf);
print_conf(conf);
- return
0
;
+ return
count
;
}
}
@@
-1734,7
+1738,7
@@
static void raid10d(mddev_t *mddev)
raid_end_bio_io(r10_bio);
bio_put(bio);
} else {
raid_end_bio_io(r10_bio);
bio_put(bio);
} else {
- const
bool
do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC);
+ const
unsigned long
do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC);
bio_put(bio);
rdev = conf->mirrors[mirror].rdev;
if (printk_ratelimit())
bio_put(bio);
rdev = conf->mirrors[mirror].rdev;
if (printk_ratelimit())
This page took
0.024849 seconds
and
5
git commands to generate.