call blk_account_io_start() in blk_execute_rq_nowait()
and remove the passthrough check in blk_do_io_stat().
Link: https://lore.kernel.org/linux-block/20191010100526.ga27...@lst.de/
Signed-off-by: Logan Gunthorpe
Cc: Jens Axboe
Cc: Christoph Hellwig
---
This change is needed for the NVMe-of pas
Hey,
Thanks for the thorough review, lots here to go through. I'll address it
all as I have time and try to get the prep work done first, as soon as I
can.
On 2019-10-10 4:05 a.m., Christoph Hellwig wrote:
>> @@ -319,7 +319,7 @@ static struct request *blk_mq_rq_ctx_init(struct
>> blk_mq_alloc_da
subsystem to use passthru.
Any given subsystem is prevented from enabling both a regular namespace
and the passthru device. If one is enabled, enabling the other will
produce an error.
Signed-off-by: Logan Gunthorpe
Reviewed-by: Sagi Grimberg
---
drivers/nv
by Chaitanya]
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
Reviewed-by: Sagi Grimberg
---
drivers/nvme/target/admin-cmd.c | 4 ++--
drivers/nvme/target/nvmet.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers
Support block disk accounting by setting the RQF_IO_STAT flag
and gendisk in the request.
After this change, IO counts will be reflected correctly in
/proc/diskstats for drives being used by passthru.
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/io-cmd-passthru.c | 5 -
1 file
All existing users of blk_execute_rq[_nowait]() are for passthrough
commands and will thus be rejected by blk_do_io_stat().
This allows passthrough requests to opt-in to IO accounting by setting
RQF_IO_STAT.
Signed-off-by: Logan Gunthorpe
Reviewed-by: Sagi Grimberg
---
block/blk-exec.c | 2
...@deltatee.com:
* fleshed out commit message
* change to using int as a return type instead of bool
]
Signed-off-by: Logan Gunthorpe
Reviewed-by: Sagi Grimberg
---
drivers/nvme/target/core.c | 6 --
drivers/nvme/target/nvmet.h | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff
dropped le16_to_cpu() conversion in nvmet_passthru_req_done() as
it's currently already done in nvme_end_request()
* unabbreviated 'VUC' in a comment as it's not a commonly known
acronym
* removed unnecessary inline tags on static functions
* minor edits to commit mess
From: Chaitanya Kulkarni
We export existing nvme ctrl and ns management APIs so that target
passthru code can manage the nvme ctrl.
This is a preparation patch for implementing NVMe Over Fabric target
passthru feature.
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
Reviewed
passthru subsystem.
6. Use the passthru ctrl cntlid when creating the
target controller.
Chaitanya Kulkarni (4):
nvme-core: export existing ctrl and ns interfaces
nvmet: add return value to nvmet_add_async_event()
nvmet-passthru: add passthru code to process commands
rence
subsys->passthru_ctrl if CONFIG_NVME_TARGET_PASSTHRU is not set]
Signed-off-by: Logan Gunthorpe
Reviewed-by: Sagi Grimberg
---
drivers/nvme/target/core.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core
similar one by Chaitanya]
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/core.c| 8 +++
drivers/nvme/target/io-cmd-passthru.c | 77 +++
drivers/nvme/target/nvmet.h | 10
3 files changed, 95 insertions
Instead of checking blk_rq_is_passthruough() for every call to
blk_do_io_stat(), don't set RQF_IO_STAT for passthrough requests.
This should be equivalent, and opens the possibility of passthrough
requests specifically requesting statistics tracking.
Signed-off-by: Logan Gunthorpe
Review
it's currently already done in nvme_end_request()
* unabbreviated 'VUC' in a comment as it's not a commonly known
acronym
* removed unnecessary inline tags on static functions
* minor edits to commit message
]
Signed-off-by: Logan Gunthorpe
---
drivers/nvm
, -EINVAL is returned.
The purpose of this function is to support NVMe-OF target passthru.
Signed-off-by: Logan Gunthorpe
Reviewed-by: Max Gurtovoy
Reviewed-by: Sagi Grimberg
---
drivers/nvme/host/core.c | 24
drivers/nvme/host/nvme.h | 2 ++
2 files changed, 26 insertions
With passthru, the data_len is no longer guaranteed to be set
for all requests. Therefore, we should not check for it to be
non-zero. Instead check if the SGL length is zero and map
when appropriate.
None of the other transports check data_len which is verified
in core code.
Signed-off-by: Logan
A number of bug fixes have been submitted to the kernel to
fix bugs when a controller is removed immediately after it is
set up. This new test ensures this doesn't regress.
Signed-off-by: Logan Gunthorpe
Reviewed-by: Sagi Grimberg
---
Changes for v3:
* Drops the double loop_dev declar
ected correctly in
>>>>>> /proc/diskstats for drives being used by passthru.
>>>>>>
>>>>>> Signed-off-by: Logan Gunthorpe
>>>>>> ---
>>>>>> drivers/nvme/target/io-cmd-passthru.c | 5 -
>>>>&
skstats for drives being used by passthru.
>>>>
>>>> Signed-off-by: Logan Gunthorpe
>>>> ---
>>>>drivers/nvme/target/io-cmd-passthru.c | 5 -
>>>>1 file changed, 4 insertions(+), 1 deletion(-)
>>>>
>>>
On 2019-09-07 12:19 p.m., Chaitanya Kulkarni wrote:
> On 09/05/2019 10:44 AM, Logan Gunthorpe wrote:
>> A number of bug fixes have been submitted to the kernel to
>> fix bugs when a controller is removed immediately after it is
>> set up. This new test ensures this doesn
On 2019-09-06 6:00 p.m., Sagi Grimberg wrote:
>
>> Support block disk accounting by setting the RQF_IO_STAT flag
>> and gendisk in the request.
>>
>> After this change, IO counts will be reflected correctly in
>> /proc/diskstats for drives being used by pas
A number of bug fixes have been submitted to the kernel to
fix bugs when a controller is removed immediately after it is
set up. This new test ensures this doesn't regress.
Signed-off-by: Logan Gunthorpe
---
This is reallly just a resend. The patches this tests for are all in
5.3-r
Support block disk accounting by setting the RQF_IO_STAT flag
and gendisk in the request.
After this change, IO counts will be reflected correctly in
/proc/diskstats for drives being used by passthru.
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/io-cmd-passthru.c | 5 -
1 file
, -EINVAL is returned.
The purpose of this function is to support NVMe-OF target passthru.
Signed-off-by: Logan Gunthorpe
Reviewed-by: Max Gurtovoy
---
drivers/nvme/host/core.c | 24
drivers/nvme/host/nvme.h | 2 ++
2 files changed, 26 insertions(+)
diff --git a/drivers/nvme
by Chaitanya]
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/admin-cmd.c | 4 ++--
drivers/nvme/target/nvmet.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
dd_async_event()
nvmet-passthru: update KConfig with config passthru option
nvmet-passthru: add passthru code to process commands
nvmet-core: don't check the data len for pt-ctrl
Logan Gunthorpe (8):
nvme-core: introduce nvme_ctrl_get_by_path()
nvmet: make nvmet_copy_ns_identifier() no
Instead of checking blk_rq_is_passthruough() for every call to
blk_do_io_stat(), don't set RQF_IO_STAT for passthrough requests.
This should be equivalent, and opens the possibility of passthrough
requests specifically requesting statistics tracking.
Signed-off-by: Logan Gunthorpe
---
bloc
All existing users of blk_execute_rq[_nowait]() are for passthrough
commands and will thus be rejected by blk_do_io_stat().
This allows passthrough requests to opt-in to IO accounting by setting
RQF_IO_STAT.
Signed-off-by: Logan Gunthorpe
---
block/blk-exec.c | 2 ++
1 file changed, 2
d unnecessary inline tags on static functions
* minor edits to commit message
]
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/Makefile | 1 +
drivers/nvme/target/core.c| 11 +-
drivers/nvme/target/io-cmd-passthru.c | 564 ++
drivers/nvm
From: Chaitanya Kulkarni
We export existing nvme ctrl and ns management APIs so that target
passthru code can manage the nvme ctrl.
This is a preparation patch for implementing NVMe Over Fabric target
passthru feature.
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
similar one by Chaitanya]
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/core.c| 8 +++
drivers/nvme/target/io-cmd-passthru.c | 77 +++
drivers/nvme/target/nvmet.h | 10
3 files changed, 95 insertions
subsystem to use passthru.
Any given subsystem is prevented from enabling both a regular namespace
and the passthru device. If one is enabled, enabling the other will
produce an error.
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/configfs.c | 99 ++
dr
With passthru, the data_len is no longer guaranteed to be set
for all requests. Therefore, we should not check for it to be
non-zero. Instead check if the SGL length is zero and map
when appropriate.
None of the other transports check data_len which is verified
in core code.
Signed-off-by: Logan
rence
subsys->passthru_ctrl if CONFIG_NVME_TARGET_PASSTHRU is not set]
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/core.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 986b2511d284..f9d46354f9a
...@deltatee.com:
* fleshed out commit message
* change to using int as a return type instead of bool
]
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/core.c | 6 --
drivers/nvme/target/nvmet.h | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/nvme/target
From: Chaitanya Kulkarni
This patch updates KConfig file for the NVMeOF target where we add new
option so that user can selectively enable/disable passthru code.
Signed-off-by: Chaitanya Kulkarni
[log...@deltatee.com: fixed some of the wording in the help message]
Signed-off-by: Logan
On 2019-08-22 1:17 p.m., Sagi Grimberg wrote:
>
> I don't understand why we don't limit a regular ctrl to single
> access and we do it for the PT ctrl.
>
> I guess the block layer helps to sync between multiple access in
> parallel but we can do it as well.
>
> Also,
On 2019-08-15 6:36 a.m., Max Gurtovoy wrote:
>
> On 8/2/2019 2:45 AM, Logan Gunthorpe wrote:
>> This patch rejects any new connection to the passthru-ctrl if this
>> controller is already connected to a different host. At the time of
>> allocating the controlle
On 2019-08-15 6:20 a.m., Max Gurtovoy wrote:
>
> On 8/2/2019 2:45 AM, Logan Gunthorpe wrote:
>> This patch adds helper functions which are used in the NVMeOF configfs
>> when the user is configuring the passthru subsystem. Here we ensure
>> that only one subsys is assig
On 2019-08-15 5:46 a.m., Max Gurtovoy wrote:
>
> On 8/2/2019 2:45 AM, Logan Gunthorpe wrote:
>> nvme_ctrl_get_by_path() is analagous to blkdev_get_by_path() except it
>> gets a struct nvme_ctrl from the path to its char dev (/dev/nvme0).
>> It makes use of filp_open() t
On 2019-08-14 8:26 a.m., Max Gurtovoy wrote:
>
> On 8/2/2019 2:45 AM, Logan Gunthorpe wrote:
>> From: Chaitanya Kulkarni
>>
>> Change the return value for nvmet_add_async_event().
>>
>> This change is needed for the target passthru code to generate as
On 2019-08-08 3:00 p.m., Bart Van Assche wrote:
> On 8/8/19 1:08 PM, Logan Gunthorpe wrote:
>> On 2019-08-08 2:05 p.m., Bart Van Assche wrote:
>>> Avoid that the following error messages are reported when redirecting
>>> stdin:
>>>
>>> stty:
On 2019-08-08 2:05 p.m., Bart Van Assche wrote:
> Avoid that the following error messages are reported when redirecting stdin:
>
> stty: 'standard input': Inappropriate ioctl for device
> stty: 'standard input': Inappropriate ioctl for device
>
> Cc: Log
s/block/nvme1n1/uuid: No such file or directory
> +cat: /sys/block/nvme1n1/wwid: No such file or directory
>
> Cc: Logan Gunthorpe
> Cc: Chaitanya Kulkarni
> Cc: Johannes Thumshirn
> Signed-off-by: Bart Van Assche
Makes sense to me.
Reviewed-by: Logan Gunthorpe
> ---
>
From: Chaitanya Kulkarni
Change the return value for nvmet_add_async_event().
This change is needed for the target passthru code to generate async
events.
Signed-off-by: Chaitanya Kulkarni
[log...@deltatee.com: fixed up commit message that was no
longer accurate]
Signed-off-by: Logan
, -EINVAL is returned.
The purpose of this function is to support NVMe-OF target passthru.
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/host/core.c | 24
drivers/nvme/host/nvme.h | 2 ++
2 files changed, 26 insertions(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme
This function will be needed by the upcoming passthru code.
[chaitanya.kulka...@wdc.com: this was factored out of a patch
originally authored by Chaitanya]
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/admin-cmd.c | 4 ++--
drivers/nvme/target
Support block disk accounting by setting the RQF_IO_STAT flag
and gendisk in the request.
After this change, IO counts will be reflected correctly in
/proc/diskstats for drives being used by passthru.
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/io-cmd-passthru.c | 5 -
1 file
Instead of checking blk_rq_is_passthruough() for every call to
blk_do_io_stat(), don't set RQF_IO_STAT for passthrough requests.
This should be equivalent, and opens the possibility of passthrough
requests specifically requesting statistics tracking.
Signed-off-by: Logan Gunthorpe
---
bloc
All existing users of blk_execute_rq[_nowait]() are for passthrough
commands and will thus be rejected by blk_do_io_stat().
This allows passthrough requests to opt-in to IO accounting by setting
RQF_IO_STAT.
Signed-off-by: Logan Gunthorpe
---
block/blk-exec.c | 2 ++
1 file changed, 2
code to process commands
nvmet-core: don't check the data len for pt-ctrl
Logan Gunthorpe (9):
nvme-core: introduce nvme_ctrl_get_by_path()
nvmet: make nvmet_copy_ns_identifier() non-static
nvmet-passthru: add enable/disable helpers
nvmet-core: allow one host per passthru-ctrl
o the target
* dropped le16_to_cpu() conversion in nvmet_passthru_req_done() as
it's currently already done in nvme_end_request()
* unabbreviated 'VUC' in a comment as it's not a commonly known
acronym
* removed unnecessary inline tags on static functions
* minor e
From: Chaitanya Kulkarni
This patch updates KConfig file for the NVMeOF target where we add new
option so that user can selectively enable/disable passthru code.
Signed-off-by: Chaitanya Kulkarni
[log...@deltatee.com: fixed some of the wording in the help message]
Signed-off-by: Logan
subsystem to use passthru.
Any given subsystem is prevented from enabling both a regular namespace
and the passthru device. If one is enabled, enabling the other will
produce an error.
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/configfs.c | 99 ++
dr
similar one by Chaitanya]
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/core.c| 8 +++
drivers/nvme/target/io-cmd-passthru.c | 77 +++
drivers/nvme/target/nvmet.h | 10
3 files changed, 95 insertions
.
Connections from the same host (by hostnqn) are supported to allow
for multipath.
[chaitanya.kulka...@wdc.com: based conceptually on a similar patch but
different implementation]
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/core.c| 4
drivers
rence
subsys->passthru_ctrl if CONFIG_NVME_TARGET_PASSTHRU is not set]
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/core.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index c655f26db3da..1cda94437fb
From: Chaitanya Kulkarni
We export existing nvme ctrl and ns management APIs so that target
passthru code can manage the nvme ctrl.
This is a preparation patch for implementing NVMe Over Fabric target
passthru feature.
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
With passthru, the data_len is no longer guaranteed to be set
for all requests. Therefore, we should not check for it to be
non-zero. Instead check if the SGL length is zero and map
when appropriate.
None of the other transports check data_len which is verified
in core code.
Signed-off-by: Logan
A number of bug fixes have been submitted to the kernel to
fix bugs when a controller is removed immediately after it is
set up. This new test ensures this doesn't regress.
Signed-off-by: Logan Gunthorpe
---
All of the fixes required for this test to pass have been on the
list for a c
On 2019-07-29 10:15 a.m., Sagi Grimberg wrote:
>
>>> This is different from multipath on say a multi-controller PCI device
>>> and trying to expose both those controllers through passthru. this is
>>> where the problems we are discussing come up.
>>
>> I *think* there is some confusion. I *thin
On 2019-07-26 5:13 p.m., Sagi Grimberg wrote:
>
>>> Why? if nvmet is capable, why shouldn't we support it?
>>
>> I'm saying that passthru is exporting a specific controller and submits
>> commands (both admin and IO) straight to the nvme_ctrl's queues. It's
>> not exporting an nvme_subsys and I
On 2019-07-26 4:21 p.m., Sagi Grimberg wrote:
>> I don't think it necessarily makes sense for the target subsynqn and the
>> target's device nqn to be the same. It would be weird for a user to want
>> to use the same device and a passed through device (through a loop) as
>> part of the same subs
On 2019-07-26 12:23 a.m., Hannes Reinecke wrote:
> How do you handle subsystem naming?
> If you enable the 'passthru' device, the (nvmet) subsystem (and its
> name) is already created. Yet the passthru device will have its own
> internal subsystem naming, so if you're not extra careful you'll en
On 2019-07-25 10:29 p.m., Sagi Grimberg wrote:
>
NVMe-OF is configured using configfs. The target is specified by
the
user writing a path to a configfs attribute. This is the way it
works
today but with blkdev_get_by_path()[1]. For the passthru code,
On 2019-07-25 2:31 p.m., Keith Busch wrote:
> On Thu, Jul 25, 2019 at 02:28:28PM -0600, Logan Gunthorpe wrote:
>>
>>
>> On 2019-07-25 1:58 p.m., Keith Busch wrote:
>>> On Thu, Jul 25, 2019 at 11:54:18AM -0600, Logan Gunthorpe wrote:
>>>>
>>>&g
On 2019-07-25 1:58 p.m., Keith Busch wrote:
> On Thu, Jul 25, 2019 at 11:54:18AM -0600, Logan Gunthorpe wrote:
>>
>>
>> On 2019-07-25 11:50 a.m., Matthew Wilcox wrote:
>>> On Thu, Jul 25, 2019 at 11:23:23AM -0600, Logan Gunthorpe wrote:
>>>> nvme_get_by
On 2019-07-25 1:34 p.m., Greg Kroah-Hartman wrote:
> On Thu, Jul 25, 2019 at 12:02:30PM -0700, Sagi Grimberg wrote:
>>
>> Why do you have a "string" within the kernel and are not using the
>> normal open() call from userspace on the character device node on the
>> filesystem in your
On 2019-07-25 1:26 p.m., Matthew Wilcox wrote:
> On Thu, Jul 25, 2019 at 01:24:22PM -0600, Logan Gunthorpe wrote:
>>>> Assuming that there is a open handle somewhere out there...
>>
>> Yes, that would be a step backwards from an interface. The user would
>> th
On 2019-07-25 1:11 p.m., Matthew Wilcox wrote:
> On Thu, Jul 25, 2019 at 12:05:29PM -0700, Sagi Grimberg wrote:
>>
> NVMe-OF is configured using configfs. The target is specified by the
> user writing a path to a configfs attribute. This is the way it works
> today but with blkdev_ge
On 2019-07-25 12:27 p.m., Greg Kroah-Hartman wrote:
>>> Why do you have a "string" within the kernel and are not using the
>>> normal open() call from userspace on the character device node on the
>>> filesystem in your namespace/mount/whatever?
>>
>> NVMe-OF is configured using configfs. The ta
On 2019-07-25 12:10 p.m., Greg Kroah-Hartman wrote:
> On Thu, Jul 25, 2019 at 11:53:20AM -0600, Logan Gunthorpe wrote:
>>
>>
>> On 2019-07-25 11:40 a.m., Greg Kroah-Hartman wrote:
>>> On Thu, Jul 25, 2019 at 11:23:21AM -0600, Logan Gunthorpe wrote:
>>>>
On 2019-07-25 12:08 p.m., Greg Kroah-Hartman wrote:
> On Thu, Jul 25, 2019 at 11:53:20AM -0600, Logan Gunthorpe wrote:
>>
>>
>> On 2019-07-25 11:40 a.m., Greg Kroah-Hartman wrote:
>>> On Thu, Jul 25, 2019 at 11:23:21AM -0600, Logan Gunthorpe wrote:
>>>>
On 2019-07-25 11:58 a.m., Matthew Wilcox wrote:
> On Thu, Jul 25, 2019 at 11:53:20AM -0600, Logan Gunthorpe wrote:
>>
>>
>> On 2019-07-25 11:40 a.m., Greg Kroah-Hartman wrote:
>>> On Thu, Jul 25, 2019 at 11:23:21AM -0600, Logan Gunthorpe wrote:
>>>>
On 2019-07-25 11:50 a.m., Matthew Wilcox wrote:
> On Thu, Jul 25, 2019 at 11:23:23AM -0600, Logan Gunthorpe wrote:
>> nvme_get_by_path() is analagous to blkdev_get_by_path() except it
>> gets a struct nvme_ctrl from the path to its char dev (/dev/nvme0).
>>
>> The pur
On 2019-07-25 11:40 a.m., Greg Kroah-Hartman wrote:
> On Thu, Jul 25, 2019 at 11:23:21AM -0600, Logan Gunthorpe wrote:
>> cdev_get_by_path() attempts to retrieve a struct cdev from
>> a path name. It is analagous to blkdev_get_by_path().
>>
>> This wi
's currently already done in nvme_end_request()
* unabbreviated 'VUC' in a comment as it's not a commonly known
acronym
* removed unnecessary inline tags on static functions
* minor edits to commit message
]
Signed-off-by: Logan Gunthorpe
squash! nvmet-pa
From: Chaitanya Kulkarni
We export existing nvme ctrl and ns management APIs so that target
passthru code can manage the nvme ctrl.
This is a preparation patch for implementing NVMe Over Fabric target
passthru feature.
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
All existing users of blk_execute_rq[_nowait]() are for passthrough
commands and will thus be rejected by blk_do_io_stat().
This allows passthrough requests to opt-in to IO accounting by setting
RQF_IO_STAT.
Signed-off-by: Logan Gunthorpe
---
block/blk-exec.c | 2 ++
1 file changed, 2
similar one by Chaitanya]
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/core.c| 8 +++
drivers/nvme/target/io-cmd-passthru.c | 77 +++
drivers/nvme/target/nvmet.h | 10
3 files changed, 95 insertions
nvme_get_by_path() is analagous to blkdev_get_by_path() except it
gets a struct nvme_ctrl from the path to its char dev (/dev/nvme0).
The purpose of this function is to support NVMe-OF target passthru.
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/host/core.c | 23
rence
subsys->passthru_ctrl if CONFIG_NVME_TARGET_PASSTHRU is not set]
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/core.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 9e92486e2ee9..77660dfc6c8
Instead of checking blk_rq_is_passthruough() for every call to
blk_do_io_stat(), don't set RQF_IO_STAT for passthrough requests.
This should be equivalent, and opens the possibility of passthrough
requests specifically requesting statistics tracking.
Signed-off-by: Logan Gunthorpe
---
bloc
Support block disk accounting by setting the RQF_IO_STAT flag
and gendisk in the request.
After this change, IO counts will be reflected correctly in
/proc/diskstats for drives being used by passthru.
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/io-cmd-passthru.c | 5 -
1 file
In order to use the new cdev_get_by_path() helper in a module,
cdev_put() must be exported as well.
Signed-off-by: Logan Gunthorpe
Cc: Greg Kroah-Hartman
Cc: Alexander Viro
---
fs/char_dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/char_dev.c b/fs/char_dev.c
index 25037d642ff8
subsystem to use passthru.
Any given subsystem is prevented from enabling both a regular namespace
and the passthru device. If one is enabled, enabling the other will
produce an error.
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/configfs.c | 99 ++
dr
)
nvmet-passthru: update KConfig with config passthru option
nvmet-passthru: add passthru code to process commands
nvmet-core: allow one host per passthru-ctrl
nvmet-core: don't check the data len for pt-ctrl
Logan Gunthorpe (10):
chardev: factor out cdev_lookup() helper
cha
-off-by: Logan Gunthorpe
Cc: Greg Kroah-Hartman
Cc: Alexander Viro
---
fs/char_dev.c | 26 +++---
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/fs/char_dev.c b/fs/char_dev.c
index 00dfe17871ac..5cc53bd5f654 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
subsys into
functions in passthru-cmd.c to avoid excess inline #ifdefs
]
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/core.c| 6 +
drivers/nvme/target/io-cmd-passthru.c | 32 +++
drivers/nvme/target/nvmet.h | 10 +
3 files
From: Chaitanya Kulkarni
This patch updates KConfig file for the NVMeOF target where we add new
option so that user can selectively enable/disable passthru code.
Signed-off-by: Chaitanya Kulkarni
[log...@deltatee.com: fixed some of the wording in the help message]
Signed-off-by: Logan
cdev_get_by_path() attempts to retrieve a struct cdev from
a path name. It is analagous to blkdev_get_by_path().
This will be necessary to create a nvme_ctrl_get_by_path()to
support NVMe-OF passthru.
Signed-off-by: Logan Gunthorpe
Cc: Greg Kroah-Hartman
Cc: Alexander Viro
---
fs/char_dev.c
This function will be needed by the upcoming passthru code.
[chaitanya.kulka...@wdc.com: this was factored out of a patch
originally authored by Chaitanya]
Signed-off-by: Chaitanya Kulkarni
Signed-off-by: Logan Gunthorpe
---
drivers/nvme/target/admin-cmd.c | 4 ++--
drivers/nvme/target
From: Chaitanya Kulkarni
Change the return value for nvmet_add_async_event().
This change is needed for the target passthru code to generate async
events.
Signed-off-by: Chaitanya Kulkarni
[log...@deltatee.com: fixed up commit message that was no
longer accurate]
Signed-off-by: Logan
On 2019-07-18 1:03 a.m., Johannes Thumshirn wrote:
> On Wed, Jul 17, 2019 at 11:12:50AM -0600, Logan Gunthorpe wrote:
> [...]
>> +_discovery_genctr() {
>> +nvme discover -t loop |
>> +sed -n -e 's/^.*Generation counter \([0-9]\+\).*$/\1/p'
>&
Using modinfo fails if the given module is built-in.
Instead, if the module is already in the kernel, check for the
parameter in sysfs.
Signed-off-by: Logan Gunthorpe
---
common/rc | 6 ++
1 file changed, 6 insertions(+)
diff --git a/common/rc b/common/rc
index a487cc69026c..41aee3aaa735
Tests 003 and 004 do not call nvme disconnect. In most cases it is
cleaned up by removing the modules but it should be made explicit.
Signed-off-by: Logan Gunthorpe
---
tests/nvme/003 | 1 +
tests/nvme/003.out | 1 +
tests/nvme/004 | 1 +
tests/nvme/004.out | 1 +
4 files changed, 4
developers
that want to run the tests in a simple VM.
Signed-off-by: Logan Gunthorpe
---
tests/nvme/rc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/nvme/rc b/tests/nvme/rc
index a6b4d5938680..348b4a3c2cbc 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -68,8 +68,8
Now that the other discovery tests ignore the generation counter value,
create a new test to specifically check that it increments when
subsystems are added or removed from ports and when allow_any_host
is set/unset.
Signed-off-by: Logan Gunthorpe
---
tests/nvme/030 | 76
greater than 1, so the new filter function was expanded to
replace the Generation counter with 'X'.
Signed-off-by: Michael Moese
[log...@deltatee.com: added missing changes to 002.out and 017.out]
Signed-off-by: Logan Gunthorpe
---
tests/nvme/002 | 2 +-
tests/nvme/002.out | 2 +-
test
message content, it's
only important that a read past the end of the file fails. Therefore,
pipe stderr of nvme-cli to /dev/null.
Signed-off-by: Logan Gunthorpe
---
tests/nvme/018 | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/nvme/018 b/tests/nvme/018
1 - 100 of 371 matches
Mail list logo