diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-25 18:46:04 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-25 18:46:04 -0400 |
| commit | 19240e6b2a6c456d1c2975400a04b6b01f957cf0 (patch) | |
| tree | 989908a19a86e2cbfe70d71d18da121b907b8738 /kernel/trace | |
| parent | 17763641ff8a189bc6fb1fcd5c2a9844ee0dd89c (diff) | |
| parent | fddc9923c6d41de9fe7b1f323a3cece53e046c88 (diff) | |
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe:
- Two sets of NVMe pull requests from Christoph:
- Fixes for the Fibre Channel host/target to fix spec compliance
- Allow a zero keep alive timeout
- Make the debug printk for broken SGLs work better
- Fix queue zeroing during initialization
- Set of RDMA and FC fixes
- Target div-by-zero fix
- bsg double-free fix.
- ndb unknown ioctl fix from Josef.
- Buffered vs O_DIRECT page cache inconsistency fix. Has been floating
around for a long time, well reviewed. From Lukas.
- brd overflow fix from Mikulas.
- Fix for a loop regression in this merge window, where using a union
for two members of the loop_cmd turned out to be a really bad idea.
From Omar.
- Fix for an iostat regression fix in this series, using the wrong API
to get at the block queue. From Shaohua.
- Fix for a potential blktrace delection deadlock. From Waiman.
* 'for-linus' of git://git.kernel.dk/linux-block: (30 commits)
nvme-fcloop: fix port deletes and callbacks
nvmet-fc: sync header templates with comments
nvmet-fc: ensure target queue id within range.
nvmet-fc: on port remove call put outside lock
nvme-rdma: don't fully stop the controller in error recovery
nvme-rdma: give up reconnect if state change fails
nvme-core: Use nvme_wq to queue async events and fw activation
nvme: fix sqhd reference when admin queue connect fails
block: fix a crash caused by wrong API
fs: Fix page cache inconsistency when mixing buffered and AIO DIO
nvmet: implement valid sqhd values in completions
nvme-fabrics: Allow 0 as KATO value
nvme: allow timed-out ios to retry
nvme: stop aer posting if controller state not live
nvme-pci: Print invalid SGL only once
nvme-pci: initialize queue memory before interrupts
nvmet-fc: fix failing max io queue connections
nvme-fc: use transport-specific sgl format
nvme: add transport SGL definitions
nvme.h: remove FC transport-specific error values
...
Diffstat (limited to 'kernel/trace')
| -rw-r--r-- | kernel/trace/blktrace.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 2a685b45b73b..45a3928544ce 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c | |||
| @@ -648,6 +648,12 @@ int blk_trace_startstop(struct request_queue *q, int start) | |||
| 648 | } | 648 | } |
| 649 | EXPORT_SYMBOL_GPL(blk_trace_startstop); | 649 | EXPORT_SYMBOL_GPL(blk_trace_startstop); |
| 650 | 650 | ||
| 651 | /* | ||
| 652 | * When reading or writing the blktrace sysfs files, the references to the | ||
| 653 | * opened sysfs or device files should prevent the underlying block device | ||
| 654 | * from being removed. So no further delete protection is really needed. | ||
| 655 | */ | ||
| 656 | |||
| 651 | /** | 657 | /** |
| 652 | * blk_trace_ioctl: - handle the ioctls associated with tracing | 658 | * blk_trace_ioctl: - handle the ioctls associated with tracing |
| 653 | * @bdev: the block device | 659 | * @bdev: the block device |
| @@ -665,7 +671,7 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg) | |||
| 665 | if (!q) | 671 | if (!q) |
| 666 | return -ENXIO; | 672 | return -ENXIO; |
| 667 | 673 | ||
| 668 | mutex_lock(&bdev->bd_mutex); | 674 | mutex_lock(&q->blk_trace_mutex); |
| 669 | 675 | ||
| 670 | switch (cmd) { | 676 | switch (cmd) { |
| 671 | case BLKTRACESETUP: | 677 | case BLKTRACESETUP: |
| @@ -691,7 +697,7 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg) | |||
| 691 | break; | 697 | break; |
| 692 | } | 698 | } |
| 693 | 699 | ||
| 694 | mutex_unlock(&bdev->bd_mutex); | 700 | mutex_unlock(&q->blk_trace_mutex); |
| 695 | return ret; | 701 | return ret; |
| 696 | } | 702 | } |
| 697 | 703 | ||
| @@ -1727,7 +1733,7 @@ static ssize_t sysfs_blk_trace_attr_show(struct device *dev, | |||
| 1727 | if (q == NULL) | 1733 | if (q == NULL) |
| 1728 | goto out_bdput; | 1734 | goto out_bdput; |
| 1729 | 1735 | ||
| 1730 | mutex_lock(&bdev->bd_mutex); | 1736 | mutex_lock(&q->blk_trace_mutex); |
| 1731 | 1737 | ||
| 1732 | if (attr == &dev_attr_enable) { | 1738 | if (attr == &dev_attr_enable) { |
| 1733 | ret = sprintf(buf, "%u\n", !!q->blk_trace); | 1739 | ret = sprintf(buf, "%u\n", !!q->blk_trace); |
| @@ -1746,7 +1752,7 @@ static ssize_t sysfs_blk_trace_attr_show(struct device *dev, | |||
| 1746 | ret = sprintf(buf, "%llu\n", q->blk_trace->end_lba); | 1752 | ret = sprintf(buf, "%llu\n", q->blk_trace->end_lba); |
| 1747 | 1753 | ||
| 1748 | out_unlock_bdev: | 1754 | out_unlock_bdev: |
| 1749 | mutex_unlock(&bdev->bd_mutex); | 1755 | mutex_unlock(&q->blk_trace_mutex); |
| 1750 | out_bdput: | 1756 | out_bdput: |
| 1751 | bdput(bdev); | 1757 | bdput(bdev); |
| 1752 | out: | 1758 | out: |
| @@ -1788,7 +1794,7 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev, | |||
| 1788 | if (q == NULL) | 1794 | if (q == NULL) |
| 1789 | goto out_bdput; | 1795 | goto out_bdput; |
| 1790 | 1796 | ||
| 1791 | mutex_lock(&bdev->bd_mutex); | 1797 | mutex_lock(&q->blk_trace_mutex); |
| 1792 | 1798 | ||
| 1793 | if (attr == &dev_attr_enable) { | 1799 | if (attr == &dev_attr_enable) { |
| 1794 | if (value) | 1800 | if (value) |
| @@ -1814,7 +1820,7 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev, | |||
| 1814 | } | 1820 | } |
| 1815 | 1821 | ||
| 1816 | out_unlock_bdev: | 1822 | out_unlock_bdev: |
| 1817 | mutex_unlock(&bdev->bd_mutex); | 1823 | mutex_unlock(&q->blk_trace_mutex); |
| 1818 | out_bdput: | 1824 | out_bdput: |
| 1819 | bdput(bdev); | 1825 | bdput(bdev); |
| 1820 | out: | 1826 | out: |
