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:
yayang1
2018-09-28 02:31:28 +00:00
parent 7e459df828
commit 8a3375e459
2 changed files with 2 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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 {