linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Nicolai Stange <nicstange@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Shaun Tancheff <shaun.tancheff@seagate.com>,
	Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sd: make ->no_write_same independent of reported ->max_ws_blocks
Date: Mon, 05 Dec 2016 22:29:56 -0500	[thread overview]
Message-ID: <yq1d1h5viob.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <20161205235638.11539-1-nicstange@gmail.com> (Nicolai Stange's message of "Tue, 6 Dec 2016 00:56:38 +0100")

>>>>> "Nicolai" == Nicolai Stange <nicstange@gmail.com> writes:

Nicolai,

Nicolai> Due to reported problems with Write Same on ATA devices, commit
Nicolai> 0ce1b18c42a5 ("libata: Some drives failing on SCT Write Same")
Nicolai> strived to report non-support for Write Same on non-zoned ATA
Nicolai> devices.

Nicolai> However, due to the following control flow in
Nicolai> sd_config_write_same() this doesn't always take effect, namely
Nicolai> if the ->max_ws_blocks as set in the by the ATA Identify Device
Nicolai> exceeds SD_WS10_BLOCKS:

I'd much prefer for libata to set no_write_same = 1 for non-ZAC devices.

Older SCSI devices have no way to explicitly report that WRITE SAME is
supported. So the heuristic is the way it is to permit trying WRITE SAME
unless no_write_same has been set by the device driver. libata used to
do this prior to the zoned support going in.

Nicolai> Since commit e73c23ff736e ("block: add async variant of
Nicolai> blkdev_issue_zeroout"), blkdev_issue_zeroout() got a little bit
Nicolai> more sensitive towards failing Write Sames on devices that
Nicolai> claim to support them and this results in messages like

That's something that needs to be addressed. blkdev_issue_zeroout() must
cope with WRITE SAME failing and fall back to a manual zeroout.

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2016-12-06  3:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05 23:56 [PATCH] sd: make ->no_write_same independent of reported ->max_ws_blocks Nicolai Stange
2016-12-06  3:29 ` Martin K. Petersen [this message]
2016-12-06  8:08   ` Nicolai Stange
2016-12-08  0:18     ` Martin K. Petersen

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=yq1d1h5viob.fsf@sermon.lab.mkp.net \
    --to=martin.petersen@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=chaitanya.kulkarni@hgst.com \
    --cc=hch@infradead.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nicstange@gmail.com \
    --cc=shaun.tancheff@seagate.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 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).