Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311564
b: refs/heads/master
c: b357f04
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown committed Jul 3, 2012
1 parent e5d23e7 commit 6fa8528
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 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: f456309106e9657645c81bce1a6bb3230393564e
refs/heads/master: b357f04a67c2aeee828b240863cd3f21d6cb3179
7 changes: 2 additions & 5 deletions trunk/drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,6 @@ static void make_request(struct mddev *mddev, struct bio * bio)
const unsigned long do_sync = (bio->bi_rw & REQ_SYNC);
const unsigned long do_flush_fua = (bio->bi_rw & (REQ_FLUSH | REQ_FUA));
struct md_rdev *blocked_rdev;
int plugged;
int first_clone;
int sectors_handled;
int max_sectors;
Expand Down Expand Up @@ -1034,7 +1033,6 @@ static void make_request(struct mddev *mddev, struct bio * bio)
* the bad blocks. Each set of writes gets it's own r1bio
* with a set of bios attached.
*/
plugged = mddev_check_plugged(mddev);

disks = conf->raid_disks * 2;
retry_write:
Expand Down Expand Up @@ -1191,6 +1189,8 @@ static void make_request(struct mddev *mddev, struct bio * bio)
bio_list_add(&conf->pending_bio_list, mbio);
conf->pending_count++;
spin_unlock_irqrestore(&conf->device_lock, flags);
if (!mddev_check_plugged(mddev))
md_wakeup_thread(mddev->thread);
}
/* Mustn't call r1_bio_write_done before this next test,
* as it could result in the bio being freed.
Expand All @@ -1213,9 +1213,6 @@ static void make_request(struct mddev *mddev, struct bio * bio)

/* In case raid1d snuck in to freeze_array */
wake_up(&conf->wait_barrier);

if (do_sync || !bitmap || !plugged)
md_wakeup_thread(mddev->thread);
}

static void status(struct seq_file *seq, struct mddev *mddev)
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,6 @@ static void make_request(struct mddev *mddev, struct bio * bio)
const unsigned long do_fua = (bio->bi_rw & REQ_FUA);
unsigned long flags;
struct md_rdev *blocked_rdev;
int plugged;
int sectors_handled;
int max_sectors;
int sectors;
Expand Down Expand Up @@ -1239,7 +1238,6 @@ static void make_request(struct mddev *mddev, struct bio * bio)
* of r10_bios is recored in bio->bi_phys_segments just as with
* the read case.
*/
plugged = mddev_check_plugged(mddev);

r10_bio->read_slot = -1; /* make sure repl_bio gets freed */
raid10_find_phys(conf, r10_bio);
Expand Down Expand Up @@ -1396,6 +1394,8 @@ static void make_request(struct mddev *mddev, struct bio * bio)
bio_list_add(&conf->pending_bio_list, mbio);
conf->pending_count++;
spin_unlock_irqrestore(&conf->device_lock, flags);
if (!mddev_check_plugged(mddev, 0, 0))
md_wakeup_thread(mddev->thread);

if (!r10_bio->devs[i].repl_bio)
continue;
Expand Down Expand Up @@ -1423,6 +1423,8 @@ static void make_request(struct mddev *mddev, struct bio * bio)
bio_list_add(&conf->pending_bio_list, mbio);
conf->pending_count++;
spin_unlock_irqrestore(&conf->device_lock, flags);
if (!mddev_check_plugged(mddev))
md_wakeup_thread(mddev->thread);
}

/* Don't remove the bias on 'remaining' (one_write_done) until
Expand All @@ -1448,9 +1450,6 @@ static void make_request(struct mddev *mddev, struct bio * bio)

/* In case raid10d snuck in to freeze_array */
wake_up(&conf->wait_barrier);

if (do_sync || !mddev->bitmap || !plugged)
md_wakeup_thread(mddev->thread);
}

static void status(struct seq_file *seq, struct mddev *mddev)
Expand Down Expand Up @@ -2661,7 +2660,8 @@ static void raid10d(struct mddev *mddev)
blk_start_plug(&plug);
for (;;) {

flush_pending_writes(conf);
if (atomic_read(&mddev->plug_cnt) == 0)
flush_pending_writes(conf);

spin_lock_irqsave(&conf->device_lock, flags);
if (list_empty(head)) {
Expand Down
6 changes: 1 addition & 5 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -3997,7 +3997,6 @@ static void make_request(struct mddev *mddev, struct bio * bi)
struct stripe_head *sh;
const int rw = bio_data_dir(bi);
int remaining;
int plugged;

if (unlikely(bi->bi_rw & REQ_FLUSH)) {
md_flush_request(mddev, bi);
Expand All @@ -4016,7 +4015,6 @@ static void make_request(struct mddev *mddev, struct bio * bi)
bi->bi_next = NULL;
bi->bi_phys_segments = 1; /* over-loaded to count active stripes */

plugged = mddev_check_plugged(mddev);
for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) {
DEFINE_WAIT(w);
int previous;
Expand Down Expand Up @@ -4118,17 +4116,15 @@ static void make_request(struct mddev *mddev, struct bio * bi)
if ((bi->bi_rw & REQ_SYNC) &&
!test_and_set_bit(STRIPE_PREREAD_ACTIVE, &sh->state))
atomic_inc(&conf->preread_active_stripes);
mddev_check_plugged(mddev);
release_stripe(sh);
} else {
/* cannot get stripe for read-ahead, just give-up */
clear_bit(BIO_UPTODATE, &bi->bi_flags);
finish_wait(&conf->wait_for_overlap, &w);
break;
}

}
if (!plugged)
md_wakeup_thread(mddev->thread);

spin_lock_irq(&conf->device_lock);
remaining = raid5_dec_bi_phys_segments(bi);
Expand Down

0 comments on commit 6fa8528

Please sign in to comment.