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

Function ddt_walk

freebsd/contrib/openzfs/module/zfs/ddt.c:1154–1182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1152}
1153
1154int
1155ddt_walk(spa_t *spa, ddt_bookmark_t *ddb, ddt_entry_t *dde)
1156{
1157 do {
1158 do {
1159 do {
1160 ddt_t *ddt = spa->spa_ddt[ddb->ddb_checksum];
1161 int error = ENOENT;
1162 if (ddt_object_exists(ddt, ddb->ddb_type,
1163 ddb->ddb_class)) {
1164 error = ddt_object_walk(ddt,
1165 ddb->ddb_type, ddb->ddb_class,
1166 &ddb->ddb_cursor, dde);
1167 }
1168 dde->dde_type = ddb->ddb_type;
1169 dde->dde_class = ddb->ddb_class;
1170 if (error == 0)
1171 return (0);
1172 if (error != ENOENT)
1173 return (error);
1174 ddb->ddb_cursor = 0;
1175 } while (++ddb->ddb_checksum < ZIO_CHECKSUM_FUNCTIONS);
1176 ddb->ddb_checksum = 0;
1177 } while (++ddb->ddb_type < DDT_TYPES);
1178 ddb->ddb_type = 0;
1179 } while (++ddb->ddb_class < DDT_CLASSES);
1180
1181 return (SET_ERROR(ENOENT));
1182}
1183
1184/* BEGIN CSTYLED */
1185ZFS_MODULE_PARAM(zfs_dedup, zfs_dedup_, prefetch, INT, ZMOD_RW,

Callers 2

dsl_scan_ddtFunction · 0.85
zdb_ddt_leak_initFunction · 0.85

Calls 2

ddt_object_existsFunction · 0.85
ddt_object_walkFunction · 0.85

Tested by

no test coverage detected