scsi: ufs: fix sector increment in ufs_long_seq_test
Currently, request sector is incremented in the long sequential test using a calculation which assumes the device logical block size is 512B (equal to sector size) but this is not the case. This patch changes the calculation to be correct, using the test bio size, and assuming sector size is 512B. Change-Id: I807be243b65834edf9201488a849777e43bb658a Signed-off-by: Lee Susman <lsusman@codeaurora.org> Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
This commit is contained in:
parent
d4cf62968e
commit
6c27c43e7c
1 changed files with 5 additions and 6 deletions
|
@ -39,6 +39,7 @@
|
||||||
#define MAX_PARALLEL_QUERIES 33
|
#define MAX_PARALLEL_QUERIES 33
|
||||||
#define RANDOM_REQUEST_THREADS 4
|
#define RANDOM_REQUEST_THREADS 4
|
||||||
#define LUN_DEPTH_TEST_SIZE 9
|
#define LUN_DEPTH_TEST_SIZE 9
|
||||||
|
#define SECTOR_SIZE 512
|
||||||
|
|
||||||
/* the amount of requests that will be inserted */
|
/* the amount of requests that will be inserted */
|
||||||
#define LONG_SEQ_TEST_NUM_REQS 256
|
#define LONG_SEQ_TEST_NUM_REQS 256
|
||||||
|
@ -941,11 +942,7 @@ static int run_long_test(struct test_data *td)
|
||||||
direction = WRITE;
|
direction = WRITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NUM_OF_BLOCK * (BLOCK_SIZE / SECTOR_SIZE) */
|
seq_sector_delta = num_bios_per_request * (TEST_BIO_SIZE / SECTOR_SIZE);
|
||||||
seq_sector_delta = num_bios_per_request * (PAGE_SIZE /
|
|
||||||
td->req_q->limits.logical_block_size);
|
|
||||||
/* just for the first iteration */
|
|
||||||
sector -= seq_sector_delta;
|
|
||||||
|
|
||||||
seed = utd->random_test_seed ? utd->random_test_seed : MAGIC_SEED;
|
seed = utd->random_test_seed ? utd->random_test_seed : MAGIC_SEED;
|
||||||
|
|
||||||
|
@ -969,7 +966,9 @@ static int run_long_test(struct test_data *td)
|
||||||
case UFS_TEST_LONG_SEQUENTIAL_READ:
|
case UFS_TEST_LONG_SEQUENTIAL_READ:
|
||||||
case UFS_TEST_LONG_SEQUENTIAL_WRITE:
|
case UFS_TEST_LONG_SEQUENTIAL_WRITE:
|
||||||
case UFS_TEST_LONG_SEQUENTIAL_MIXED:
|
case UFS_TEST_LONG_SEQUENTIAL_MIXED:
|
||||||
sector += seq_sector_delta;
|
/* don't need to increment on the first iteration */
|
||||||
|
if (inserted_requests)
|
||||||
|
sector += seq_sector_delta;
|
||||||
break;
|
break;
|
||||||
case UFS_TEST_LONG_RANDOM_READ:
|
case UFS_TEST_LONG_RANDOM_READ:
|
||||||
case UFS_TEST_LONG_RANDOM_WRITE:
|
case UFS_TEST_LONG_RANDOM_WRITE:
|
||||||
|
|
Loading…
Add table
Reference in a new issue