Revert "specify number of blocks in write_same command"

As reported by Sitsofe Wheeler, the WRITE SAME commands with zero blocks are
only issued if WSNZ == 0. WSNZ == 0 means that zero in the NUMBER OF LOGICAL
BLOCKS field means that all logical blocks until the end are affected. In
other words, the original code was fine. Hence revert commit dfff7e9d16.

Reported-by: Sitsofe Wheeler <sitsofe@yahoo.com>
This commit is contained in:
Bart Van Assche
2020-12-17 13:52:45 -08:00
parent 72dd7beb1b
commit a8fcd18850
2 changed files with 2 additions and 4 deletions

View File

@@ -53,11 +53,9 @@ test_writesame10_unmap_until_end(void)
i * block_size, block_size, 0, 0, 0, 0, 0, scratch,
EXPECT_STATUS_GOOD);
// write 0-buffer to entire range.
memset(scratch, 0, block_size * i);
logging(LOG_VERBOSE, "Unmap %d blocks using WRITESAME10", i);
WRITESAME10(sd, num_blocks - i,
block_size, i, 0, 1, 0, 0, scratch,
block_size, 0, 0, 1, 0, 0, scratch,
EXPECT_STATUS_GOOD);
if (rc16->lbprz) {

View File

@@ -58,7 +58,7 @@ test_writesame16_unmap_until_end(void)
logging(LOG_VERBOSE, "Unmap %d blocks using WRITESAME16", i);
memset(scratch, 0, block_size);
WRITESAME16(sd, num_blocks - i,
block_size, i, 0, 1, 0, 0, scratch,
block_size, 0, 0, 1, 0, 0, scratch,
EXPECT_STATUS_GOOD);
if (rc16->lbprz) {