Fix the 0 blocks writesame failed when target claims supporting maximum writesame length to LUN's total blocks number.
When target claim it support maximum writesame length to the total blocks number, when we trigger 0blocks writesame opertion, we should expect it to be succeed instread of failure.
This commit is contained in:
@@ -53,7 +53,7 @@ test_writesame10_0blocks(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (inq_bl->max_ws_len > 0 && num_blocks >= inq_bl->max_ws_len) {
|
||||
if (inq_bl->max_ws_len > 0 && num_blocks > inq_bl->max_ws_len) {
|
||||
WRITESAME10(sd, 0, block_size, 0, 0, 0, 0, 0, scratch,
|
||||
EXPECT_INVALID_FIELD_IN_CDB);
|
||||
} else {
|
||||
|
||||
@@ -48,7 +48,7 @@ test_writesame16_0blocks(void)
|
||||
}
|
||||
|
||||
|
||||
if (inq_bl->max_ws_len > 0 && num_blocks >= inq_bl->max_ws_len) {
|
||||
if (inq_bl->max_ws_len > 0 && num_blocks > inq_bl->max_ws_len) {
|
||||
WRITESAME16(sd, 0, block_size, 0, 0, 0, 0, 0, scratch,
|
||||
EXPECT_INVALID_FIELD_IN_CDB);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user