diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-04 23:28:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-04 23:28:10 -0500 |
commit | d9734e0d1ccf87e828ad172c58a96dff97cfc0ba (patch) | |
tree | fcce824c45f17dbcc954bc55b8b642a967b962e0 /kernel/trace | |
parent | 0d51ce9ca1116e8f4dc87cb51db8dd250327e9bb (diff) | |
parent | 2404e607a9ee36db361bebe32787dafa1f7d6c00 (diff) |
Merge branch 'for-4.4/core' of git://git.kernel.dk/linux-block
Pull core block updates from Jens Axboe:
"This is the core block pull request for 4.4. I've got a few more
topic branches this time around, some of them will layer on top of the
core+drivers changes and will come in a separate round. So not a huge
chunk of changes in this round.
This pull request contains:
- Enable blk-mq page allocation tracking with kmemleak, from Catalin.
- Unused prototype removal in blk-mq from Christoph.
- Cleanup of the q->blk_trace exchange, using cmpxchg instead of two
xchg()'s, from Davidlohr.
- A plug flush fix from Jeff.
- Also from Jeff, a fix that means we don't have to update shared tag
sets at init time unless we do a state change. This cuts down boot
times on thousands of devices a lot with scsi/blk-mq.
- blk-mq waitqueue barrier fix from Kosuke.
- Various fixes from Ming:
- Fixes for segment merging and splitting, and checks, for
the old core and blk-mq.
- Potential blk-mq speedup by marking ctx pending at the end
of a plug insertion batch in blk-mq.
- direct-io no page dirty on kernel direct reads.
- A WRITE_SYNC fix for mpage from Roman"
* 'for-4.4/core' of git://git.kernel.dk/linux-block:
blk-mq: avoid excessive boot delays with large lun counts
blktrace: re-write setting q->blk_trace
blk-mq: mark ctx as pending at batch in flush plug path
blk-mq: fix for trace_block_plug()
block: check bio_mergeable() early before merging
blk-mq: check bio_mergeable() early before merging
block: avoid to merge splitted bio
block: setup bi_phys_segments after splitting
block: fix plug list flushing for nomerge queues
blk-mq: remove unused blk_mq_clone_flush_request prototype
blk-mq: fix waitqueue_active without memory barrier in block/blk-mq-tag.c
fs: direct-io: don't dirtying pages for ITER_BVEC/ITER_KVEC direct read
fs/mpage.c: forgotten WRITE_SYNC in case of data integrity write
block: kmemleak: Track the page allocations for struct request
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/blktrace.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 90e72a0c3047..e3a26188b95e 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c | |||
@@ -437,7 +437,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, | |||
437 | struct block_device *bdev, | 437 | struct block_device *bdev, |
438 | struct blk_user_trace_setup *buts) | 438 | struct blk_user_trace_setup *buts) |
439 | { | 439 | { |
440 | struct blk_trace *old_bt, *bt = NULL; | 440 | struct blk_trace *bt = NULL; |
441 | struct dentry *dir = NULL; | 441 | struct dentry *dir = NULL; |
442 | int ret; | 442 | int ret; |
443 | 443 | ||
@@ -519,11 +519,8 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, | |||
519 | bt->trace_state = Blktrace_setup; | 519 | bt->trace_state = Blktrace_setup; |
520 | 520 | ||
521 | ret = -EBUSY; | 521 | ret = -EBUSY; |
522 | old_bt = xchg(&q->blk_trace, bt); | 522 | if (cmpxchg(&q->blk_trace, NULL, bt)) |
523 | if (old_bt) { | ||
524 | (void) xchg(&q->blk_trace, old_bt); | ||
525 | goto err; | 523 | goto err; |
526 | } | ||
527 | 524 | ||
528 | if (atomic_inc_return(&blk_probes_ref) == 1) | 525 | if (atomic_inc_return(&blk_probes_ref) == 1) |
529 | blk_register_tracepoints(); | 526 | blk_register_tracepoints(); |
@@ -1481,7 +1478,7 @@ static int blk_trace_remove_queue(struct request_queue *q) | |||
1481 | static int blk_trace_setup_queue(struct request_queue *q, | 1478 | static int blk_trace_setup_queue(struct request_queue *q, |
1482 | struct block_device *bdev) | 1479 | struct block_device *bdev) |
1483 | { | 1480 | { |
1484 | struct blk_trace *old_bt, *bt = NULL; | 1481 | struct blk_trace *bt = NULL; |
1485 | int ret = -ENOMEM; | 1482 | int ret = -ENOMEM; |
1486 | 1483 | ||
1487 | bt = kzalloc(sizeof(*bt), GFP_KERNEL); | 1484 | bt = kzalloc(sizeof(*bt), GFP_KERNEL); |
@@ -1497,12 +1494,9 @@ static int blk_trace_setup_queue(struct request_queue *q, | |||
1497 | 1494 | ||
1498 | blk_trace_setup_lba(bt, bdev); | 1495 | blk_trace_setup_lba(bt, bdev); |
1499 | 1496 | ||
1500 | old_bt = xchg(&q->blk_trace, bt); | 1497 | ret = -EBUSY; |
1501 | if (old_bt != NULL) { | 1498 | if (cmpxchg(&q->blk_trace, NULL, bt)) |
1502 | (void)xchg(&q->blk_trace, old_bt); | ||
1503 | ret = -EBUSY; | ||
1504 | goto free_bt; | 1499 | goto free_bt; |
1505 | } | ||
1506 | 1500 | ||
1507 | if (atomic_inc_return(&blk_probes_ref) == 1) | 1501 | if (atomic_inc_return(&blk_probes_ref) == 1) |
1508 | blk_register_tracepoints(); | 1502 | blk_register_tracepoints(); |