On Mon, Oct 16, 2017 at 1:44 PM, Christoph Hellwig wrote:
> On Fri, Oct 06, 2017 at 02:31:20PM +0200, Ilya Dryomov wrote:
>> This would unconditionally overwrite any WRITE ZEROS error. If we get
>> e.g. -EIO, and manual zeroing is not allowed, I don't think we want to
>>
On Fri, Oct 06, 2017 at 02:31:20PM +0200, Ilya Dryomov wrote:
> This would unconditionally overwrite any WRITE ZEROS error. If we get
> e.g. -EIO, and manual zeroing is not allowed, I don't think we want to
> return -EOPNOTSUPP?
>
> Returning -EOPNOTSUPP to mean "can't zero using either method"
On Fri, Oct 6, 2017 at 2:31 PM, Ilya Dryomov wrote:
> On Fri, Oct 6, 2017 at 2:05 PM, Christoph Hellwig wrote:
>> On Thu, Oct 05, 2017 at 09:32:33PM +0200, Ilya Dryomov wrote:
>>> This is to avoid returning -EREMOTEIO in the following case: device
>>>
On Fri, Oct 6, 2017 at 2:05 PM, Christoph Hellwig wrote:
> On Thu, Oct 05, 2017 at 09:32:33PM +0200, Ilya Dryomov wrote:
>> This is to avoid returning -EREMOTEIO in the following case: device
>> doesn't support WRITE SAME but scsi_disk::max_ws_blocks != 0, zeroout
>> is called
On Thu, Oct 05, 2017 at 09:32:33PM +0200, Ilya Dryomov wrote:
> This is to avoid returning -EREMOTEIO in the following case: device
> doesn't support WRITE SAME but scsi_disk::max_ws_blocks != 0, zeroout
> is called with BLKDEV_ZERO_NOFALLBACK. Enter blkdev_issue_zeroout(),
>
On Thu, Oct 5, 2017 at 7:13 PM, Christoph Hellwig wrote:
> On Wed, Oct 04, 2017 at 05:03:16PM +0200, Ilya Dryomov wrote:
>> sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to
>> permit trying WRITE SAME on older SCSI devices, unless ->no_write_same
>> is set.
On Wed, Oct 04, 2017 at 05:03:16PM +0200, Ilya Dryomov wrote:
> sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to
> permit trying WRITE SAME on older SCSI devices, unless ->no_write_same
> is set. Because REQ_OP_WRITE_ZEROES is implemented in terms of WRITE
> SAME,
sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to
permit trying WRITE SAME on older SCSI devices, unless ->no_write_same
is set. Because REQ_OP_WRITE_ZEROES is implemented in terms of WRITE
SAME, blkdev_issue_zeroout() may fail with -EREMOTEIO:
$ fallocate -zn -l 1k /dev/sdg