From: Dakshaja Uppalapati <dakshaja@chelsio.com>
To: Sagi Grimberg <sagi@grimberg.me>,
Eduard Hasenleithner <eduard@hasenleithner.at>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
"kbusch@kernel.org" <kbusch@kernel.org>
Cc: Potnuri Bharat Teja <bharat@chelsio.com>,
Nirranjan Kirubaharan <nirranjan@chelsio.com>
Subject: RE: nvme blk_update_request IO error observed on formatting device with kernels 5.5-rc1 and above.
Date: Fri, 24 Jan 2020 08:51:28 +0000 [thread overview]
Message-ID: <CH2PR12MB40059BF12ADD50A121B755E7DD0E0@CH2PR12MB4005.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CH2PR12MB40050ACF2C0DC7439355ED3FDD270@CH2PR12MB4005.namprd12.prod.outlook.com>
Hi Sagi,
Can you please push the patch.
Thanks & Regards,
Dakshaja
-----Original Message-----
From: Dakshaja Uppalapati
Sent: Monday, December 30, 2019 4:23 PM
To: Sagi Grimberg <sagi@grimberg.me>; Eduard Hasenleithner <eduard@hasenleithner.at>; linux-nvme@lists.infradead.org; kbusch@kernel.org
Cc: Potnuri Bharat Teja <bharat@chelsio.com>; Nirranjan Kirubaharan <nirranjan@chelsio.com>
Subject: RE: nvme blk_update_request IO error observed on formatting device with kernels 5.5-rc1 and above.
>> How big is the ramdisk?
It's 200MB and also tried with 1GB issue is seen.
>> Are there further error messages in the kernel log?
No.
> Its probably the target not expecting that dsm ranges payload doesn't match the command sgl desc...
> Does this untested patch help?
Yes, with the given patch error is not seen.
Thanks for the help.
Regards,
Dakshaja.
-----Original Message-----
From: Sagi Grimberg <sagi@grimberg.me>
Sent: Saturday, December 28, 2019 2:31 PM
To: Eduard Hasenleithner <eduard@hasenleithner.at>; Dakshaja Uppalapati <dakshaja@chelsio.com>; linux-nvme@lists.infradead.org; kbusch@kernel.org
Cc: Potnuri Bharat Teja <bharat@chelsio.com>; Nirranjan Kirubaharan <nirranjan@chelsio.com>
Subject: Re: nvme blk_update_request IO error observed on formatting device with kernels 5.5-rc1 and above.
>> I am trying to setup and run NVMF with tot linux kernel
>> installed(5.5.0-rc3) on both target and host. Attached is the target configuration using ramdisk device.
>
>> The following error is seen in dmesg:
>> [ 219.507989] blk_update_request: I/O error, dev nvme0c0n1, sector 0
>> op 0x3:(DISCARD) flags 0x4000800 phys_seg 1 prio class 0
>
>> Please let me know if any info is needed further.
>
> How big is the ramdisk?
> Are there further error messages in the kernel log?
> My current speculation is that it might fail in
> blk_cloned_rq_check_limits, but then there should be an additional error message,
> e.g. "blk_cloned_rq_check_limits: over max size limit".
Its probably the target not expecting that dsm ranges payload doesn't match the command sgl desc...
Does this untested patch help?
--
iff --git a/drivers/nvme/target/io-cmd-bdev.c
b/drivers/nvme/target/io-cmd-bdev.c
index b6fca0e421ef..945dffc82503 100644
--- a/drivers/nvme/target/io-cmd-bdev.c
+++ b/drivers/nvme/target/io-cmd-bdev.c
@@ -280,8 +280,11 @@ static void nvmet_bdev_execute_discard(struct nvmet_req *req)
static void nvmet_bdev_execute_dsm(struct nvmet_req *req)
{
- if (!nvmet_check_data_len(req, nvmet_dsm_len(req)))
+ if (unlikely(nvmet_dsm_len(req) > req->transfer_len)) {
+ req->error_loc = offsetof(struct nvme_common_command, dptr);
+ nvmet_req_complete(req, NVME_SC_SGL_INVALID_DATA |
NVME_SC_DNR);
return;
+ }
--
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-01-24 8:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-27 14:08 nvme blk_update_request IO error observed on formatting device with kernels 5.5-rc1 and above Dakshaja Uppalapati
2019-12-27 15:03 ` Eduard Hasenleithner
2019-12-28 9:01 ` Sagi Grimberg
2019-12-30 10:52 ` Dakshaja Uppalapati
2020-01-24 8:51 ` Dakshaja Uppalapati [this message]
2020-01-24 17:40 ` Sagi Grimberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CH2PR12MB40059BF12ADD50A121B755E7DD0E0@CH2PR12MB4005.namprd12.prod.outlook.com \
--to=dakshaja@chelsio.com \
--cc=bharat@chelsio.com \
--cc=eduard@hasenleithner.at \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=nirranjan@chelsio.com \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).