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

Function vdev_raidz_row_free

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

Source from the content-addressed store, hash-verified

136}
137
138static void
139vdev_raidz_row_free(raidz_row_t *rr)
140{
141 int c;
142
143 for (c = 0; c < rr->rr_firstdatacol && c < rr->rr_cols; c++) {
144 abd_free(rr->rr_col[c].rc_abd);
145
146 if (rr->rr_col[c].rc_gdata != NULL) {
147 abd_free(rr->rr_col[c].rc_gdata);
148 }
149 if (rr->rr_col[c].rc_orig_data != NULL) {
150 zio_buf_free(rr->rr_col[c].rc_orig_data,
151 rr->rr_col[c].rc_size);
152 }
153 }
154 for (c = rr->rr_firstdatacol; c < rr->rr_cols; c++) {
155 if (rr->rr_col[c].rc_size != 0) {
156 if (abd_is_gang(rr->rr_col[c].rc_abd))
157 abd_free(rr->rr_col[c].rc_abd);
158 else
159 abd_put(rr->rr_col[c].rc_abd);
160 }
161 if (rr->rr_col[c].rc_orig_data != NULL) {
162 zio_buf_free(rr->rr_col[c].rc_orig_data,
163 rr->rr_col[c].rc_size);
164 }
165 }
166
167 if (rr->rr_abd_copy != NULL)
168 abd_free(rr->rr_abd_copy);
169
170 if (rr->rr_abd_empty != NULL)
171 abd_free(rr->rr_abd_empty);
172
173 kmem_free(rr, offsetof(raidz_row_t, rr_col[rr->rr_scols]));
174}
175
176void
177vdev_raidz_map_free(raidz_map_t *rm)

Callers 1

vdev_raidz_map_freeFunction · 0.85

Calls 5

abd_freeFunction · 0.85
zio_buf_freeFunction · 0.85
abd_is_gangFunction · 0.85
abd_putFunction · 0.85
kmem_freeFunction · 0.50

Tested by

no test coverage detected