From f48c0c3cd0bc8e572b779e69c203159e9dd061ae Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sat, 21 Mar 2015 17:16:16 +0100 Subject: [PATCH] Rename raid_rec_dataonly() to raid_data() --- cmdline/check.c | 4 ++-- raid/module.c | 12 ++++++------ raid/raid.c | 2 +- raid/raid.h | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmdline/check.c b/cmdline/check.c index 4f9a9006..95d080a4 100644 --- a/cmdline/check.c +++ b/cmdline/check.c @@ -216,7 +216,7 @@ static int repair_step(struct snapraid_state* state, int rehash, unsigned pos, u memcpy(buffer[diskmax + ip[i]], buffer_recov[ip[i]], state->block_size); /* recover using one less parity, the ip[r-1] one */ - raid_rec_dataonly(r - 1, id, ip, diskmax, state->block_size, buffer); + raid_data(r - 1, id, ip, diskmax, state->block_size, buffer); /* use the remaining ip[r-1] parity to check the result */ if (is_parity_matching(state, diskmax, ip[r - 1], buffer, buffer_recov)) @@ -256,7 +256,7 @@ static int repair_step(struct snapraid_state* state, int rehash, unsigned pos, u memcpy(buffer[diskmax + ip[i]], buffer_recov[ip[i]], state->block_size); /* recover */ - raid_rec_dataonly(r, id, ip, diskmax, state->block_size, buffer); + raid_data(r, id, ip, diskmax, state->block_size, buffer); /* use the hash to check the result */ if (is_hash_matching(state, rehash, diskmax, failed, failed_map, failed_count, buffer, buffer_zero)) diff --git a/raid/module.c b/raid/module.c index e03c783f..e23d9617 100644 --- a/raid/module.c +++ b/raid/module.c @@ -212,9 +212,9 @@ static int raid_test_rec(int nr, int *ir, int nd, int np, size_t size, void **v, } /* - * Recovering test for dataonly. + * Recovering test for data. */ -static int raid_test_rec_dataonly(int nr, int *id, int *ip, int nd, int np, size_t size, void **v, void **ref) +static int raid_test_data(int nr, int *id, int *ip, int nd, int np, size_t size, void **v, void **ref) { int i, j; void *t[TEST_COUNT + RAID_PARITY_MAX]; @@ -243,7 +243,7 @@ static int raid_test_rec_dataonly(int nr, int *id, int *ip, int nd, int np, size } } - raid_rec_dataonly(nr, id, ip, nd, size, t); + raid_data(nr, id, ip, nd, size, t); /* compare all data and parity */ for (i = 0; i < nd; ++i) { @@ -368,7 +368,7 @@ int raid_selftest(void) /* LCOV_EXCL_STOP */ } - ret = raid_test_rec_dataonly(np, ir, ip, nd, np, size, v, ref); + ret = raid_test_data(np, ir, ip, nd, np, size, v, ref); if (ret != 0) { /* LCOV_EXCL_START */ goto bail; @@ -395,7 +395,7 @@ int raid_selftest(void) /* LCOV_EXCL_STOP */ } - ret = raid_test_rec_dataonly(np / 2, ir, ip, nd, np, size, v, ref); + ret = raid_test_data(np / 2, ir, ip, nd, np, size, v, ref); if (ret != 0) { /* LCOV_EXCL_START */ goto bail; @@ -422,7 +422,7 @@ int raid_selftest(void) /* LCOV_EXCL_STOP */ } - ret = raid_test_rec_dataonly(np / 2, ir, ip, nd, np, size, v, ref); + ret = raid_test_data(np / 2, ir, ip, nd, np, size, v, ref); if (ret != 0) { /* LCOV_EXCL_START */ goto bail; diff --git a/raid/raid.c b/raid/raid.c index df9b6168..9ecf703a 100644 --- a/raid/raid.c +++ b/raid/raid.c @@ -545,7 +545,7 @@ void raid_rec(int nr, int *ir, int nd, int np, size_t size, void **v) raid_gen(nd, ir[nr - 1] - nd + 1, size, v); } -void raid_rec_dataonly(int nr, int *id, int *ip, int nd, size_t size, void **v) +void raid_data(int nr, int *id, int *ip, int nd, size_t size, void **v) { BUG_ON(nr > nd); BUG_ON(size % 64 != 0); diff --git a/raid/raid.h b/raid/raid.h index dede4567..aeeb39f3 100644 --- a/raid/raid.h +++ b/raid/raid.h @@ -67,7 +67,7 @@ int raid_selftest(void); * Sets the mode to use. One of RAID_MODE_*. * * You can change mode at any time, and it will affect next calls to raid_gen(), - * raid_rec() and raid_rec_dataonly(). + * raid_rec() and raid_data(). * * The two modes are compatible for the first two levels of parity. * The third one is different. @@ -77,7 +77,7 @@ void raid_mode(int mode); /** * Sets the zero buffer to use in recovering. * - * Before calling raid_rec() and raid_rec_dataonly() you must provide a memory + * Before calling raid_rec() and raid_data() you must provide a memory * buffer filled with zero with the same size of the blocks to recover. * * This buffer is only read and never written. @@ -156,7 +156,7 @@ void raid_rec(int nr, int *ir, int nd, int np, size_t size, void **v); * blocks for data, following with the parity blocks. * Each blocks has @size bytes. */ -void raid_rec_dataonly(int nr, int *id, int *ip, int nd, size_t size, void **v); +void raid_data(int nr, int *id, int *ip, int nd, size_t size, void **v); /** * Check the provided failed blocks combination.