mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 20:04:01 +00:00
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
db776d551f
commit
ee2108e6d7
1 changed files with 5 additions and 6 deletions
|
@ -39,6 +39,7 @@
|
|||
#define MAX_PARALLEL_QUERIES 33
|
||||
#define RANDOM_REQUEST_THREADS 4
|
||||
#define LUN_DEPTH_TEST_SIZE 9
|
||||
#define SECTOR_SIZE 512
|
||||
|
||||
/* the amount of requests that will be inserted */
|
||||
#define LONG_SEQ_TEST_NUM_REQS 256
|
||||
|
@ -941,11 +942,7 @@ static int run_long_test(struct test_data *td)
|
|||
direction = WRITE;
|
||||
}
|
||||
|
||||
/* NUM_OF_BLOCK * (BLOCK_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;
|
||||
seq_sector_delta = num_bios_per_request * (TEST_BIO_SIZE / SECTOR_SIZE);
|
||||
|
||||
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_WRITE:
|
||||
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;
|
||||
case UFS_TEST_LONG_RANDOM_READ:
|
||||
case UFS_TEST_LONG_RANDOM_WRITE:
|
||||
|
|
Loading…
Reference in a new issue