Re: [PATCH 0/4 RFC] BDI lifetime fix

2017-01-31 Thread Jan Kara
On Thu 26-01-17 22:15:06, Dan Williams wrote: > On Thu, Jan 26, 2017 at 9:45 AM, Jan Kara wrote: > > Hello, > > > > this patch series attempts to solve the problems with the life time of a > > backing_dev_info structure. Currently it lives inside request_queue > > structure > > and

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-31 Thread Bart Van Assche
On Tue, 2017-01-31 at 13:58 -0800, Jens Axboe wrote: > Interesting, I'll check this. Doesn't make any sense why the scheduler > would be implicated in that, given how we run completions now. But if > it complains, then something must be up. (reduced CC-list) There is another issue that needs

Re: remove the cmd_type field from struct request

2017-01-31 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> this series gets rid of the cmd_type field in struct Christoph> request and instead folds it into the REQ_OP* space. This Christoph> reduces the size of struct request, and leads to a single op Christoph> namespace that

[PATCH 2/2] nvme: allocate nvme_queue in correct node

2017-01-31 Thread Shaohua Li
nvme_queue is per-cpu queue (mostly). Allocating it in node where blk-mq will use it. Signed-off-by: Shaohua Li --- drivers/nvme/host/pci.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c

[PATCH 1/2] blk-mq: allocate blk_mq_tags and requests in correct node

2017-01-31 Thread Shaohua Li
blk_mq_tags/requests of specific hardware queue are mostly used in specific cpus, which might not be in the same numa node as disk. For example, a nvme card is in node 0. half hardware queue will be used by node 0, the other node 1. Signed-off-by: Shaohua Li --- block/blk-mq.c | 14

[PATCH] block: queue lock must be acquired when iterating over rls

2017-01-31 Thread Tahsin Erdogan
blk_set_queue_dying() does not acquire queue lock before it calls blk_queue_for_each_rl(). This allows a racing blkg_destroy() to remove blkg->q_node from the linked list and have blk_queue_for_each_rl() loop infitely over the removed blkg->q_node list node. Signed-off-by: Tahsin Erdogan

Re: remove the cmd_type field from struct request

2017-01-31 Thread Hannes Reinecke
On 01/31/2017 07:02 PM, Jens Axboe wrote: On 01/31/2017 07:57 AM, Christoph Hellwig wrote: [1] which were a pain in the ass to untangle and debug during development, it's really time for it to die.. Outside of the patch series in question, how to we expedite the euthanasia of IDE? What

Re: [dm-devel] split scsi passthrough fields out of struct request V2

2017-01-31 Thread Jens Axboe
On 01/31/2017 05:01 PM, Bart Van Assche wrote: > On Tue, 2017-01-31 at 13:58 -0800, Jens Axboe wrote: >> Interesting, I'll check this. Doesn't make any sense why the scheduler >> would be implicated in that, given how we run completions now. But if >> it complains, then something must be up. > >

[PATCH 06/12] lightnvm: cleanup nvm transformation functions

2017-01-31 Thread Matias Bjørling
Going from target specific ppa addresses to device was accomplished by first converting target to generic ppa addresses and generic to device addresses. The conversion was either open-coded or used the built-in nvm_trans_* and nvm_map_* functions for conversion. Simplify the interface and cleanup

[PATCH 07/12] lightnvm: reduce number of nvm_id groups to one

2017-01-31 Thread Matias Bjørling
The number of configuration groups has been limited to one in current code, even if there is support for up to four. With the introduction of the open-channel SSD 1.3 specification, only a single group is exposed onwards. Reflect this in the nvm_id structure. Signed-off-by: Matias Bjørling

[PATCH 12/12] lightnvm: allow targets to use sysfs

2017-01-31 Thread Matias Bjørling
From: Javier González In order to register through the sysfs interface, a driver needs to know its kobject. On a disk structure, this happens when the partition information is added (device_add_disk), which for lightnvm takes place after the target has been initialized. This

