提交 3ec39abd 编写于 作者: A Akinobu Mita 提交者: Linus Torvalds

raid6test: use prandom_bytes()

Use prandom_bytes() to generate random bytes for test data.
Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
Cc: Dan Williams <djbw@fb.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 713e00a3
......@@ -46,15 +46,10 @@ static void callback(void *param)
static void makedata(int disks)
{
int i, j;
int i;
for (i = 0; i < disks; i++) {
for (j = 0; j < PAGE_SIZE/sizeof(u32); j += sizeof(u32)) {
u32 *p = page_address(data[i]) + j;
*p = random32();
}
prandom_bytes(page_address(data[i]), PAGE_SIZE);
dataptrs[i] = data[i];
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册