diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-30 18:34:09 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-30 18:34:09 -0400 |
| commit | 4476c0eead051ae6ff8abbc358763b00790d1635 (patch) | |
| tree | b78e6c3502236330a295f41298b25b00b190cadc | |
| parent | 35fd3dc58da675d659513384221349ef90749a01 (diff) | |
| parent | a1ecac3b0656a68259927c234e505804d33a7b83 (diff) | |
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block driver update from Jens Axboe:
"Distilled down variant, the rest will pass over to 3.8. I pulled it
into the for-linus branch I had waiting for a pull request as well, in
case you are wondering why there are new entries in here too. This
also got rid of two reverts and the ones of the mtip32xx patches that
went in later in the 3.6 cycle, so the series looks a bit cleaner."
* 'for-linus' of git://git.kernel.dk/linux-block:
loop: Make explicit loop device destruction lazy
mtip32xx:Added appropriate timeout value for secure erase
xen/blkback: Change xen_vbd's flush_support and discard_secure to have type unsigned int, rather than bool
cciss: select CONFIG_CHECK_SIGNATURE
cciss: remove unneeded memset()
xen/blkback: use kmem_cache_zalloc instead of kmem_cache_alloc/memset
pktcdvd: update MAINTAINERS
floppy: remove dr, reuse drive on do_floppy_init
floppy: use common function to check if floppies can be registered
floppy: properly handle failure on add_disk loop
floppy: do put_disk on current dr if blk_init_queue fails
floppy: don't call alloc_ordered_workqueue inside the alloc_disk loop
xen/blkback: Fix compile warning
block: Add blk_rq_pos(rq) to sort rq when plushing
drivers/block: remove CONFIG_EXPERIMENTAL
block: remove CONFIG_EXPERIMENTAL
vfs: fix: don't increase bio_slab_max if krealloc() fails
blkcg: stop iteration early if root_rl is the only request list
blkcg: Fix use-after-free of q->root_blkg and q->root_rl.blkg
| -rw-r--r-- | MAINTAINERS | 2 | ||||
| -rw-r--r-- | block/Kconfig | 2 | ||||
| -rw-r--r-- | block/blk-cgroup.c | 10 | ||||
| -rw-r--r-- | block/blk-core.c | 3 | ||||
| -rw-r--r-- | drivers/block/Kconfig | 15 | ||||
| -rw-r--r-- | drivers/block/cciss.c | 1 | ||||
| -rw-r--r-- | drivers/block/floppy.c | 90 | ||||
| -rw-r--r-- | drivers/block/loop.c | 17 | ||||
| -rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 19 | ||||
| -rw-r--r-- | drivers/block/mtip32xx/mtip32xx.h | 3 | ||||
| -rw-r--r-- | drivers/block/xen-blkback/common.h | 4 | ||||
| -rw-r--r-- | drivers/block/xen-blkback/xenbus.c | 9 | ||||
| -rw-r--r-- | fs/bio.c | 6 |
13 files changed, 113 insertions, 68 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 1fa907441f8f..cb7d1a42f2cd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -5647,7 +5647,7 @@ S: Maintained | |||
| 5647 | F: drivers/pinctrl/spear/ | 5647 | F: drivers/pinctrl/spear/ |
| 5648 | 5648 | ||
| 5649 | PKTCDVD DRIVER | 5649 | PKTCDVD DRIVER |
| 5650 | M: Peter Osterlund <petero2@telia.com> | 5650 | M: Jiri Kosina <jkosina@suse.cz> |
| 5651 | S: Maintained | 5651 | S: Maintained |
| 5652 | F: drivers/block/pktcdvd.c | 5652 | F: drivers/block/pktcdvd.c |
| 5653 | F: include/linux/pktcdvd.h | 5653 | F: include/linux/pktcdvd.h |
diff --git a/block/Kconfig b/block/Kconfig index 09acf1b39905..a7e40a7c8214 100644 --- a/block/Kconfig +++ b/block/Kconfig | |||
| @@ -89,7 +89,7 @@ config BLK_DEV_INTEGRITY | |||
| 89 | 89 | ||
| 90 | config BLK_DEV_THROTTLING | 90 | config BLK_DEV_THROTTLING |
| 91 | bool "Block layer bio throttling support" | 91 | bool "Block layer bio throttling support" |
| 92 | depends on BLK_CGROUP=y && EXPERIMENTAL | 92 | depends on BLK_CGROUP=y |
| 93 | default n | 93 | default n |
| 94 | ---help--- | 94 | ---help--- |
| 95 | Block layer bio throttling support. It can be used to limit | 95 | Block layer bio throttling support. It can be used to limit |
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index cafcd7431189..d0b770391ad4 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
| @@ -285,6 +285,13 @@ static void blkg_destroy_all(struct request_queue *q) | |||
| 285 | blkg_destroy(blkg); | 285 | blkg_destroy(blkg); |
| 286 | spin_unlock(&blkcg->lock); | 286 | spin_unlock(&blkcg->lock); |
| 287 | } | 287 | } |
| 288 | |||
| 289 | /* | ||
| 290 | * root blkg is destroyed. Just clear the pointer since | ||
| 291 | * root_rl does not take reference on root blkg. | ||
| 292 | */ | ||
| 293 | q->root_blkg = NULL; | ||
| 294 | q->root_rl.blkg = NULL; | ||
| 288 | } | 295 | } |
| 289 | 296 | ||
| 290 | static void blkg_rcu_free(struct rcu_head *rcu_head) | 297 | static void blkg_rcu_free(struct rcu_head *rcu_head) |
| @@ -326,6 +333,9 @@ struct request_list *__blk_queue_next_rl(struct request_list *rl, | |||
| 326 | */ | 333 | */ |
| 327 | if (rl == &q->root_rl) { | 334 | if (rl == &q->root_rl) { |
| 328 | ent = &q->blkg_list; | 335 | ent = &q->blkg_list; |
| 336 | /* There are no more block groups, hence no request lists */ | ||
| 337 | if (list_empty(ent)) | ||
| 338 | return NULL; | ||
| 329 | } else { | 339 | } else { |
| 330 | blkg = container_of(rl, struct blkcg_gq, rl); | 340 | blkg = container_of(rl, struct blkcg_gq, rl); |
| 331 | ent = &blkg->q_node; | 341 | ent = &blkg->q_node; |
diff --git a/block/blk-core.c b/block/blk-core.c index a33870b1847b..3c95c4d6e31a 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
| @@ -2868,7 +2868,8 @@ static int plug_rq_cmp(void *priv, struct list_head *a, struct list_head *b) | |||
| 2868 | struct request *rqa = container_of(a, struct request, queuelist); | 2868 | struct request *rqa = container_of(a, struct request, queuelist); |
| 2869 | struct request *rqb = container_of(b, struct request, queuelist); | 2869 | struct request *rqb = container_of(b, struct request, queuelist); |
| 2870 | 2870 | ||
| 2871 | return !(rqa->q <= rqb->q); | 2871 | return !(rqa->q < rqb->q || |
| 2872 | (rqa->q == rqb->q && blk_rq_pos(rqa) < blk_rq_pos(rqb))); | ||
| 2872 | } | 2873 | } |
| 2873 | 2874 | ||
| 2874 | /* | 2875 | /* |
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index f529407db93f..824e09c4d0d7 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig | |||
| @@ -131,6 +131,7 @@ config BLK_CPQ_DA | |||
| 131 | config BLK_CPQ_CISS_DA | 131 | config BLK_CPQ_CISS_DA |
| 132 | tristate "Compaq Smart Array 5xxx support" | 132 | tristate "Compaq Smart Array 5xxx support" |
| 133 | depends on PCI | 133 | depends on PCI |
| 134 | select CHECK_SIGNATURE | ||
| 134 | help | 135 | help |
| 135 | This is the driver for Compaq Smart Array 5xxx controllers. | 136 | This is the driver for Compaq Smart Array 5xxx controllers. |
| 136 | Everyone using these boards should say Y here. | 137 | Everyone using these boards should say Y here. |
| @@ -166,8 +167,8 @@ config BLK_DEV_DAC960 | |||
| 166 | module will be called DAC960. | 167 | module will be called DAC960. |
| 167 | 168 | ||
| 168 | config BLK_DEV_UMEM | 169 | config BLK_DEV_UMEM |
| 169 | tristate "Micro Memory MM5415 Battery Backed RAM support (EXPERIMENTAL)" | 170 | tristate "Micro Memory MM5415 Battery Backed RAM support" |
| 170 | depends on PCI && EXPERIMENTAL | 171 | depends on PCI |
| 171 | ---help--- | 172 | ---help--- |
| 172 | Saying Y here will include support for the MM5415 family of | 173 | Saying Y here will include support for the MM5415 family of |
| 173 | battery backed (Non-volatile) RAM cards. | 174 | battery backed (Non-volatile) RAM cards. |
| @@ -430,8 +431,8 @@ config CDROM_PKTCDVD_BUFFERS | |||
| 430 | a disc is opened for writing. | 431 | a disc is opened for writing. |
| 431 | 432 | ||
| 432 | config CDROM_PKTCDVD_WCACHE | 433 | config CDROM_PKTCDVD_WCACHE |
| 433 | bool "Enable write caching (EXPERIMENTAL)" | 434 | bool "Enable write caching" |
| 434 | depends on CDROM_PKTCDVD && EXPERIMENTAL | 435 | depends on CDROM_PKTCDVD |
| 435 | help | 436 | help |
| 436 | If enabled, write caching will be set for the CD-R/W device. For now | 437 | If enabled, write caching will be set for the CD-R/W device. For now |
| 437 | this option is dangerous unless the CD-RW media is known good, as we | 438 | this option is dangerous unless the CD-RW media is known good, as we |
| @@ -508,8 +509,8 @@ config XEN_BLKDEV_BACKEND | |||
| 508 | 509 | ||
| 509 | 510 | ||
| 510 | config VIRTIO_BLK | 511 | config VIRTIO_BLK |
| 511 | tristate "Virtio block driver (EXPERIMENTAL)" | 512 | tristate "Virtio block driver" |
| 512 | depends on EXPERIMENTAL && VIRTIO | 513 | depends on VIRTIO |
| 513 | ---help--- | 514 | ---help--- |
| 514 | This is the virtual block driver for virtio. It can be used with | 515 | This is the virtual block driver for virtio. It can be used with |
| 515 | lguest or QEMU based VMMs (like KVM or Xen). Say Y or M. | 516 | lguest or QEMU based VMMs (like KVM or Xen). Say Y or M. |
| @@ -528,7 +529,7 @@ config BLK_DEV_HD | |||
| 528 | 529 | ||
| 529 | config BLK_DEV_RBD | 530 | config BLK_DEV_RBD |
| 530 | tristate "Rados block device (RBD)" | 531 | tristate "Rados block device (RBD)" |
| 531 | depends on INET && EXPERIMENTAL && BLOCK | 532 | depends on INET && BLOCK |
| 532 | select CEPH_LIB | 533 | select CEPH_LIB |
| 533 | select LIBCRC32C | 534 | select LIBCRC32C |
| 534 | select CRYPTO_AES | 535 | select CRYPTO_AES |
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index b0f553b26d0f..ca83f96756ad 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
| @@ -5205,7 +5205,6 @@ static void cciss_shutdown(struct pci_dev *pdev) | |||
| 5205 | return; | 5205 | return; |
| 5206 | } | 5206 | } |
| 5207 | /* write all data in the battery backed cache to disk */ | 5207 | /* write all data in the battery backed cache to disk */ |
| 5208 | memset(flush_buf, 0, 4); | ||
| 5209 | return_code = sendcmd_withirq(h, CCISS_CACHE_FLUSH, flush_buf, | 5208 | return_code = sendcmd_withirq(h, CCISS_CACHE_FLUSH, flush_buf, |
| 5210 | 4, 0, CTLR_LUNID, TYPE_CMD); | 5209 | 4, 0, CTLR_LUNID, TYPE_CMD); |
| 5211 | kfree(flush_buf); | 5210 | kfree(flush_buf); |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 17c675c52295..1c49d7173966 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
| @@ -4109,12 +4109,19 @@ static struct platform_driver floppy_driver = { | |||
| 4109 | 4109 | ||
| 4110 | static struct platform_device floppy_device[N_DRIVE]; | 4110 | static struct platform_device floppy_device[N_DRIVE]; |
| 4111 | 4111 | ||
| 4112 | static bool floppy_available(int drive) | ||
| 4113 | { | ||
| 4114 | if (!(allowed_drive_mask & (1 << drive))) | ||
| 4115 | return false; | ||
| 4116 | if (fdc_state[FDC(drive)].version == FDC_NONE) | ||
| 4117 | return false; | ||
| 4118 | return true; | ||
| 4119 | } | ||
| 4120 | |||
| 4112 | static struct kobject *floppy_find(dev_t dev, int *part, void *data) | 4121 | static struct kobject *floppy_find(dev_t dev, int *part, void *data) |
| 4113 | { | 4122 | { |
| 4114 | int drive = (*part & 3) | ((*part & 0x80) >> 5); | 4123 | int drive = (*part & 3) | ((*part & 0x80) >> 5); |
| 4115 | if (drive >= N_DRIVE || | 4124 | if (drive >= N_DRIVE || !floppy_available(drive)) |
| 4116 | !(allowed_drive_mask & (1 << drive)) || | ||
| 4117 | fdc_state[FDC(drive)].version == FDC_NONE) | ||
| 4118 | return NULL; | 4125 | return NULL; |
| 4119 | if (((*part >> 2) & 0x1f) >= ARRAY_ | ||
