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/message | |
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/message')
-rw-r--r-- | drivers/message/i2o/i2o_block.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index ae7cad185898..47ec5bc0ed21 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c | |||
@@ -695,20 +695,22 @@ static int i2o_block_ioctl(struct block_device *bdev, fmode_t mode, | |||
695 | }; | 695 | }; |
696 | 696 | ||
697 | /** | 697 | /** |
698 | * i2o_block_media_changed - Have we seen a media change? | 698 | * i2o_block_check_events - Have we seen a media change? |
699 | * @disk: gendisk which should be verified | 699 | * @disk: gendisk which should be verified |
700 | * @clearing: events being cleared | ||
700 | * | 701 | * |
701 | * Verifies if the media has changed. | 702 | * Verifies if the media has changed. |
702 | * | 703 | * |
703 | * Returns 1 if the media was changed or 0 otherwise. | 704 | * Returns 1 if the media was changed or 0 otherwise. |
704 | */ | 705 | */ |
705 | static int i2o_block_media_changed(struct gendisk *disk) | 706 | static unsigned int i2o_block_check_events(struct gendisk *disk, |
707 | unsigned int clearing) | ||
706 | { | 708 | { |
707 | struct i2o_block_device *p = disk->private_data; | 709 | struct i2o_block_device *p = disk->private_data; |
708 | 710 | ||
709 | if (p->media_change_flag) { | 711 | if (p->media_change_flag) { |
710 | p->media_change_flag = 0; | 712 | p->media_change_flag = 0; |
711 | return 1; | 713 | return DISK_EVENT_MEDIA_CHANGE; |
712 | } | 714 | } |
713 | return 0; | 715 | return 0; |
714 | } | 716 | } |
@@ -895,11 +897,7 @@ static void i2o_block_request_fn(struct request_queue *q) | |||
895 | { | 897 | { |
896 | struct request *req; | 898 | struct request *req; |
897 | 899 | ||
898 | while (!blk_queue_plugged(q)) { | 900 | while ((req = blk_peek_request(q)) != NULL) { |
899 | req = blk_peek_request(q); | ||
900 | if (!req) | ||
901 | break; | ||
902 | |||
903 | if (req->cmd_type == REQ_TYPE_FS) { | 901 | if (req->cmd_type == REQ_TYPE_FS) { |
904 | struct i2o_block_delayed_request *dreq; | 902 | struct i2o_block_delayed_request *dreq; |
905 | struct i2o_block_request *ireq = req->special; | 903 | struct i2o_block_request *ireq = req->special; |
@@ -950,7 +948,7 @@ static const struct block_device_operations i2o_block_fops = { | |||
950 | .ioctl = i2o_block_ioctl, | 948 | .ioctl = i2o_block_ioctl, |
951 | .compat_ioctl = i2o_block_ioctl, | 949 | .compat_ioctl = i2o_block_ioctl, |
952 | .getgeo = i2o_block_getgeo, | 950 | .getgeo = i2o_block_getgeo, |
953 | .media_changed = i2o_block_media_changed | 951 | .check_events = i2o_block_check_events, |
954 | }; | 952 | }; |
955 | 953 | ||
956 | /** | 954 | /** |
@@ -1002,6 +1000,7 @@ static struct i2o_block_device *i2o_block_device_alloc(void) | |||
1002 | gd->major = I2O_MAJOR; | 1000 | gd->major = I2O_MAJOR; |
1003 | gd->queue = queue; | 1001 | gd->queue = queue; |
1004 | gd->fops = &i2o_block_fops; | 1002 | gd->fops = &i2o_block_fops; |
1003 | gd->events = DISK_EVENT_MEDIA_CHANGE; | ||
1005 | gd->private_data = dev; | 1004 | gd->private_data = dev; |
1006 | 1005 | ||
1007 | dev->gd = gd; | 1006 | dev->gd = gd; |