[PATCH 05/12] lightnvm: make nvm_map_* return void

2017-01-31 Thread Matias Bjørling
The only check there was done was a debugging check. Remove it and replace the return value with void to reduce error checking. Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 41 + 1 file changed, 9 insertions(+), 32

[PATCH 01/12] lightnvm: merge gennvm with core

2017-01-31 Thread Matias Bjørling
For the first iteration of Open-Channel SSDs, it was anticipated that there could be various media managers on top of an open-channel SSD, such to allow vendors to plug in their own host-side FTLs, without the media manager in between. Now that an Open-Channel SSD is exposed as a traditional

[PATCH 09/12] lightnvm: use end_io callback instead of instance

2017-01-31 Thread Matias Bjørling
When the lightnvm core had the "gennvm" layer between the device and the target, there was a need for the core to be able to figure out which target it should send an end_io callback to. Leading to a "double" end_io, first for the media manager instance, and then for the target instance. Now that

[PATCH 11/12] lightnvm: free properly on target creation error

2017-01-31 Thread Matias Bjørling
From: Javier González Fix a memory leak when target creation fails. More specifically, free the entire device structure given to the target (tgt_dev). Signed-off-by: Javier González Signed-off-by: Matias Bjørling ---

[PATCH 03/12] lightnvm: remove nvm_submit_ppa* functions

2017-01-31 Thread Matias Bjørling
The nvm_submit_ppa* functions are no longer needed after gennvm and core have been merged. Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 109 --- include/linux/lightnvm.h | 4 -- 2 files changed, 113 deletions(-)

[PATCH 10/12] lightnvm: Add CRC read error

2017-01-31 Thread Matias Bjørling
From: Javier González Let the host differentiate between a read error and a CRC check error on the device side. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- include/linux/lightnvm.h | 1 + 1 file changed, 1

[PATCH 1/4] block: Unhash block device inodes on gendisk destruction

2017-01-31 Thread Jan Kara
Currently, block device inodes stay around after corresponding gendisk hash died until memory reclaim finds them and frees them. Since we will make block device inode pin the bdi, we want to free the block device inode as soon as the device goes away so that bdi does not stay around unnecessarily.

[PATCH 04/12] lightnvm: remove nvm_get_bb_tbl and nvm_set_bb_tbl

2017-01-31 Thread Matias Bjørling
Since the merge of gennvm and core, there is no longer a need for the device specific bad block functions. Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 40 include/linux/lightnvm.h | 2 -- 2 files changed, 4

Re: [PATCH 00/12] lightnvm: 4.11 patches

2017-01-31 Thread Jens Axboe
On Tue, Jan 31 2017, Matias Bjørling wrote: > Hi Jens, > > Here are the patches for the 4.11 window. The following changes have > been made: > > - New ioctls for vectored I/Os. Now liblightnvm is fully supported and >applications can begin to use the liblightnvm API to integrate with >

[PATCH 09/10] ide: don't abuse cmd_type

2017-01-31 Thread Christoph Hellwig
Currently the legacy ide driver defines several request types of it's own, which is in the way of removing that field entirely. Instead add a type field to struct ide_request and use that to distinguish the different types of IDE-internal requests. It's a bit of a mess, but so is the surrounding

[PATCH 10/10] block: fold cmd_type into the REQ_OP_ space

2017-01-31 Thread Christoph Hellwig
Instead of keeping two levels of indirection for requests types, fold it all into the operations. The little caveat here is that previously cmd_type only applied to struct request, while the request and bio op fields were set to plain REQ_OP_READ/WRITE even for passthrough operations. Instead

[PATCH 02/10] ѕd: remove pointless REQ_TYPE_FS check

2017-01-31 Thread Christoph Hellwig
->done can only be called for fs requests, so no need to check again here. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index c779986..bd2fb4d 100644 --- a/drivers/scsi/sd.c +++

remove the cmd_type field from struct request

