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

Function raidz_restore_orig_data

freebsd/contrib/openzfs/module/zfs/vdev_raidz.c:2037–2051  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2035}
2036
2037static void
2038raidz_restore_orig_data(raidz_map_t *rm)
2039{
2040 for (int i = 0; i < rm->rm_nrows; i++) {
2041 raidz_row_t *rr = rm->rm_row[i];
2042 for (int c = 0; c < rr->rr_cols; c++) {
2043 raidz_col_t *rc = &rr->rr_col[c];
2044 if (rc->rc_need_orig_restore) {
2045 abd_copy_from_buf(rc->rc_abd,
2046 rc->rc_orig_data, rc->rc_size);
2047 rc->rc_need_orig_restore = B_FALSE;
2048 }
2049 }
2050 }
2051}
2052
2053/*
2054 * returns EINVAL if reconstruction of the block will not be possible

Callers 1

raidz_reconstructFunction · 0.85

Calls 1

abd_copy_from_bufFunction · 0.85

Tested by

no test coverage detected