diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-04 20:06:58 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-04 20:06:58 -0400 |
| commit | b4fdcb02f1e39c27058a885905bd0277370ba441 (patch) | |
| tree | fd4cfd1994f21f44afe5e7904681fb5ac09f81b8 /drivers/md/md.c | |
| parent | 044595d4e448305fbaec472eb7d22636d24e7d8c (diff) | |
| parent | 6dd9ad7df2019b1e33a372a501907db293ebcd0d (diff) | |
Merge branch 'for-3.2/core' of git://git.kernel.dk/linux-block
* 'for-3.2/core' of git://git.kernel.dk/linux-block: (29 commits)
block: don't call blk_drain_queue() if elevator is not up
blk-throttle: use queue_is_locked() instead of lockdep_is_held()
blk-throttle: Take blkcg->lock while traversing blkcg->policy_list
blk-throttle: Free up policy node associated with deleted rule
block: warn if tag is greater than real_max_depth.
block: make gendisk hold a reference to its queue
blk-flush: move the queue kick into
blk-flush: fix invalid BUG_ON in blk_insert_flush
block: Remove the control of complete cpu from bio.
block: fix a typo in the blk-cgroup.h file
block: initialize the bounce pool if high memory may be added later
block: fix request_queue lifetime handling by making blk_queue_cleanup() properly shutdown
block: drop @tsk from attempt_plug_merge() and explain sync rules
block: make get_request[_wait]() fail if queue is dead
block: reorganize throtl_get_tg() and blk_throtl_bio()
block: reorganize queue draining
block: drop unnecessary blk_get/put_queue() in scsi_cmd_ioctl() and blk_get_tg()
block: pass around REQ_* flags instead of broken down booleans during request alloc/free
block: move blk_throtl prototypes to block/blk.h
block: fix genhd refcounting in blkio_policy_parse_and_set()
...
Fix up trivial conflicts due to "mddev_t" -> "struct mddev" conversion
and making the request functions be of type "void" instead of "int" in
- drivers/md/{faulty.c,linear.c,md.c,md.h,multipath.c,raid0.c,raid1.c,raid10.c,raid5.c}
- drivers/staging/zram/zram_drv.c
Diffstat (limited to 'drivers/md/md.c')
| -rw-r--r-- | drivers/md/md.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 266e82ebaf11..2acb32827fde 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
| @@ -332,18 +332,17 @@ static DEFINE_SPINLOCK(all_mddevs_lock); | |||
| 332 | * call has finished, the bio has been linked into some internal structure | 332 | * call has finished, the bio has been linked into some internal structure |
| 333 | * and so is visible to ->quiesce(), so we don't need the refcount any more. | 333 | * and so is visible to ->quiesce(), so we don't need the refcount any more. |
| 334 | */ | 334 | */ |
| 335 | static int md_make_request(struct request_queue *q, struct bio *bio) | 335 | static void md_make_request(struct request_queue *q, struct bio *bio) |
| 336 | { | 336 | { |
| 337 | const int rw = bio_data_dir(bio); | 337 | const int rw = bio_data_dir(bio); |
| 338 | struct mddev *mddev = q->queuedata; | 338 | struct mddev *mddev = q->queuedata; |
| 339 | int rv; | ||
| 340 | int cpu; | 339 | int cpu; |
| 341 | unsigned int sectors; | 340 | unsigned int sectors; |
| 342 | 341 | ||
| 343 | if (mddev == NULL || mddev->pers == NULL | 342 | if (mddev == NULL || mddev->pers == NULL |
| 344 | || !mddev->ready) { | 343 | || !mddev->ready) { |
| 345 | bio_io_error(bio); | 344 | bio_io_error(bio); |
| 346 | return 0; | 345 | return; |
| 347 | } | 346 | } |
| 348 | smp_rmb(); /* Ensure implications of 'active' are visible */ | 347 | smp_rmb(); /* Ensure implications of 'active' are visible */ |
| 349 | rcu_read_lock(); | 348 | rcu_read_lock(); |
| @@ -368,7 +367,7 @@ static int md_make_request(struct request_queue *q, struct bio *bio) | |||
| 368 | * go away inside make_request | 367 | * go away inside make_request |
| 369 | */ | 368 | */ |
| 370 | sectors = bio_sectors(bio); | 369 | sectors = bio_sectors(bio); |
| 371 | rv = mddev->pers->make_request(mddev, bio); | 370 | mddev->pers->make_request(mddev, bio); |
| 372 | 371 | ||
| 373 | cpu = part_stat_lock(); | 372 | cpu = part_stat_lock(); |
| 374 | part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]); | 373 | part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]); |
| @@ -377,8 +376,6 @@ static int md_make_request(struct request_queue *q, struct bio *bio) | |||
| 377 | 376 | ||
| 378 | if (atomic_dec_and_test(&mddev->active_io) && mddev->suspended) | 377 | if (atomic_dec_and_test(&mddev->active_io) && mddev->suspended) |
| 379 | wake_up(&mddev->sb_wait); | 378 | wake_up(&mddev->sb_wait); |
| 380 | |||
| 381 | return rv; | ||
| 382 | } | 379 | } |
| 383 | 380 | ||
| 384 | /* mddev_suspend makes sure no new requests are submitted | 381 | /* mddev_suspend makes sure no new requests are submitted |
| @@ -477,8 +474,7 @@ static void md_submit_flush_data(struct work_struct *ws) | |||
| 477 | bio_endio(bio, 0); | 474 | bio_endio(bio, 0); |
| 478 | else { | 475 | else { |
| 479 | bio->bi_rw &= ~REQ_FLUSH; | 476 | bio->bi_rw &= ~REQ_FLUSH; |
| 480 | if (mddev->pers->make_request(mddev, bio)) | 477 | mddev->pers->make_request(mddev, bio); |
| 481 | generic_make_request(bio); | ||
| 482 | } | 478 | } |
| 483 | 479 | ||
| 484 | mddev->flush_bio = NULL; | 480 | mddev->flush_bio = NULL; |
