block: add test bio size define to test-iosched

Add a define for the test bio size (which is the size of a page),
this is used for allocating the right sized buffer for the bio during
test request creation.

Change-Id: I9505c85c4352009bdee442172eb8ae8f4254cfb0
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
This commit is contained in:
Lee Susman 2014-01-29 18:29:29 +02:00
parent 94c52e4c05
commit db776d551f
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -315,7 +315,7 @@ struct test_request *test_iosched_create_test_req(int is_err_expcted,
return NULL;
}
buf_size = sizeof(unsigned int) * BIO_U32_SIZE * num_bios;
buf_size = TEST_BIO_SIZE * num_bios;
test_rq->bios_buffer = kzalloc(buf_size, GFP_KERNEL);
if (!test_rq->bios_buffer) {
pr_err("%s: Failed to allocate the data buf", __func__);

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -28,6 +28,7 @@
#define TEST_PATTERN_FF 0xFFFFFFFF
#define TEST_NO_PATTERN 0xDEADBEEF
#define BIO_U32_SIZE 1024
#define TEST_BIO_SIZE PAGE_SIZE /* use one page bios */
struct test_data;