TESTS: Test that WRITESAME10/16 unmap can handle big number of logical blocks when unmapping.
If BLockLimits->MaxWriteSameLength is 0 (no limit) or >=256 then verify that both WRITESAME10 and WRITESAME16 can unmap with a number of blocks == 2 byte field. If not, then verify that a 256 block unmap results in INVALID FIELD IN CDB If BLockLimits->MaxWriteSameLength is 0 (no limit) or >=65536 then verify that WRITESAME16 can unmap with a number of blocks == 3 byte field. If not, then verify that a 65536 block unmap results in INVALID FIELD IN CDB From discussions on linux-scsi there are devices that support WRITESAME16 but where the implementation only looks at the low 2 bytes of the 4 bytes for num-blocks in the CDB. This added test aims to find and flag such devices.
This commit is contained in:
@@ -48,6 +48,7 @@ const char *tgt_url;
|
||||
|
||||
struct scsi_inquiry_standard *inq;
|
||||
struct scsi_inquiry_logical_block_provisioning *inq_lbp;
|
||||
struct scsi_inquiry_block_limits *inq_bl;
|
||||
struct scsi_readcapacity16 *rc16;
|
||||
|
||||
size_t block_size;
|
||||
|
||||
Reference in New Issue
Block a user