Rename raid_rec_dataonly() to raid_data()

This commit is contained in:
Andrea Mazzoleni 2015-03-21 17:16:16 +01:00
parent 7bdee2c1d9
commit f48c0c3cd0
4 changed files with 12 additions and 12 deletions

View file

@ -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))

View file

@ -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;

View file

@ -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);

View file

@ -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.