2017-01-31 Thread Christoph Hellwig
Hi Jens, this series gets rid of the cmd_type field in struct request and instead folds it into the REQ_OP* space. This reduces the size of struct request, and leads to a single op namespace that drivers can easily switch on. Except for the legacy ide driver which has a mess of different

Re: [PATCH 09/10] ide: don't abuse cmd_type

2017-01-31 Thread David Miller
From: Christoph Hellwig Date: Tue, 31 Jan 2017 16:57:30 +0100 > Currently the legacy ide driver defines several request types of it's own, > which is in the way of removing that field entirely. > > Instead add a type field to struct ide_request and use that to distinguish > the

[PATCH 08/10] block: introduce blk_rq_is_passthrough

2017-01-31 Thread Christoph Hellwig
This can be used to check for fs vs non-fs requests and basically removes all knowledge of BLOCK_PC specific from the block layer, as well as preparing for removing the cmd_type field in struct request. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 8

Re: [PATCH] genhd: Do not hold event lock when scheduling workqueue elements

2017-01-31 Thread Hannes Reinecke
On 01/31/2017 01:31 AM, Bart Van Assche wrote: > On Wed, 2017-01-18 at 10:48 +0100, Hannes Reinecke wrote: >> @@ -1488,26 +1487,13 @@ static unsigned long disk_events_poll_jiffies(struct >> gendisk *disk) >> void disk_block_events(struct gendisk *disk) >> { >> struct disk_events *ev =

[PATCH 01/10] scm_blk: remove unneeded REQ_TYPE_FS check

2017-01-31 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/s390/block/scm_blk.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/s390/block/scm_blk.c b/drivers/s390/block/scm_blk.c index 9f16ea6..152de68 100644 --- a/drivers/s390/block/scm_blk.c +++ b/drivers/s390/block/scm_blk.c

[PATCH 06/10] nbd: remove REQ_TYPE_DRV_PRIV leftovers

2017-01-31 Thread Christoph Hellwig
Disconnects don't use block layer requests these days, so all handling of private requests is dead code. Signed-off-by: Christoph Hellwig --- drivers/block/nbd.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c

[PATCH 04/10] ms_block: remove pointless prep_fn

2017-01-31 Thread Christoph Hellwig
This driver will never see non-fs requests, and doesn't do anything else in the prep_fn. Signed-off-by: Christoph Hellwig --- drivers/memstick/core/ms_block.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/memstick/core/ms_block.c

[PATCH 05/10] mspro_block: remove pointless prep_fn

2017-01-31 Thread Christoph Hellwig
This driver will never see non-fs requests, and doesn't do anything else in the prep_fn. Signed-off-by: Christoph Hellwig --- drivers/memstick/core/mspro_block.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/memstick/core/mspro_block.c

[PATCH 03/10] mmc: remove pointless request type check in mmc_prep_request

2017-01-31 Thread Christoph Hellwig
The block layer won't send requests the driver isn't asking for, so remove this check. Signed-off-by: Christoph Hellwig --- drivers/mmc/core/queue.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c index

Re: remove the cmd_type field from struct request

2017-01-31 Thread Jens Axboe
On 01/31/2017 07:57 AM, Christoph Hellwig wrote: > [1] which were a pain in the ass to untangle and debug during development, > it's really time for it to die.. Outside of the patch series in question, how to we expedite the euthanasia of IDE? What explicit features/support are we missing through

Re: remove the cmd_type field from struct request

2017-01-31 Thread James Bottomley
On Tue, 2017-01-31 at 10:02 -0800, Jens Axboe wrote: > On 01/31/2017 07:57 AM, Christoph Hellwig wrote: > > [1] which were a pain in the ass to untangle and debug during > > development, it's really time for it to die.. > > Outside of the patch series in question, how to we expedite the >

IOPRIO_PRIO_VALUE needs parens around (data) (was: [4.9.1] Compiler warnings in bcache)

2017-01-31 Thread Eric Wheeler
On Tue, 10 Jan 2017, Coly Li wrote: > On 2017/1/10 上午2:34, Kai Krakow wrote: > > When compiling kernel 4.9.1, I'm seeing the following warnings: > > > > In file included from ./include/linux/bio.h:23:0, > > from drivers/md/bcache/bcache.h:181, > > from

Re: remove the cmd_type field from struct request

2017-01-31 Thread Sergei Shtylyov
On 01/31/2017 09:51 PM, James Bottomley wrote: [1] which were a pain in the ass to untangle and debug during development, it's really time for it to die.. Outside of the patch series in question, how to we expedite the euthanasia of IDE? What explicit features/support are we missing through

Re: remove the cmd_type field from struct request

2017-01-31 Thread Jens Axboe
On 01/31/2017 07:57 AM, Christoph Hellwig wrote: > Hi Jens, > > this series gets rid of the cmd_type field in struct request and > instead folds it into the REQ_OP* space. This reduces the size of > struct request, and leads to a single op namespace that drivers > can easily switch on. Except

Re: remove the cmd_type field from struct request

2017-01-31 Thread Jens Axboe
On 01/31/2017 10:58 AM, Sergei Shtylyov wrote: > On 01/31/2017 09:51 PM, James Bottomley wrote: > [1] which were a pain in the ass to untangle and debug during development, it's really time for it to die.. >>> >>> Outside of the patch series in question, how to we expedite the >>>

[PATCH 0/6] block: fix blk-mq debugfs vs. blktrace

2017-01-31 Thread Omar Sandoval
From: Omar Sandoval When I moved the blk-mq debugging information to debugfs, I didn't realize that blktrace also created directories in debugfs that conflicted with the blk-mq directories. This series fixes that. Patch 1 adds a new debugfs helper needed for patch 6. Greg, could

[PATCH 1/6] debugfs: add debugfs_lookup()

2017-01-31 Thread Omar Sandoval
From: Omar Sandoval We don't always have easy access to the dentry of a file or directory we created in debugfs. Add a helper which allows us to get a dentry we previously created. The motivation for this change is a problem with blktrace and the blk-mq debugfs entries

[PATCH 2/6] block: fix debugfs config conditional in struct request_queue

2017-01-31 Thread Omar Sandoval
From: Omar Sandoval The debugfs dentries are only used for CONFIG_BLK_DEBUG_FS, so make them conditional on that instead of CONFIG_DEBUG_FS. Signed-off-by: Omar Sandoval --- include/linux/blkdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 4/6] block: use same block debugfs directory for blk-mq and blktrace

