Re: [PATCH] block: cope with WRITE SAME failing in blkdev_issue_zeroout()

2017-09-20 Thread Martin K. Petersen
Christoph, > I'm really not sure we should check for -EREMOTEIO specifically, but > Martin who is more familiar with the SCSI code might be able to > correct me, I'd feel safer about checking for any error which is > what the old code did. > > Except for that the patch looks fine to me. We

Re: [PATCH] block: cope with WRITE SAME failing in blkdev_issue_zeroout()

2017-09-20 Thread Ilya Dryomov
On Tue, Sep 19, 2017 at 10:32 PM, Christoph Hellwig wrote: > On Wed, Sep 06, 2017 at 07:38:10PM +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.

Re: [PATCH] block: cope with WRITE SAME failing in blkdev_issue_zeroout()

2017-09-19 Thread Christoph Hellwig
On Wed, Sep 06, 2017 at 07:38:10PM +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. This means blkdev_issue_zeroout() must cope with WRITE SAME > failing with

Re: [PATCH] block: cope with WRITE SAME failing in blkdev_issue_zeroout()

2017-09-19 Thread Ilya Dryomov
On Wed, Sep 13, 2017 at 11:50 AM, Ilya Dryomov wrote: > On Wed, Sep 6, 2017 at 7:38 PM, 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 >>

Re: [PATCH] block: cope with WRITE SAME failing in blkdev_issue_zeroout()

2017-09-13 Thread Ilya Dryomov
On Wed, Sep 6, 2017 at 7:38 PM, 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. This means blkdev_issue_zeroout() must cope with WRITE SAME > failing

[PATCH] block: cope with WRITE SAME failing in blkdev_issue_zeroout()

2017-09-06 Thread Ilya Dryomov
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. This means blkdev_issue_zeroout() must cope with WRITE SAME failing with BLK_STS_TARGET/-EREMOTEIO and explicitly write zeroes, unless