Martin K. Petersen
0fb5b1fb30
block/sd: Return -EREMOTEIO when WRITE SAME and DISCARD are disabled
...
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 issued
simultaneously would cause -EIO to be returned. This happened because
any requests being prepared after WRITE SAME had been disabled for the
device caused us to return BLKPREP_KILL. The latter caused the block
layer to return -EIO upon completion.
To overcome this we introduce BLKPREP_INVALID which indicates that this
is an invalid request for the device. blk_peek_request() is modified to
return -EREMOTEIO in that case.
Reported-by: Yiwen Jiang <jiangyiwen@huawei.com >
Suggested-by: Mike Snitzer <snitzer@redhat.com >
Reviewed-by: Hannes Reinicke <hare@suse.de >
Reviewed-by: Ewan Milne <emilne@redhat.com >
Reviewed-by: Yiwen Jiang <jiangyiwen@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-02-04 22:42:58 -05:00
..
2015-12-13 19:59:48 -08:00
2015-12-14 10:11:09 -08:00
2015-12-11 16:56:16 +01:00
2016-01-13 16:00:32 +01:00
2015-12-22 17:04:56 +00:00
2015-12-29 10:08:45 +01:00
2016-01-07 10:10:50 -05:00
2016-01-18 12:10:45 -08:00
2015-12-17 22:08:28 -05:00
2016-01-17 12:08:04 -05:00
2016-01-05 18:04:58 +01:00
2016-01-07 09:55:39 -08:00
2015-12-28 18:43:15 +01:00
2015-12-21 14:26:28 +05:30
2016-01-18 12:50:55 -08:00
2015-12-05 02:06:51 +01:00
2015-12-17 22:08:28 -05:00
2016-01-12 18:26:10 +00:00
2015-12-11 19:34:39 -05:00
2016-01-11 16:48:35 +00:00
2015-12-16 16:36:25 +02:00
2015-12-23 10:08:15 -05:00
2016-01-13 09:26:40 -08:00
2016-01-12 01:10:19 +01:00
2016-01-04 16:19:57 +00:00
2016-01-14 13:40:30 +01:00
2016-01-17 19:13:15 -08:00
2016-01-09 08:39:04 -08:00
2015-12-13 15:55:55 +01:00
2015-12-09 10:35:16 -08:00
2016-02-04 22:42:58 -05:00
2015-12-06 12:46:31 +01:00
2016-01-12 19:20:32 -08:00
2016-01-12 19:20:32 -08:00
2015-12-23 13:08:56 -08:00
2015-12-07 00:02:05 +00:00
2016-01-04 12:31:46 +01:00
2016-01-16 11:17:25 -08:00
2015-12-04 10:34:45 +01:00
2016-01-01 03:49:51 +01:00
2016-01-14 16:00:49 -08:00
2015-12-30 13:01:03 -05:00
2015-12-09 01:25:01 +01:00
2016-01-06 15:17:47 +05:30
2016-01-15 22:08:45 +01:00
2016-01-04 10:58:35 +01:00
2015-12-11 16:56:40 +01:00
2015-12-11 11:05:57 -08:00
2016-01-16 11:17:24 -08:00
2016-01-06 16:31:56 -05:00
2015-12-15 08:53:36 -05:00
2015-12-14 18:58:42 -08:00
2015-12-15 15:41:24 +02:00
2016-01-08 21:40:34 -05:00
2016-01-13 19:15:14 -08:00
2016-01-14 16:00:49 -08:00
2016-01-12 20:04:15 -08:00
2015-12-22 17:10:17 -06:00
2016-01-09 22:42:31 -08:00
2016-01-14 16:00:49 -08:00
2015-12-05 17:41:42 -05:00
2015-12-28 13:41:50 +01:00
2016-01-15 17:56:32 -08:00
2016-01-15 17:56:32 -08:00
2015-12-21 13:07:56 -08:00
2016-01-13 11:06:03 +01:00
2015-12-15 16:50:20 -05:00
2015-12-15 23:26:51 -05:00
2015-12-04 10:34:46 +01:00
2015-12-08 12:53:29 +01:00
2016-01-15 17:56:32 -08:00
2015-12-14 10:03:46 +01:00
2015-12-29 10:08:45 +01:00
2016-01-16 11:17:23 -08:00
2016-01-16 11:17:22 -08:00
2015-12-19 11:07:01 +01:00
2015-12-15 10:01:43 -05:00
2015-12-12 10:15:34 -08:00
2016-01-15 17:56:32 -08:00
2016-01-15 17:56:32 -08:00
2016-01-04 09:57:40 +01:00
2016-01-11 19:33:59 -08:00
2016-01-09 08:39:03 -08:00
2015-12-07 09:14:19 -07:00
2016-01-15 17:56:32 -08:00
2015-12-24 11:09:40 -05:00
2016-01-07 14:31:27 -05:00
2016-01-15 17:56:32 -08:00
2016-01-15 17:56:32 -08:00
2016-01-15 17:56:32 -08:00
2016-01-14 16:00:49 -08:00
2016-01-15 17:56:32 -08:00
2016-01-14 16:00:49 -08:00
2016-01-15 17:56:32 -08:00
2016-01-15 17:56:32 -08:00
2016-01-15 17:56:32 -08:00
2016-01-14 16:00:49 -08:00
2015-12-14 19:15:05 -08:00
2015-12-04 22:46:26 +01:00
2015-12-16 15:29:44 +00:00
2016-01-09 03:07:52 -05:00
2015-12-15 16:50:20 -05:00
2016-01-11 23:28:44 -05:00
2015-12-15 23:25:20 -05:00
2016-01-14 16:08:23 -08:00
2015-12-28 09:57:15 -05:00
2016-01-14 16:08:23 -08:00
2016-01-04 13:19:55 -05:00
2015-12-17 10:43:06 -06:00
2016-01-05 11:20:12 +01:00
2015-12-09 09:23:28 -06:00
2015-12-18 11:17:26 +05:30
2016-01-15 17:56:32 -08:00
2016-01-15 17:56:32 -08:00
2015-12-21 13:49:32 +00:00
2016-01-15 17:56:32 -08:00
2016-01-15 17:56:32 -08:00
2016-01-07 14:31:27 -05:00
2016-01-12 20:25:09 -08:00
2015-12-10 23:08:51 +01:00
2015-12-21 03:11:12 +01:00
2016-01-16 11:17:22 -08:00
2015-12-06 21:25:17 -05:00
2016-01-02 00:29:35 +01:00
2016-01-16 11:17:29 -08:00
2016-01-01 02:09:51 +01:00
2015-12-07 17:02:54 -08:00
2015-12-07 17:02:54 -08:00
2015-12-07 17:01:31 -08:00
2015-12-07 17:01:31 -08:00
2016-01-05 19:07:17 +00:00
2015-12-17 22:08:28 -05:00
2016-01-15 17:56:32 -08:00
2016-01-10 22:13:15 -05:00
2015-12-15 09:41:09 +01:00
2016-01-12 18:57:02 -08:00
2015-12-24 11:09:40 -05:00
2015-12-13 19:59:48 -08:00
2015-12-17 11:18:44 +01:00
2016-01-04 16:11:11 -05:00
2016-01-14 16:00:49 -08:00
2016-01-15 14:35:24 -05:00
2016-01-14 16:00:49 -08:00
2015-12-15 23:26:51 -05:00
2016-01-06 11:02:29 +01:00
2016-01-04 10:20:19 -05:00
2016-01-15 17:56:32 -08:00
2016-01-14 16:00:49 -08:00
2015-12-10 22:41:06 -08:00
2016-01-18 14:49:33 -05:00
2015-12-06 12:56:06 +01:00
2016-01-12 20:04:15 -08:00
2015-12-13 19:59:48 -08:00
2015-12-18 17:48:50 -08:00
2015-12-06 20:42:15 -05:00
2015-12-21 15:28:11 -07:00
2015-12-04 10:38:59 -02:00
2016-01-12 20:47:06 +02:00
2016-01-12 20:47:02 +02:00
2016-01-15 17:56:32 -08:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2015-12-04 10:34:45 +01:00
2016-01-12 18:57:02 -08:00
2016-01-11 21:53:59 +01:00
2015-12-08 11:29:47 -05:00
2015-12-13 19:46:12 -05:00