summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Susman <lsusman@codeaurora.org>2014-01-29 18:29:29 +0200
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:01:50 -0700
commitfcb6ce06334dabd07f5c7a69b9f11e8adf709978 (patch)
tree045c6d344146487551257ced38f03a8eab2741e4
parent819ba4dd1961541e3b13a14df20895c327bd847d (diff)
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>
-rw-r--r--block/test-iosched.c4
-rw-r--r--include/linux/test-iosched.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/block/test-iosched.c b/block/test-iosched.c
index a267e7a31152..9341bc163e95 100644
--- a/block/test-iosched.c
+++ b/block/test-iosched.c
@@ -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
@@ -311,7 +311,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__);
diff --git a/include/linux/test-iosched.h b/include/linux/test-iosched.h
index 36facf7e4053..47383ae0675c 100644
--- a/include/linux/test-iosched.h
+++ b/include/linux/test-iosched.h
@@ -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;