Re: [PATCH] block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled

2016-02-17 Thread Martin K. Petersen
> "Yiwen" == jiangyiwen writes: Yiwen, Yiwen> When called scsi_prep_fn return BLKPREP_INVALID, we should use Yiwen> the same code with BLKPREP_KILL in scsi_prep_return. You are right! Applied to 4.5/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from t

Re: [PATCH] block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled

2016-02-16 Thread jiangyiwen
On 2016/2/5 11:13, Martin K. Petersen wrote: >> "Yiwen" == jiangyiwen writes: > > Yiwen, > > Yiwen> First, I don't understand why blk_peek_request() return > Yiwen> EREMOTEIO, as I know, in this situation we only prepare scsi > Yiwen> command without sending to device, and I think EREMOTEIO

Re: [PATCH] block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled

2016-02-04 Thread jiangyiwen
On 2016/2/5 11:13, Martin K. Petersen wrote: >> "Yiwen" == jiangyiwen writes: > > Yiwen, > > Yiwen> First, I don't understand why blk_peek_request() return > Yiwen> EREMOTEIO, as I know, in this situation we only prepare scsi > Yiwen> command without sending to device, and I think EREMOTEIO

Re: [PATCH] block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled

2016-02-04 Thread Martin K. Petersen
> "Ewan" == Ewan Milne writes: Ewan> Maybe it's unnecessary, but I would put parenthesis around (ret == Ewan> ... -EIO); for clarity. Sure. Ewan> I would prefer that additional enum/constant values be added to Ewan> the end of the series, here you are changing the ordinal value of Ewan> BLK

Re: [PATCH] block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled

2016-02-04 Thread Martin K. Petersen
> "Yiwen" == jiangyiwen writes: Yiwen, Yiwen> First, I don't understand why blk_peek_request() return Yiwen> EREMOTEIO, as I know, in this situation we only prepare scsi Yiwen> command without sending to device, and I think EREMOTEIO should Yiwen> be returned only when IO has already sent t

Re: [PATCH] block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled

2016-02-04 Thread Ewan Milne
See below. On Thu, 2016-02-04 at 01:48 -0500, Martin K. Petersen wrote: > When a storage device rejects a WRITE SAME command we will disable write > same functionality for the device and return -EREMOTEIO to the block > layer. -EREMOTEIO will in turn prevent DM from retrying the I/O and/or > faili

Re: [PATCH] block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled

2016-02-04 Thread Hannes Reinecke
On 02/04/2016 07:48 AM, Martin K. Petersen wrote: > When a storage device rejects a WRITE SAME command we will disable write > same functionality for the device and return -EREMOTEIO to the block > layer. -EREMOTEIO will in turn prevent DM from retrying the I/O and/or > failing the path. > > Yiwen

Re: [PATCH] block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled

2016-02-04 Thread jiangyiwen
On 2016/2/4 14:48, Martin K. Petersen wrote: > When a storage device rejects a WRITE SAME command we will disable write > same functionality for the device and return -EREMOTEIO to the block > layer. -EREMOTEIO will in turn prevent DM from retrying the I/O and/or > failing the path. > > Yiwen Jian

[PATCH] block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled

2016-02-03 Thread Martin K. Petersen
When a storage device rejects a WRITE SAME command we will disable write same functionality for the device and return -EREMOTEIO to the block layer. -EREMOTEIO will in turn prevent DM from retrying the I/O and/or failing the path. Yiwen Jiang discovered a small race where WRITE SAME requests issue