diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-03 18:45:10 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-03 18:45:10 -0400 |
| commit | a3da2c6913469ecb2224d891c45470b37b4d67f4 (patch) | |
| tree | cbedea8d0c8c101cfffccdbaf273e7adf92a4e46 | |
| parent | ff826b2b5b269ad440afa686ede879ccabfda387 (diff) | |
| parent | 6d9359280753d2955f86d6411047516a9431eb51 (diff) | |
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block bits from Jens Axboe:
"As vacation is coming up, thought I'd better get rid of my pending
changes in my for-linus branch for this iteration. It contains:
- Two patches for mtip32xx. Killing a non-compliant sysfs interface
and moving it to debugfs, where it belongs.
- A few patches from Asias. Two legit bug fixes, and one killing an
interface that is no longer in use.
- A patch from Jan, making the annoying partition ioctl warning a bit
less annoying, by restricting it to !CAP_SYS_RAWIO only.
- Three bug fixes for drbd from Lars Ellenberg.
- A fix for an old regression for umem, it hasn't really worked since
the plugging scheme was changed in 3.0.
- A few fixes from Tejun.
- A splice fix from Eric Dumazet, fixing an issue with pipe
resizing."
* 'for-linus' of git://git.kernel.dk/linux-block:
scsi: Silence unnecessary warnings about ioctl to partition
block: Drop dead function blk_abort_queue()
block: Mitigate lock unbalance caused by lock switching
block: Avoid missed wakeup in request waitqueue
umem: fix up unplugging
splice: fix racy pipe->buffers uses
drbd: fix null pointer dereference with on-congestion policy when diskless
drbd: fix list corruption by failing but already aborted reads
drbd: fix access of unallocated pages and kernel panic
xen/blkfront: Add WARN to deal with misbehaving backends.
blkcg: drop local variable @q from blkg_destroy()
mtip32xx: Create debugfs entries for troubleshooting
mtip32xx: Remove 'registers' and 'flags' from sysfs
blkcg: fix blkg_alloc() failure path
block: blkcg_policy_cfq shouldn't be used if !CONFIG_CFQ_GROUP_IOSCHED
block: fix return value on cfq_init() failure
mtip32xx: Remove version.h header file inclusion
xen/blkback: Copy id field when doing BLKIF_DISCARD.
| -rw-r--r-- | Documentation/ABI/testing/sysfs-block-rssd | 21 | ||||
| -rw-r--r-- | block/blk-cgroup.c | 9 | ||||
| -rw-r--r-- | block/blk-core.c | 25 | ||||
| -rw-r--r-- | block/blk-timeout.c | 41 | ||||
| -rw-r--r-- | block/cfq-iosched.c | 30 | ||||
| -rw-r--r-- | block/scsi_ioctl.c | 5 | ||||
| -rw-r--r-- | drivers/block/drbd/drbd_bitmap.c | 11 | ||||
| -rw-r--r-- | drivers/block/drbd/drbd_req.c | 66 | ||||
| -rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 166 | ||||
| -rw-r--r-- | drivers/block/mtip32xx/mtip32xx.h | 5 | ||||
| -rw-r--r-- | drivers/block/umem.c | 40 | ||||
| -rw-r--r-- | drivers/block/xen-blkback/common.h | 2 | ||||
| -rw-r--r-- | drivers/block/xen-blkfront.c | 58 | ||||
| -rw-r--r-- | fs/splice.c | 35 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 1 | ||||
| -rw-r--r-- | include/linux/splice.h | 8 | ||||
| -rw-r--r-- | kernel/relay.c | 5 | ||||
| -rw-r--r-- | kernel/trace/trace.c | 6 | ||||
| -rw-r--r-- | mm/shmem.c | 3 | ||||
| -rw-r--r-- | net/core/skbuff.c | 1 |
20 files changed, 338 insertions, 200 deletions
diff --git a/Documentation/ABI/testing/sysfs-block-rssd b/Documentation/ABI/testing/sysfs-block-rssd index 679ce3543122..beef30c046b0 100644 --- a/Documentation/ABI/testing/sysfs-block-rssd +++ b/Documentation/ABI/testing/sysfs-block-rssd | |||
| @@ -1,26 +1,5 @@ | |||
| 1 | What: /sys/block/rssd*/registers | ||
| 2 | Date: March 2012 | ||
| 3 | KernelVersion: 3.3 | ||
| 4 | Contact: Asai Thambi S P <asamymuthupa@micron.com> | ||
| 5 | Description: This is a read-only file. Dumps below driver information and | ||
| 6 | hardware registers. | ||
| 7 | - S ACTive | ||
| 8 | - Command Issue | ||
| 9 | - Completed | ||
| 10 | - PORT IRQ STAT | ||
| 11 | - HOST IRQ STAT | ||
| 12 | - Allocated | ||
| 13 | - Commands in Q | ||
| 14 | |||
| 15 | What: /sys/block/rssd*/status | 1 | What: /sys/block/rssd*/status |
| 16 | Date: April 2012 | 2 | Date: April 2012 |
| 17 | KernelVersion: 3.4 | 3 | KernelVersion: 3.4 |
| 18 | Contact: Asai Thambi S P <asamymuthupa@micron.com> | 4 | Contact: Asai Thambi S P <asamymuthupa@micron.com> |
| 19 | Description: This is a read-only file. Indicates the status of the device. | 5 | Description: This is a read-only file. Indicates the status of the device. |
| 20 | |||
| 21 | What: /sys/block/rssd*/flags | ||
| 22 | Date: May 2012 | ||
| 23 | KernelVersion: 3.5 | ||
| 24 | Contact: Asai Thambi S P <asamymuthupa@micron.com> | ||
| 25 | Description: This is a read-only file. Dumps the flags in port and driver | ||
| 26 | data structure | ||
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 02cf6335e9bd..e7dee617358e 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
| @@ -125,12 +125,8 @@ static struct blkcg_gq *blkg_alloc(struct blkcg *blkcg, struct request_queue *q) | |||
| 125 | 125 | ||
| 126 | blkg->pd[i] = pd; | 126 | blkg->pd[i] = pd; |
| 127 | pd->blkg = blkg; | 127 | pd->blkg = blkg; |
| 128 | } | ||
| 129 | |||
| 130 | /* invoke per-policy init */ | ||
| 131 | for (i = 0; i < BLKCG_MAX_POLS; i++) { | ||
| 132 | struct blkcg_policy *pol = blkcg_policy[i]; | ||
| 133 | 128 | ||
| 129 | /* invoke per-policy init */ | ||
| 134 | if (blkcg_policy_enabled(blkg->q, pol)) | 130 | if (blkcg_policy_enabled(blkg->q, pol)) |
| 135 | pol->pd_init_fn(blkg); | 131 | pol->pd_init_fn(blkg); |
| 136 | } | 132 | } |
| @@ -245,10 +241,9 @@ EXPORT_SYMBOL_GPL(blkg_lookup_create); | |||
| 245 | 241 | ||
| 246 | static void blkg_destroy(struct blkcg_gq *blkg) | 242 | static void blkg_destroy(struct blkcg_gq *blkg) |
| 247 | { | 243 | { |
| 248 | struct request_queue *q = blkg->q; | ||
| 249 | struct blkcg *blkcg = blkg->blkcg; | 244 | struct blkcg *blkcg = blkg->blkcg; |
| 250 | 245 | ||
| 251 | lockdep_assert_held(q->queue_lock); | 246 | lockdep_assert_held(blkg->q->queue_lock); |
| 252 | lockdep_assert_held(&blkcg->lock); | 247 | lockdep_assert_held(&blkcg->lock); |
| 253 | 248 | ||
| 254 | /* Something wrong if we are trying to remove same group twice */ | 249 | /* Something wrong if we are trying to remove same group twice */ |
diff --git a/block/blk-core.c b/block/blk-core.c index 3c923a7aeb56..93eb3e4f88ce 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
| @@ -361,9 +361,10 @@ EXPORT_SYMBOL(blk_put_queue); | |||
| 361 | */ | 361 | */ |
| 362 | void blk_drain_queue(struct request_queue *q, bool drain_all) | 362 | void blk_drain_queue(struct request_queue *q, bool drain_all) |
| 363 | { | 363 | { |
| 364 | int i; | ||
| 365 | |||
| 364 | while (true) { | 366 | while (true) { |
| 365 | bool drain = false; | 367 | bool drain = false; |
| 366 | int i; | ||
| 367 | 368 | ||
| 368 | spin_lock_irq(q->queue_lock); | 369 | spin_lock_irq(q->queue_lock); |
| 369 | 370 | ||
| @@ -408,6 +409,18 @@ void blk_drain_queue(struct request_queue *q, bool drain_all) | |||
| 408 | break; | 409 | break; |
| 409 | msleep(10); | 410 | msleep(10); |
| 410 | } | 411 | } |
| 412 | |||
| 413 | /* | ||
| 414 | * With queue marked dead, any woken up waiter will fail the | ||
| 415 | * allocation path, so the wakeup chaining is lost and we're | ||
| 416 | * left with hung waiters. We need to wake up those waiters. | ||
| 417 | */ | ||
| 418 | if (q->request_fn) { | ||
| 419 | spin_lock_irq(q->queue_lock); | ||
| 420 | for (i = 0; i < ARRAY_SIZE(q->rq.wait); i++) | ||
| 421 | wake_up_all(&q->rq.wait[i]); | ||
| 422 | spin_unlock_irq(q->queue_lock); | ||
| 423 | } | ||
| 411 | } | 424 | } |
| 412 | 425 | ||
| 413 | /** | 426 | /** |
| @@ -467,7 +480,6 @@ void blk_cleanup_queue(struct request_queue *q) | |||
| 467 | /* mark @q DEAD, no new request or merges will be allowed afterwards */ | 480 | /* mark @q DEAD, no new request or merges will be allowed afterwards */ |
| 468 | mutex_lock(&q->sysfs_lock); | 481 | mutex_lock(&q->sysfs_lock); |
| 469 | queue_flag_set_unlocked(QUEUE_FLAG_DEAD, q); | 482 | queue_flag_set_unlocked(QUEUE_FLAG_DEAD, q); |
| 470 | |||
| 471 | spin_lock_irq(lock); | 483 | spin_lock_irq(lock); |
| 472 | 484 | ||
| 473 | /* | 485 | /* |
| @@ -485,10 +497,6 @@ void blk_cleanup_queue(struct request_queue *q) | |||
| 485 | queue_flag_set(QUEUE_FLAG_NOMERGES, q); | 497 | queue_flag_set(QUEUE_FLAG_NOMERGES, q); |
| 486 | queue_flag_set(QUEUE_FLAG_NOXMERGES, q); | 498 | queue_flag_set(QUEUE_FLAG_NOXMERGES, q); |
| 487 | queue_flag_set(QUEUE_FLAG_DEAD, q); | 499 | queue_flag_set(QUEUE_FLAG_DEAD, q); |
| 488 | |||
| 489 | if (q->queue_lock != &q->__queue_lock) | ||
| 490 | q->queue_lock = &q->__queue_lock; | ||
| 491 | |||
| 492 | spin_unlock_irq(lock); | 500 | spin_unlock_irq(lock); |
| 493 | mutex_unlock(&q->sysfs_lock); | 501 | mutex_unlock(&q->sysfs_lock); |
| 494 | 502 | ||
| @@ -499,6 +507,11 @@ void blk_cleanup_queue(struct request_queue *q) | |||
| 499 | del_timer_sync(&q->backing_dev_info.laptop_mode_wb_timer); | 507 | del_timer_sync(&q->backing_dev_info.laptop_mode_wb_timer); |
| 500 | blk_sync_queue(q); | 508 | blk_sync_queue(q); |
| 501 | 509 | ||
| 510 | spin_lock_irq(lock); | ||
| 511 | if (q->queue_lock != &q->__queue_lock) | ||
| 512 | q->queue_lock = &q->__queue_lock; | ||
| 513 | spin_unlock_irq(lock); | ||
| 514 | |||
| 502 | /* @q is and will stay empty, shutdown and put */ | 515 | /* @q is and will stay empty, shutdown and put */ |
| 503 | blk_put_queue(q); | 516 | blk_put_queue(q); |
| 504 | } | 517 | } |
diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 780354888958..6e4744cbfb56 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c | |||
| @@ -197,44 +197,3 @@ void blk_add_timer(struct request *req) | |||
| 197 | mod_timer(&q->timeout, expiry); | 197 | mod_timer(&q->timeout, expiry); |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | /** | ||
| 201 | * blk_abort_queue -- Abort all request on given queue | ||
| 202 | * @queue: pointer to queue | ||
| 203 | * | ||
| 204 | */ | ||
| 205 | void blk_abort_queue(struct request_queue *q) | ||
| 206 | { | ||
| 207 | unsigned long flags; | ||
| 208 | struct request *rq, *tmp; | ||
| 209 | LIST_HEAD(list); | ||
| 210 | |||
| 211 | /* | ||
| 212 | * Not a request based block device, nothing to abort | ||
| 213 | */ | ||