2017-01-31 Thread Omar Sandoval
From: Omar Sandoval When I added the blk-mq debugging information to debugfs, I didn't notice that blktrace also creates a "block" directory in debugfs. Make them use the same dentry, now created in the core block code. Based on a patch from Jens. Signed-off-by: Omar Sandoval

[PATCH 6/6] blktrace: use existing disk debugfs directory

2017-01-31 Thread Omar Sandoval
From: Omar Sandoval We may already have a directory to put the blktrace stuff in if 1. The disk uses blk-mq 2. CONFIG_BLK_DEBUG_FS is enabled 3. We are tracing the whole disk and not a partition Instead of hardcoding this very specific case, let's use the new debugfs_lookup().

[PATCH 5/6] blk-mq: move debugfs_remove() of disk dir to blk_release_queue()

2017-01-31 Thread Omar Sandoval
From: Omar Sandoval This needs to happen after we tear down blktrace. Signed-off-by: Omar Sandoval --- block/blk-mq-sysfs.c | 2 +- block/blk-sysfs.c| 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/block/blk-mq-sysfs.c

[PATCH 3/6] blktrace: make do_blk_trace_setup() static

2017-01-31 Thread Omar Sandoval
From: Omar Sandoval This isn't used outside of blktrace.c anymore. Fixes: 62c2a7d969f3 ("block: push BKL into blktrace ioctls") Signed-off-by: Omar Sandoval --- include/linux/blktrace_api.h | 4 kernel/trace/blktrace.c | 6 +++--- 2 files changed, 3