From: Keith Busch <kbusch@kernel.org>
To: John Garry <john.g.garry@oracle.com>
Cc: hch@lst.de, sagi@grimberg.me, axboe@fb.com,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme: handle positive error codes in nuse_show()
Date: Mon, 6 Jul 2026 12:57:33 -0600 [thread overview]
Message-ID: <akv6nYVwUXvUOqC8@kbusch-mbp> (raw)
In-Reply-To: <20260630102717.2671475-1-john.g.garry@oracle.com>
On Tue, Jun 30, 2026 at 10:27:17AM +0000, John Garry wrote:
> Function __nvme_submit_sync_cmd() returns a positive error code for NVMe
> errors. Otherwise, we get 0 for success or a negative error code for a
> kernel error.
>
> In nuse_show() -> ns_{head}_update_nuse() -> nvme_identify_ns() ->
> nvme_submit_sync_cmd() -> __nvme_submit_sync_cmd(), we then may get a
> positive error code returned.
>
> Function nuse_show() - being a device attr handler - should return the
> number of bytes written to the buffer or a negative error code.
>
> Convert any positive NVMe error code to -EIO.
Thanks, applied to nvme-7.3.
prev parent reply other threads:[~2026-07-06 18:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 10:27 [PATCH] nvme: handle positive error codes in nuse_show() John Garry
2026-07-01 10:45 ` Christoph Hellwig
2026-07-06 18:57 ` Keith Busch [this message]
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=akv6nYVwUXvUOqC8@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=john.g.garry@oracle.com \
--cc=linux-nvme@lists.infradead.org \
--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