diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 13:16:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-24 13:16:26 -0400 |
commit | 6c5103890057b1bb781b26b7aae38d33e4c517d8 (patch) | |
tree | e6e57961dcddcb5841acb34956e70b9dc696a880 /drivers/md/md.c | |
parent | 3dab04e6978e358ad2307bca563fabd6c5d2c58b (diff) | |
parent | 9d2e157d970a73b3f270b631828e03eb452d525e (diff) |
Merge branch 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block: (65 commits)
Documentation/iostats.txt: bit-size reference etc.
cfq-iosched: removing unnecessary think time checking
cfq-iosched: Don't clear queue stats when preempt.
blk-throttle: Reset group slice when limits are changed
blk-cgroup: Only give unaccounted_time under debug
cfq-iosched: Don't set active queue in preempt
block: fix non-atomic access to genhd inflight structures
block: attempt to merge with existing requests on plug flush
block: NULL dereference on error path in __blkdev_get()
cfq-iosched: Don't update group weights when on service tree
fs: assign sb->s_bdi to default_backing_dev_info if the bdi is going away
block: Require subsystems to explicitly allocate bio_set integrity mempool
jbd2: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
jbd: finish conversion from WRITE_SYNC_PLUG to WRITE_SYNC and explicit plugging
fs: make fsync_buffers_list() plug
mm: make generic_writepages() use plugging
blk-cgroup: Add unaccounted time to timeslice_used.
block: fixup plugging stubs for !CONFIG_BLOCK
block: remove obsolete comments for blkdev_issue_zeroout.
blktrace: Use rq->cmd_flags directly in blk_add_trace_rq.
...
Fix up conflicts in fs/{aio.c,super.c}
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index d5ad7723b172..06ecea751a39 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -780,8 +780,7 @@ void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, | |||
780 | bio->bi_end_io = super_written; | 780 | bio->bi_end_io = super_written; |
781 | 781 | ||
782 | atomic_inc(&mddev->pending_writes); | 782 | atomic_inc(&mddev->pending_writes); |
783 | submit_bio(REQ_WRITE | REQ_SYNC | REQ_UNPLUG | REQ_FLUSH | REQ_FUA, | 783 | submit_bio(REQ_WRITE | REQ_SYNC | REQ_FLUSH | REQ_FUA, bio); |
784 | bio); | ||
785 | } | 784 | } |
786 | 785 | ||
787 | void md_super_wait(mddev_t *mddev) | 786 | void md_super_wait(mddev_t *mddev) |
@@ -809,7 +808,7 @@ int sync_page_io(mdk_rdev_t *rdev, sector_t sector, int size, | |||
809 | struct completion event; | 808 | struct completion event; |
810 | int ret; | 809 | int ret; |
811 | 810 | ||
812 | rw |= REQ_SYNC | REQ_UNPLUG; | 811 | rw |= REQ_SYNC; |
813 | 812 | ||
814 | bio->bi_bdev = (metadata_op && rdev->meta_bdev) ? | 813 | bio->bi_bdev = (metadata_op && rdev->meta_bdev) ? |
815 | rdev->meta_bdev : rdev->bdev; | 814 | rdev->meta_bdev : rdev->bdev; |
@@ -1804,8 +1803,12 @@ int md_integrity_register(mddev_t *mddev) | |||
1804 | mdname(mddev)); | 1803 | mdname(mddev)); |
1805 | return -EINVAL; | 1804 | return -EINVAL; |
1806 | } | 1805 | } |
1807 | printk(KERN_NOTICE "md: data integrity on %s enabled\n", | 1806 | printk(KERN_NOTICE "md: data integrity enabled on %s\n", mdname(mddev)); |
1808 | mdname(mddev)); | 1807 | if (bioset_integrity_create(mddev->bio_set, BIO_POOL_SIZE)) { |
1808 | printk(KERN_ERR "md: failed to create integrity pool for %s\n", | ||
1809 | mdname(mddev)); | ||
1810 | return -EINVAL; | ||
1811 | } | ||
1809 | return 0; | 1812 | return 0; |
1810 | } | 1813 | } |
1811 | EXPORT_SYMBOL(md_integrity_register); | 1814 | EXPORT_SYMBOL(md_integrity_register); |
@@ -4817,7 +4820,6 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open) | |||
4817 | __md_stop_writes(mddev); | 4820 | __md_stop_writes(mddev); |
4818 | md_stop(mddev); | 4821 | md_stop(mddev); |
4819 | mddev->queue->merge_bvec_fn = NULL; | 4822 | mddev->queue->merge_bvec_fn = NULL; |
4820 | mddev->queue->unplug_fn = NULL; | ||
4821 | mddev->queue->backing_dev_info.congested_fn = NULL; | 4823 | mddev->queue->backing_dev_info.congested_fn = NULL; |
4822 | 4824 | ||
4823 | /* tell userspace to handle 'inactive' */ | 4825 | /* tell userspace to handle 'inactive' */ |
@@ -6692,8 +6694,6 @@ EXPORT_SYMBOL_GPL(md_allow_write); | |||
6692 | 6694 | ||
6693 | void md_unplug(mddev_t *mddev) | 6695 | void md_unplug(mddev_t *mddev) |
6694 | { | 6696 | { |
6695 | if (mddev->queue) | ||
6696 | blk_unplug(mddev->queue); | ||
6697 | if (mddev->plug) | 6697 | if (mddev->plug) |
6698 | mddev->plug->unplug_fn(mddev->plug); | 6698 | mddev->plug->unplug_fn(mddev->plug); |
6699 | } | 6699 | } |
@@ -6876,7 +6876,6 @@ void md_do_sync(mddev_t *mddev) | |||
6876 | >= mddev->resync_max - mddev->curr_resync_completed | 6876 | >= mddev->resync_max - mddev->curr_resync_completed |
6877 | )) { | 6877 | )) { |
6878 | /* time to update curr_resync_completed */ | 6878 | /* time to update curr_resync_completed */ |
6879 | md_unplug(mddev); | ||
6880 | wait_event(mddev->recovery_wait, | 6879 | wait_event(mddev->recovery_wait, |
6881 | atomic_read(&mddev->recovery_active) == 0); | 6880 | atomic_read(&mddev->recovery_active) == 0); |
6882 | mddev->curr_resync_completed = j; | 6881 | mddev->curr_resync_completed = j; |
@@ -6952,7 +6951,6 @@ void md_do_sync(mddev_t *mddev) | |||
6952 | * about not overloading the IO subsystem. (things like an | 6951 | * about not overloading the IO subsystem. (things like an |
6953 | * e2fsck being done on the RAID array should execute fast) | 6952 | * e2fsck being done on the RAID array should execute fast) |
6954 | */ | 6953 | */ |
6955 | md_unplug(mddev); | ||
6956 | cond_resched(); | 6954 | cond_resched(); |
6957 | 6955 | ||
6958 | currspeed = ((unsigned long)(io_sectors-mddev->resync_mark_cnt))/2 | 6956 | currspeed = ((unsigned long)(io_sectors-mddev->resync_mark_cnt))/2 |
@@ -6971,8 +6969,6 @@ void md_do_sync(mddev_t *mddev) | |||
6971 | * this also signals 'finished resyncing' to md_stop | 6969 | * this also signals 'finished resyncing' to md_stop |
6972 | */ | 6970 | */ |
6973 | out: | 6971 | out: |
6974 | md_unplug(mddev); | ||
6975 | |||
6976 | wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active)); | 6972 | wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active)); |
6977 | 6973 | ||
6978 | /* tell personality that we are finished */ | 6974 | /* tell personality that we are finished */ |