MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cmp_data

Function cmp_data

freebsd/contrib/openzfs/cmd/raidz_test/raidz_test.c:229–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229static int
230cmp_data(raidz_test_opts_t *opts, raidz_map_t *rm)
231{
232 int r, i, dcols, ret = 0;
233
234 for (r = 0; r < rm->rm_nrows; r++) {
235 raidz_row_t *rr = rm->rm_row[r];
236 raidz_row_t *rrg = opts->rm_golden->rm_row[r];
237 dcols = opts->rm_golden->rm_row[0]->rr_cols -
238 raidz_parity(opts->rm_golden);
239 for (i = 0; i < dcols; i++) {
240 if (DATA_COL_SIZE(rrg, i) == 0) {
241 VERIFY0(DATA_COL_SIZE(rr, i));
242 continue;
243 }
244
245 if (abd_cmp(DATA_COL(rrg, i),
246 DATA_COL(rr, i)) != 0) {
247 ret++;
248
249 LOG_OPT(D_DEBUG, opts,
250 "\nData block [%d] different!\n", i);
251 }
252 }
253 }
254 return (ret);
255}
256
257static int
258init_rand(void *data, size_t size, void *private)

Callers 2

init_raidz_golden_mapFunction · 0.85
run_rec_check_implFunction · 0.85

Calls 1

abd_cmpFunction · 0.85

Tested by

no test coverage detected