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

Function dump_path

freebsd/contrib/openzfs/cmd/zdb/zdb.c:4560–4585  ·  view source on GitHub ↗

* Dump the blocks for the object specified by path inside the dataset. */

Source from the content-addressed store, hash-verified

4558 * Dump the blocks for the object specified by path inside the dataset.
4559 */
4560static int
4561dump_path(char *ds, char *path)
4562{
4563 int err;
4564 objset_t *os;
4565 uint64_t root_obj;
4566
4567 err = open_objset(ds, FTAG, &os);
4568 if (err != 0)
4569 return (err);
4570
4571 err = zap_lookup(os, MASTER_NODE_OBJ, ZFS_ROOT_OBJ, 8, 1, &root_obj);
4572 if (err != 0) {
4573 (void) fprintf(stderr, "can't lookup root znode: %s\n",
4574 strerror(err));
4575 close_objset(os, FTAG);
4576 return (EINVAL);
4577 }
4578
4579 (void) snprintf(curpath, sizeof (curpath), "dataset=%s path=/", ds);
4580
4581 err = dump_path_impl(os, root_obj, path);
4582
4583 close_objset(os, FTAG);
4584 return (err);
4585}
4586
4587static int
4588dump_label(const char *dev)

Callers 1

mainFunction · 0.85

Calls 5

open_objsetFunction · 0.85
zap_lookupFunction · 0.85
close_objsetFunction · 0.85
snprintfFunction · 0.85
dump_path_implFunction · 0.85

Tested by

no test coverage detected