This allows us to manage the various uniqueue namespace identifiers
together instead needing various variables and arguments.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Keith Busch <keith.bu...@intel.com>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
Reviewed-b
From: Hannes Reinecke <h...@suse.de>
When creating nvme multipath devices we should populate the 'slaves' and
'holders' directorys properly to aid userspace topology detection.
Signed-off-by: Hannes Reinecke <h...@suse.com>
[hch: split from a larger patch]
Signed-off-by: Christop
On Thu, Nov 09, 2017 at 04:44:32PM +0100, Hannes Reinecke wrote:
> - We don't have the topology information in sysfs;
We have all the topology information in sysfs, but you seem to look
for the wrong thing.
> while the namespace
> device has the 'slaves' and 'holders' directories, they remain
On Thu, Nov 09, 2017 at 01:33:16PM +0200, Sagi Grimberg wrote:
> Any reason to do all this before we know if we found an existing subsystem?
We'd either have to do all the initialization including the memory
allocation and ida_simple_get under nvme_subsystems_lock, or search
the list first, then
On Thu, Nov 09, 2017 at 01:37:43PM +0200, Sagi Grimberg wrote:
>
>> To allow lockless path lookup the list of nvme_ns structures per
>> nvme_ns_head is protected by SRCU, which requires freeing the nvme_ns
>> structure through call_srcu.
>
> Can you remind me why isn't rcu sufficient? Can looking
On Wed, Nov 08, 2017 at 12:18:32PM +0100, Hannes Reinecke wrote:
> On 11/08/2017 09:54 AM, Christoph Hellwig wrote:
> > Can I get a review for this one? The only changes vs the previously
> > reviewed versions is that we don't use the multipath code at all for
> > s
Looks good:
Reviewed-by: Christoph Hellwig <h...@lst.de>
Looks good:
Reviewed-by: Christoph Hellwig <h...@lst.de>
A bit of duplication vs the existing ZBC code here, but it seems the
old code is going away later in the series, so:
Reviewed-by: Christoph Hellwig <h...@lst.de>
Looks good,
Reviewed-by: Christoph Hellwig <h...@lst.de>
Looks good,
Reviewed-by: Christoph Hellwig <h...@lst.de>
Looks good:
Reviewed-by: Christoph Hellwig <h...@lst.de>
Except for a bit of mis-spelling in the Subject this looks fine
to me:
Reviewed-by: Christoph Hellwig <h...@lst.de>
FYI, I would just simplify the subject to
mq-deadline: Introduce dispatch helpers
and similar in the other patches.
Thanks,
applied both patches to nvme-4.15.
-by: Christoph Hellwig <h...@lst.de>
---
Jens, this is on top of your bio_kmap_irq removal patch on the list.
Documentation/block/biodoc.txt | 11 +--
arch/xtensa/platforms/iss/simdisk.c | 4 ++--
block/blk-settings.c| 2 +-
include/linux/bio.h
On Wed, Nov 08, 2017 at 11:08:13AM -0700, Jens Axboe wrote:
> On 11/08/2017 11:03 AM, Christoph Hellwig wrote:
> > On Wed, Nov 08, 2017 at 08:36:25AM -0700, Jens Axboe wrote:
> >> On 11/08/2017 08:34 AM, Christoph Hellwig wrote:
> >>> On Wed, Nov 08, 2017 at 08:2
On Wed, Nov 08, 2017 at 08:36:25AM -0700, Jens Axboe wrote:
> On 11/08/2017 08:34 AM, Christoph Hellwig wrote:
> > On Wed, Nov 08, 2017 at 08:20:58AM -0700, Jens Axboe wrote:
> >> On top of that, there are no users of it at all...
> >
> > But Mikulas wants to add one
On Wed, Nov 08, 2017 at 08:20:58AM -0700, Jens Axboe wrote:
> On top of that, there are no users of it at all...
But Mikulas wants to add one :)
Note that __bio_kmap_atomic has the same issues, only has a single
users either and would be cleaner if opencoded there as it already
has the current
On Wed, Nov 08, 2017 at 07:38:44AM -0500, Mikulas Patocka wrote:
> > To be honest I think we should just remove bio_kmap_irq. It is currently
> > unused and assumes there is only a single bvec to map.
>
> It could be removed from include/linux/bio.h and moved to my driver. But
> if we leave it
On Tue, Nov 07, 2017 at 04:45:17PM -0500, Mikulas Patocka wrote:
> Hi
>
> I need the function bio_kmap_irq in the driver that I am developing, but
> it doesn't return the size of the mapped data. I've made this patch to fix
> it.
To be honest I think we should just remove bio_kmap_irq. It is
Can I get a review for this one? The only changes vs the previously
reviewed versions is that we don't use the multipath code at all for
subsystems that aren't multiported, and that there is an explicit
opt-out at compile and module load time, so it shouldn't be that hard
to review for those who
On Sat, Nov 04, 2017 at 12:22:20PM +0100, Javier González wrote:
> > Perhaps this should just become
> >
> > %8ph
> >
> > without D
>
> That would be ok with me.
Can you resend a patch for that?
On Sat, Nov 04, 2017 at 09:38:45AM -0600, Keith Busch wrote:
> That's not quite right. For non-PI metadata formats, we use the
> 'nop_profile', which gets the metadata buffer allocated so we can safely
> use a metadata formatted namespace. There's no in-kernel user of the
> allocated payload, but
On Fri, Nov 03, 2017 at 09:02:04AM -0600, Keith Busch wrote:
> If the namespace has metadata, but the request doesn't have a metadata
> payload attached to it for whatever reason, we can't construct the command
> for that format. We also can't have the controller strip/generate the
> payload with
On Fri, Nov 03, 2017 at 11:02:50AM +0100, Javier González wrote:
> Signed-off-by: Javier González
> ---
> drivers/nvme/host/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index
On Fri, Nov 03, 2017 at 11:02:49AM +0100, Javier González wrote:
> Compare subnqns using NVMF_NQN_SIZE as it is < 256
>
> Signed-off-by: Javier González
> ---
> drivers/nvme/host/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
to a806c6c81e6c0d07c8a8b2643bad4a37a196d681:
nvme: comment typo fixed in clearing AER (2017-11-03 10:02:20 +0300)
Chaitanya Kulkarni (1):
nvme-pci: add SGL support
Christoph Hellwig (11):
nvme: simplify compat_ioctl handling
nvme: use
We do this by adding a helper that returns the ns_head for a device that
can belong to either the per-controller or per-subsystem block device
nodes, and otherwise reuse all the existing code.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Keith Busch <keith.bu...@intel.com&
That we we can also poll non blk-mq queues. Mostly needed for
the NVMe multipath code, but could also be useful elsewhere.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
block/blk-core.c | 11 +++
bl
Hi all,
this series adds support for multipathing, that is accessing nvme
namespaces through multiple controllers to the nvme core driver.
It is a very thin and efficient implementation that relies on
close cooperation with other bits of the nvme driver, and few small
and simple block helpers.
it alive needs to be implemented at the controller
level.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
drivers/nvme/host/Kconfig | 9 ++
drivers/nvme/host/Makefile| 1 +
drivers/nvme/host/core.c | 133 +++---
drivers/nvme/host/multipath.c
This allows us to manage the various uniqueue namespace identifiers
together instead needing various variables and arguments.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Keith Busch <keith.bu...@intel.com>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
Reviewed-b
.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Keith Busch <keith.bu...@intel.com>
Reviewed-by: Javier González <jav...@cnexlabs.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
driv
With this flag a driver can create a gendisk that can be used for I/O
submission inside the kernel, but which is not registered as user
facing block device. This will be useful for the NVMe multipath
implementation.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
block/genhd.c
Hannes Reinecke to expose the subsystems
in sysfs.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
drivers/nvme/host/core.c| 210 ++--
drivers/nvme/host/fabrics.c | 4 +-
drivers/nvme
into the struct device.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
block/genhd.c | 4
include/linux/genhd.h | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
This helpers allows to bounce steal the uncompleted bios from a request so
that they can be reissued on another path.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
block/blk
Set aside a bit in the request/bio flags for driver use.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
include/linux/blk_t
This helper allows reinserting a bio into a new queue without much
overhead, but requires all queue limits to be the same for the upper
and lower queues, and it does not provide any recursion preventions.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Sagi Grimberg <s...@gr
Hi Jens,
these patches add the block layer helpers / tweaks for NVMe multipath
support. Can you review them for inclusion?
There have been no functional changes to the versions posted with
previous nvme multipath patchset.
This flag should be before the operation-specific REQ_NOUNMAP bit.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
inclu
We don't need a frozen queue to update the chunk_size, which just is a
hint, and moving it a little earlier will allow for some better code
reuse with the multipath code.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
drivers/nvme/host/core.c | 5 +++--
1 file changed, 3 insertions
Split out the code that applies the calculate value to a given disk/queue
into new helper that can be reused by the multipath code.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
drivers/nvme/host/core.c | 49 +---
1 file changed, 26 inse
This is safe because the queue is always frozen when we revalidate, and
it simplifies both the existing code as well as the multipath
implementation.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
drivers/nvme/host/core.c | 40 ++--
1 file chang
. Note that it applies to any command there and not
just cancelled commands, but one the queue is dying that is the right
thing to do anyway.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
drivers/nvme/host/core.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff
To allow reusing this function for the multipath node.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
drivers/nvme/host/core.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index bc27f6
To allow reusing this function for the multipath node.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
drivers/nvme/host/core.c | 33 +
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
Hi all,
below are a couple cleanup patches to prepare for the next version
of the nvme multipath code.
On Mon, Oct 30, 2017 at 11:37:55AM +0800, Guan Junxiong wrote:
> > + head->disk->flags = GENHD_FL_EXT_DEVT;
> > + sprintf(head->disk->disk_name, "nvme%dn%d",
> > + ctrl->subsys->instance, nsid);
>
> Is it okay to use head->instance instead of nsid for disk name nvme#n# ?
>
On Sat, Oct 28, 2017 at 06:09:46PM +0800, Guan Junxiong wrote:
> Does it mean some extra works such as:
> 1) showing the path topology of nvme multipath device
It's in sysfs. And Johannes volunteered to also add nvme-cli
support.
> 2) daemon to implement immediate and delayed failback
The
On Sat, Oct 28, 2017 at 03:20:07PM +0800, Guan Junxiong wrote:
> Think of some current advanced features of DM-Multipath combined with
> multipath-tools
> such as path-latency priority grouping, intermittent IO error accounting for
> path
> degradation, delayed or immediate or follow-over
On Tue, Oct 24, 2017 at 05:40:00PM -0400, Mike Snitzer wrote:
> Having the NVme driver go to such lengths to hide its resources from
> upper layers is certainly the work of an evil genius experiencing some
> serious territorial issues. Not sugar-coating it.. you wouldn't.
I'm pretty surre Hannes
> Sure this works?
It does.
> nvme_req_needs_retry() checks blk_noretry_request():
> The original idea here was to _set_ these bits on multipath path devices
> so that they won't attempt any retry, but rather forward the I/O error
> to the multipath device itself for failover.
> So if these
On Tue, Oct 24, 2017 at 09:45:44AM +0200, Hannes Reinecke wrote:
> device_add_disk_with_groups()?
> What happened to that proposal?
Doesn't look like it got anywhere near a tree I could base this work
on.
And what happen to not fullquoting a patch for a two line comment?
On Tue, Oct 24, 2017 at 11:44:26AM +0300, Max Gurtovoy wrote:
>> + * Steal bios from a request. The request must not have been partially
>> + * completed before.
>> + */
>
> Maybe we can add to the comment that "list" is the destination for the
> stolen bio.
Sure.
>> +void
e_rq(struct request *req)
> +{
> + struct virtblk_req *vbr = blk_mq_rq_to_pdu(req);
> +
> +#ifdef CONFIG_VIRTIO_BLK_SCSI
> + scsi_req_init(>sreq);
> +#endif
How about only defininig the initialize_rq method and implementation
if CONFIG_VIRTIO_BLK_SCSI is set?
Else looks good:
Reviewed-by: Christoph Hellwig <h...@lst.de>
The following changes since commit f04b9cc87b5fc466b1b7231ba7b078e885956c5b:
nvme-rdma: Fix error status return in tagset allocation failure (2017-10-19
17:13:51 +0200)
are available in the git repository at:
git://git.infradead.org/nvme.git nvme-4.14
for you to fetch changes up to
On Mon, Oct 23, 2017 at 06:43:16PM +0800, Ming Lei wrote:
> On Fri, Oct 20, 2017 at 04:45:23PM +0200, Christoph Hellwig wrote:
> > We need to look for an active PM request until the next softbarrier
> > instead of looking for the first non-PM request. Otherwise any cause
> >
On Mon, Oct 23, 2017 at 06:32:47PM +0300, Sagi Grimberg wrote:
>> struct nvme_queue *nvmeq = hctx->driver_data;
>> + printk_ratelimited("%s: called\n", __func__);
>> +
>
> This must be a left-over...
Indeed, it is a left-over debug statement..
This flag should be before the operation-specific REQ_NOUNMAP bit.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
inclu
device is called.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
drivers/nvme/host/core.c | 76 ++--
drivers/nvme/host/nvme.h | 3 +-
2
This is a much more sensible check than just the admin queue.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Sagi Grimberg <s...@rimbeg.me>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1
That we we can also poll non blk-mq queues. Mostly needed for
the NVMe multipath code, but could also be useful elsewhere.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
block/blk-core.c | 11 +++
block/blk-mq.c | 14 +-
drivers/nvme/tar
Now that we are protected against lookup vs free races for the namespace
by using kref_get_unless_zero we don't need the hack of NULLing out the
disk private data during removal.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
Reviewed-
Hi all,
this series adds support for multipathing, that is accessing nvme
namespaces through multiple controllers to the nvme core driver.
It is a very thin and efficient implementation that relies on
close cooperation with other bits of the nvme driver, and few small
and simple block helpers.
.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Keith Busch <keith.bu...@intel.com>
Reviewed-by: Javier González <jav...@cnexlabs.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
drivers/nvme/host/core.c | 190 +
into the struct device.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
block/genhd.c | 4
include/linux/genhd.h | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
index
We do this by adding a helper that returns the ns_head for a device that
can belong to either the per-controller or per-subsystem block device
nodes, and otherwise reuse all the existing code.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Keith Busch <keith.bu...@intel.com&
For kref_get_unless_zero to protect against lookup vs free races we need
to use it in all places where we aren't guaranteed to already hold a
reference. There is no such guarantee in nvme_find_get_ns, so switch to
kref_get_unless_zero in this function.
Signed-off-by: Christoph Hellwig &l
pen file on the
/dev/nvme-fabrics node has a refernece) when it is entered now, so we
don't need to do the unless_zero variant there.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
drivers/nvme/host/core.c | 43 ++-
drivers/nvme/host/fc.c
it alive needs to be implemented at the controller
level.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
drivers/nvme/host/core.c | 398 ---
drivers/nvme/host/nvme.h | 15 +-
drivers/nvme/host/pci.c | 2 +
3 files changed, 355 insertions(
This allows us to manage the various uniqueue namespace identifiers
together instead needing various variables and arguments.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Keith Busch <keith.bu...@intel.com>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
---
driver
With this flag a driver can create a gendisk that can be used for I/O
submission inside the kernel, but which is not registered as user
facing block device. This will be useful for the NVMe multipath
implementation.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
block/genhd.c
This helper allows reinserting a bio into a new queue without much
overhead, but requires all queue limits to be the same for the upper
and lower queues, and it does not provide any recursion preventions.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Sagi Grimberg <s...@gr
Set aside a bit in the request/bio flags for driver use.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
Reviewed-by: Hannes Reinecke <h...@suse.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
---
include/linux/blk_t
This helpers allows to bounce steal the uncompleted bios from a request so
that they can be reissued on another path.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
---
block/blk-core.c | 20
include/linux/b
On Mon, Oct 23, 2017 at 10:27:29AM +0300, Sagi Grimberg wrote:
> Note that it does introduce a new spinlock to our hot-path, but given
> the current over-allocation scheme with schedulers, its probably better
> off.
We could look into llists if it matters.
On Mon, Oct 23, 2017 at 08:53:35AM +0900, Byungchul Park wrote:
> On Fri, Oct 20, 2017 at 07:44:51AM -0700, Christoph Hellwig wrote:
> > The Subject prefix for this should be "block:".
> >
> > > @@ -945,7 +945,7 @@ int submit_bio_wait(struct bio *bio)
> >
On Mon, Oct 23, 2017 at 02:16:03AM -0400, Martin K. Petersen wrote:
>
> Benjamin,
>
> >> Not sure it's worth it especially now that Martin has merged the patch.
> >
> > He did? I only saw a mail that he picked patches 2-5. So all the bsg
> > changes are still open I think.
>
> Yes, I expected
On Sun, Oct 22, 2017 at 09:32:00PM +0300, Sagi Grimberg wrote:
>
>> Currently, blk_mq_tagset_iter() iterate over initial hctx tags only.
>> In case scheduler is used, it doesn't iterate the hctx scheduler tags
>> and the static request aren't been updated.
>> For example, while using NVMe over
On Thu, Oct 19, 2017 at 05:59:33PM +0200, Benjamin Block wrote:
> > +#define ptr64(val) ((void __user *)(uintptr_t)(val))
>
> Better to reflect the special property, that it is a user pointer, in
> the name of the macro. Maybe something like user_ptr(64). The same
> comment for the same macro in
We need to look for an active PM request until the next softbarrier
instead of looking for the first non-PM request. Otherwise any cause
of request reordering might starve the PM request(s).
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
block/blk-core.
1dd10e66e67b Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <h...@lst.de>
Date: Thu, 5 Oct 2017 18:31:02 +0200
Subject: block: use DECLARE_COMPLETION_ONSTACK in submit_bio_wait
Simplify the code by getting rid of the submit_bio_ret structure.
Signed-off-by: Christoph Hellwig <h...@lst.de
On Thu, Oct 19, 2017 at 09:14:27AM -0600, Keith Busch wrote:
> This is a good cleanup, and I'd support this patch going in ahead of
> this series on its own if you want to apply to 4.15 immediately.
Ok, will do.
On Thu, Oct 19, 2017 at 02:06:07PM +0300, Sagi Grimberg wrote:
> Christoph,
>
>> static void nvme_free_ns(struct kref *kref)
>> {
>> struct nvme_ns *ns = container_of(kref, struct nvme_ns, kref);
>> + if (ns->head)
>> +nvme_put_ns_head(ns->head);
>> +
>
> When can we not
On Thu, Oct 19, 2017 at 01:33:55PM +0300, Sagi Grimberg wrote:
>> Well, the ctrl device integration is what enables us to do this.
>> Before that the ctrl refcount could have reached null by the time
>> we call the delete_ctrl method.
>
> OK, maybe a change log mention then?
I thought I did that,
On Thu, Oct 19, 2017 at 01:35:58PM +0300, Sagi Grimberg wrote:
>
>> +/**
>> + * direct_make_request - hand a buffer directly to its device driver for I/O
>> + * @bio: The bio describing the location in memory and on the device.
>> + *
>> + * This function behaves like generic_make_request(), but
On Thu, Oct 19, 2017 at 01:02:59PM +0300, Sagi Grimberg wrote:
>> By the time we call ->delete_ctrl in nvmf_create_ctrl we must still
>> have that reference because we are still in a ->write call and thus
>> ->release can't have been called yet.
>
> Thanks for the clarification. Is it worth a
On Thu, Oct 19, 2017 at 10:31:20AM +0300, Sagi Grimberg wrote:
> I don't think the fabrics device does not help us to keep the ctrl
> allocated until we finish removal.
All fabrics drivers grab an extra reference during ->create_ctrl,
which we will drop when releasing the file descriptor that we
On Thu, Oct 19, 2017 at 09:22:09AM +0200, Johannes Thumshirn wrote:
> I'm not sure if the removel of the major number module_param is good
> from an ABI POV. This could lead to some unexpected results for those
> poor souls that used it.
It's a completely broken interface, so I have no pity for
On Thu, Oct 19, 2017 at 10:17:01AM +0300, Sagi Grimberg wrote:
>
>
>> -if (!kref_get_unless_zero(>ctrl.kref))
>> -return -EBUSY;
>> +nvme_get_ctrl(>ctrl);
>
> Given that we take this reference before we are protected with
> the state change I think this should still be
> I'm having some trouble with this one. The device_initialize() initializes
> the kobj's reference counter, and then the device_add() takes another
> reference on it.
>
> The teardown, though, only calls put_device(). Where's the call to
> device_del() supposed to go that ultimately drops the
We do this by adding a helper that returns the ns_head for a device that
can belong to either the per-controller or per-subsystem block device
nodes, and otherwise reuse all the existing code.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Keith Busch <keith.bu...@
Hannes Reinecke to expose the subsystems
in sysfs.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
drivers/nvme/host/core.c| 179 +---
drivers/nvme/host/fabrics.c | 4 +-
drivers/nvme/host/nvme.h| 20 +++--
3 files changed, 167 inse
This allows us to manage the various uniqueue namespace identifiers
together instead needing various variables and arguments.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Keith Busch <keith.bu...@intel.com>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
---
driver
This is a much more sensible check than just the admin queue.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 3757f5695de2..d490ab
.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Keith Busch <keith.bu...@intel.com>
---
drivers/nvme/host/core.c | 192 +--
drivers/nvme/host/lightnvm.c | 14 ++--
drivers/nvme/host/nvme.h | 21 -
3 files changed, 19
it alive needs to be implemented at the controller
level.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
drivers/nvme/host/core.c | 369 ---
drivers/nvme/host/nvme.h | 16 +-
2 files changed, 333 insertions(+), 52 deletions(-)
diff --git a/d
This helper allows reinserting a bio into a new queue without much
overhead, but requires all queue limits to be the same for the upper
and lower queues, and it does not provide any recursion preventions.
Signed-off-by: Christoph Hellwig <h...@lst.de>
---
block/blk-core.c
This helpers allows to bounce steal the uncompleted bios from a request so
that they can be reissued on another path.
Signed-off-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Sagi Grimberg <s...@grimberg.me>
---
block/blk-core.c | 20
include/linux/b
801 - 900 of 2477 matches
Mail list logo