Martin K. Petersen
5db44863b6
[SCSI] sd: Implement support for WRITE SAME
...
Implement support for WRITE SAME(10) and WRITE SAME(16) in the SCSI disk
driver.
- We set the default maximum to 0xFFFF because there are several
devices out there that only support two-byte block counts even with
WRITE SAME(16). We only enable transfers bigger than 0xFFFF if the
device explicitly reports MAXIMUM WRITE SAME LENGTH in the BLOCK
LIMITS VPD.
- max_write_same_blocks can be overriden per-device basis in sysfs.
- The UNMAP discovery heuristics remain unchanged but the discard
limits are tweaked to match the "real" WRITE SAME commands.
- In the error handling logic we now distinguish between WRITE SAME
with and without UNMAP set.
The discovery process heuristics are:
- If the device reports a SCSI level of SPC-3 or greater we'll issue
READ SUPPORTED OPERATION CODES to find out whether WRITE SAME(16) is
supported. If that's the case we will use it.
- If the device supports the block limits VPD and reports a MAXIMUM
WRITE SAME LENGTH bigger than 0xFFFF we will use WRITE SAME(16).
- Otherwise we will use WRITE SAME(10) unless the target LBA is beyond
0xFFFFFFFF or the block count exceeds 0xFFFF.
- no_write_same is set for ATA, FireWire and USB.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Reviewed-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-11-13 22:45:42 -08:00
..
2012-10-06 03:04:44 +09:00
2012-09-01 08:24:35 -07:00
2011-03-31 11:26:23 -03:00
2012-10-06 03:04:44 +09:00
2012-08-20 14:51:24 -07:00
2012-10-19 15:40:18 -07:00
2012-09-14 17:59:28 +01:00
2012-10-07 11:29:16 +01:00
2012-10-02 19:01:32 -07:00
2012-09-17 13:40:32 +01:00
2012-07-24 18:11:22 -07:00
2012-09-24 12:21:56 +04:00
2011-07-26 16:49:47 -07:00
2012-10-07 11:49:34 +01:00
2011-06-29 16:05:41 -05:00
2012-09-24 12:11:09 +04:00
2012-11-13 13:45:14 +00:00
2012-10-07 11:52:55 +01:00
2012-08-24 13:10:24 +04:00
2012-10-08 12:16:11 +01:00
2012-10-09 11:21:48 +01:00
2012-10-02 19:01:32 -07:00
2012-09-14 14:48:32 +01:00
2012-02-25 08:25:09 -06:00
2012-01-13 09:32:20 +10:30
2012-07-20 08:58:54 +01:00
2012-10-26 12:29:46 -07:00
2012-10-02 19:01:32 -07:00
2012-09-07 16:35:00 -06:00
2012-07-20 08:59:02 +01:00
2011-09-26 09:28:58 -05:00
2011-03-31 11:26:23 -03:00
2010-11-16 13:33:23 -08:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2010-12-22 18:57:02 +01:00
2011-10-31 19:31:24 -04:00
2011-10-31 19:31:24 -04:00
2012-03-28 18:30:03 +01:00
2012-07-20 10:19:25 +02:00
2012-06-28 11:44:36 +02:00
2010-11-16 13:33:23 -08:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2011-06-29 15:11:21 -05:00
2012-04-22 20:16:49 +02:00
2012-04-22 20:16:49 +02:00
2012-10-06 03:04:37 +09:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2010-10-22 10:52:56 -07:00
2012-09-14 11:58:53 +01:00
2012-01-13 09:32:20 +10:30
2011-03-31 11:26:23 -03:00
2011-05-01 10:22:40 -05:00
2010-11-16 13:33:23 -08:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2011-05-01 10:22:40 -05:00
2011-05-01 10:22:40 -05:00
2012-04-05 17:09:40 -07:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2010-12-31 09:50:09 -06:00
2012-03-28 18:30:03 +01:00
2012-09-01 08:43:34 -07:00
2011-10-31 19:31:24 -04:00
2012-07-20 08:58:40 +01:00
2012-05-10 09:19:39 +01:00
2012-10-02 19:01:32 -07:00
2012-05-10 09:19:39 +01:00
2012-07-20 08:58:30 +01:00
2012-07-20 08:58:30 +01:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2012-10-06 03:16:12 +09:00
2012-08-24 13:10:28 +04:00
2012-03-20 21:48:19 +08:00
2011-03-31 11:26:23 -03:00
2012-01-03 22:54:55 -05:00
2012-09-24 12:10:55 +04:00
2011-02-24 12:41:10 -05:00
2012-01-02 13:04:55 +01:00
2012-07-20 08:59:04 +01:00
2012-03-22 12:55:29 -07:00
2012-02-19 08:09:00 -06:00
2011-10-31 19:31:24 -04:00
2012-03-28 18:30:03 +01:00
2012-01-22 14:50:03 +01:00
2012-03-28 18:30:03 +01:00
2012-07-20 08:58:13 +01:00
2012-10-01 09:06:36 -07:00
2012-09-01 08:42:43 -07:00
2012-03-28 18:30:03 +01:00
2012-10-07 11:34:36 +01:00
2012-10-07 11:34:36 +01:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2010-11-16 13:33:23 -08:00
2011-05-10 10:16:21 +02:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2012-08-20 14:51:24 -07:00
2012-02-21 11:40:37 +01:00
2010-11-16 13:33:23 -08:00
2011-10-31 19:31:24 -04:00
2012-04-30 13:25:43 +02:00
2010-11-16 13:33:23 -08:00
2010-11-16 13:33:23 -08:00
2012-10-28 13:26:37 -07:00
2010-08-06 09:25:50 -06:00
2012-10-09 12:23:11 +01:00
2012-09-24 12:11:00 +04:00
2012-10-09 12:04:42 +01:00
2011-10-31 19:31:23 -04:00
2012-11-13 22:45:42 -08:00
2012-09-13 16:26:39 -04:00
2012-07-20 08:58:55 +01:00
2012-07-20 09:05:54 +01:00
2011-05-28 23:12:11 -07:00
2012-10-02 08:55:12 +01:00
2012-09-24 12:17:49 +04:00
2011-10-31 19:31:23 -04:00
2011-05-01 10:20:10 -05:00
2011-05-24 12:38:36 -04:00
2012-08-01 09:02:41 -07:00
2012-09-10 15:30:41 -04:00
2012-02-29 15:43:54 -06:00
2012-05-10 09:06:12 +01:00
2012-11-13 21:11:31 -08:00
2012-01-03 22:54:07 -05:00
2012-09-24 12:10:59 +04:00
2012-11-13 22:45:42 -08:00
2012-11-13 22:45:42 -08:00
2011-06-29 12:14:25 -05:00
2012-10-09 16:22:19 +09:00
2011-04-06 06:19:38 -07:00
2012-05-17 19:03:54 -04:00
2012-01-02 13:04:55 +01:00
2011-10-31 19:31:24 -04:00
2011-07-21 14:15:58 -07:00
2011-07-21 14:15:58 -07:00
2012-09-24 13:07:02 +04:00
2012-09-14 17:59:29 +01:00
2010-11-16 13:33:23 -08:00
2012-10-09 12:28:58 +01:00
2011-06-29 15:15:05 -05:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2011-02-28 01:36:39 -07:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2011-05-01 10:22:40 -05:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2012-10-09 11:24:47 +01:00
2012-09-01 08:24:35 -07:00
2012-03-27 08:26:36 +01:00
2011-05-26 13:19:00 -07:00
2010-11-16 13:33:23 -08:00
2012-03-28 18:30:03 +01:00