From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@lst.de>
Cc: Junichi Nomura <j-nomura@ce.jp.nec.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [REGRESSION v4.10-rc1] blkdev_issue_zeroout() returns -EREMOTEIO on the first call for SCSI device that doesn't support WRITE SAME
Date: Fri, 3 Feb 2017 09:14:11 -0700 [thread overview]
Message-ID: <1e819f0d-ecdc-e54a-bd3d-17de2f71c8a7@kernel.dk> (raw)
In-Reply-To: <20170203161239.GA3880@lst.de>
On 02/03/2017 09:12 AM, Christoph Hellwig wrote:
> On Fri, Feb 03, 2017 at 08:21:31AM -0700, Jens Axboe wrote:
>>> Error 121 (EREMOTEIO) was returned from blkdev_issue_zeroout().
>>> That came from sd driver because WRITE SAME was sent to the device
>>> which didn't support it.
>>>
>>> The problem was introduced by commit e73c23ff736e ("block: add async
>>> variant of blkdev_issue_zeroout"). Before the commit, blkdev_issue_zeroout
>>> fell back to normal zero writing when WRITE SAME failed and it seems
>>> sd driver's heuristics depends on that behaviour.
>>
>> CC Christoph and Chaitanya.
>
> And adding Martin as the sd.c Write Same code is his.
>
> I suspect we'll have to restore the old way this works for 4.10 as it's
> too late in the cycle, but that whole idea of trying Write Same first
> and just disabling it if it doesn't work is a receipe for desaster -
> it kinda works for a synchronous blkdev_issue_zeroout, but if we want
> to be able to submit it asynchronously it's getting too hairy to handle.
I agree, the current approach is a hot and ugly mess.
> I think we should fix sd.c to only send WRITE SAME if either of the
> variants are explicitly listed as supported through
> REPORT SUPPORTED OPERATION CODES, or maybe through a whitelist if
> there are important enough devices.
Yep
--
Jens Axboe
next prev parent reply other threads:[~2017-02-03 16:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 7:55 [REGRESSION v4.10-rc1] blkdev_issue_zeroout() returns -EREMOTEIO on the first call for SCSI device that doesn't support WRITE SAME Junichi Nomura
2017-02-03 15:21 ` Jens Axboe
2017-02-03 16:12 ` Christoph Hellwig
2017-02-03 16:14 ` Jens Axboe [this message]
2017-02-03 22:45 ` Martin K. Petersen
2017-02-03 22:45 ` Martin K. Petersen
2017-02-04 3:17 ` Jens Axboe
2017-02-04 8:48 ` Christoph Hellwig
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=1e819f0d-ecdc-e54a-bd3d-17de2f71c8a7@kernel.dk \
--to=axboe@kernel.dk \
--cc=chaitanya.kulkarni@hgst.com \
--cc=hch@lst.de \
--cc=j-nomura@ce.jp.nec.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.