Lines Matching full:zb

133 static void read_by_block_level(dsl_scan_t *scn, zbookmark_phys_t zb);
360 const zbookmark_phys_t *zb, dsl_scan_io_queue_t *queue);
1630 dsl_scan_check_suspend(dsl_scan_t *scn, const zbookmark_phys_t *zb) in dsl_scan_check_suspend() argument
1633 if (zb && (int64_t)zb->zb_object < 0) in dsl_scan_check_suspend()
1643 if (zb && (zb->zb_level != 0 && zb->zb_level != ZB_ROOT_LEVEL)) in dsl_scan_check_suspend()
1676 if (zb && zb->zb_level == ZB_ROOT_LEVEL) { in dsl_scan_check_suspend()
1679 (longlong_t)zb->zb_objset, in dsl_scan_check_suspend()
1680 (longlong_t)zb->zb_object, in dsl_scan_check_suspend()
1681 (longlong_t)zb->zb_level, in dsl_scan_check_suspend()
1682 (longlong_t)zb->zb_blkid); in dsl_scan_check_suspend()
1684 zb->zb_objset, 0, 0, 0); in dsl_scan_check_suspend()
1685 } else if (zb != NULL) { in dsl_scan_check_suspend()
1687 (longlong_t)zb->zb_objset, in dsl_scan_check_suspend()
1688 (longlong_t)zb->zb_object, in dsl_scan_check_suspend()
1689 (longlong_t)zb->zb_level, in dsl_scan_check_suspend()
1690 (longlong_t)zb->zb_blkid); in dsl_scan_check_suspend()
1691 scn->scn_phys.scn_bookmark = *zb; in dsl_scan_check_suspend()
1710 dsl_error_scrub_check_suspend(dsl_scan_t *scn, const zbookmark_phys_t *zb) in dsl_error_scrub_check_suspend() argument
1732 if (zb) { in dsl_error_scrub_check_suspend()
1735 (longlong_t)zb->zb_objset, in dsl_error_scrub_check_suspend()
1736 (longlong_t)zb->zb_object, in dsl_error_scrub_check_suspend()
1737 (longlong_t)zb->zb_level, in dsl_error_scrub_check_suspend()
1738 (longlong_t)zb->zb_blkid); in dsl_error_scrub_check_suspend()
1759 zbookmark_phys_t zb; in dsl_scan_zil_block() local
1776 SET_BOOKMARK(&zb, zh->zh_log.blk_cksum.zc_word[ZIL_ZC_OBJSET], in dsl_scan_zil_block()
1779 VERIFY(0 == scan_funcs[scn->scn_phys.scn_func](dp, bp, &zb)); in dsl_scan_zil_block()
1795 zbookmark_phys_t zb; in dsl_scan_zil_record() local
1811 SET_BOOKMARK(&zb, zh->zh_log.blk_cksum.zc_word[ZIL_ZC_OBJSET], in dsl_scan_zil_record()
1815 VERIFY(0 == scan_funcs[scn->scn_phys.scn_func](dp, bp, &zb)); in dsl_scan_zil_record()
1915 const zbookmark_phys_t *zb) in dsl_scan_check_prefetch_resume() argument
1921 if (zb->zb_objset != last_zb->zb_objset) in dsl_scan_check_prefetch_resume()
1923 if ((int64_t)zb->zb_object < 0) in dsl_scan_check_prefetch_resume()
1929 if (zbookmark_subtree_completed(dnp, zb, last_zb)) in dsl_scan_check_prefetch_resume()
1936 dsl_scan_prefetch(scan_prefetch_ctx_t *spc, blkptr_t *bp, zbookmark_phys_t *zb) in dsl_scan_prefetch() argument
1952 if (dsl_scan_check_prefetch_resume(spc, zb)) in dsl_scan_prefetch()
1959 spic->spic_zb = *zb; in dsl_scan_prefetch()
1985 zbookmark_phys_t zb; in dsl_scan_prefetch_dnode() local
1991 SET_BOOKMARK(&zb, objset, object, 0, 0); in dsl_scan_prefetch_dnode()
1996 zb.zb_level = BP_GET_LEVEL(&dnp->dn_blkptr[i]); in dsl_scan_prefetch_dnode()
1997 zb.zb_blkid = i; in dsl_scan_prefetch_dnode()
1998 dsl_scan_prefetch(spc, &dnp->dn_blkptr[i], &zb); in dsl_scan_prefetch_dnode()
2002 zb.zb_level = 0; in dsl_scan_prefetch_dnode()
2003 zb.zb_blkid = DMU_SPILL_BLKID; in dsl_scan_prefetch_dnode()
2004 dsl_scan_prefetch(spc, DN_SPILL_BLKPTR(dnp), &zb); in dsl_scan_prefetch_dnode()
2011 dsl_scan_prefetch_cb(zio_t *zio, const zbookmark_phys_t *zb, const blkptr_t *bp, in dsl_scan_prefetch_cb() argument
2037 SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, in dsl_scan_prefetch_cb()
2038 zb->zb_level - 1, zb->zb_blkid * epb + i); in dsl_scan_prefetch_cb()
2050 zb->zb_objset, zb->zb_blkid * epb + i); in dsl_scan_prefetch_cb()
2056 zb->zb_objset, DMU_META_DNODE_OBJECT); in dsl_scan_prefetch_cb()
2061 &osp->os_projectused_dnode, zb->zb_objset, in dsl_scan_prefetch_cb()
2065 &osp->os_groupused_dnode, zb->zb_objset, in dsl_scan_prefetch_cb()
2068 &osp->os_userused_dnode, zb->zb_objset, in dsl_scan_prefetch_cb()
2153 const zbookmark_phys_t *zb) in dsl_scan_check_resume() argument
2159 (int64_t)zb->zb_object >= 0) { in dsl_scan_check_resume()
2164 if (zbookmark_subtree_completed(dnp, zb, in dsl_scan_check_resume()
2173 if (zbookmark_subtree_tbd(dnp, zb, in dsl_scan_check_resume()
2176 (longlong_t)zb->zb_objset, in dsl_scan_check_resume()
2177 (longlong_t)zb->zb_object, in dsl_scan_check_resume()
2178 (longlong_t)zb->zb_level, in dsl_scan_check_resume()
2179 (longlong_t)zb->zb_blkid); in dsl_scan_check_resume()
2180 memset(&scn->scn_phys.scn_bookmark, 0, sizeof (*zb)); in dsl_scan_check_resume()
2186 static void dsl_scan_visitbp(const blkptr_t *bp, const zbookmark_phys_t *zb,
2200 const zbookmark_phys_t *zb, dmu_tx_t *tx) in dsl_scan_recurse() argument
2218 spa_log_error(spa, zb, BP_GET_LOGICAL_BIRTH(bp)); in dsl_scan_recurse()
2230 ZIO_PRIORITY_SCRUB, zio_flags, &flags, zb); in dsl_scan_recurse()
2238 SET_BOOKMARK(&czb, zb->zb_objset, zb->zb_object, in dsl_scan_recurse()
2239 zb->zb_level - 1, in dsl_scan_recurse()
2240 zb->zb_blkid * epb + i); in dsl_scan_recurse()
2258 ZIO_PRIORITY_SCRUB, zio_flags, &flags, zb); in dsl_scan_recurse()
2267 cdnp, zb->zb_blkid * epb + i, tx); in dsl_scan_recurse()
2277 ZIO_PRIORITY_SCRUB, zio_flags, &flags, zb); in dsl_scan_recurse()
2314 spa_log_error(spa, zb, BP_GET_LOGICAL_BIRTH(bp)); in dsl_scan_recurse()
2351 dsl_scan_visitbp(const blkptr_t *bp, const zbookmark_phys_t *zb, in dsl_scan_visitbp() argument
2357 if (dsl_scan_check_suspend(scn, zb)) in dsl_scan_visitbp()
2360 if (dsl_scan_check_resume(scn, dnp, zb)) in dsl_scan_visitbp()
2396 if (dsl_scan_recurse(scn, ds, ostype, dnp, bp, zb, tx) != 0) in dsl_scan_visitbp()
2422 scan_funcs[scn->scn_phys.scn_func](dp, bp, zb); in dsl_scan_visitbp()
2429 zbookmark_phys_t zb; in dsl_scan_visit_rootbp() local
2432 SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET, in dsl_scan_visit_rootbp()
2437 zb.zb_objset, 0, 0, 0); in dsl_scan_visit_rootbp()
2445 dsl_scan_prefetch(spc, bp, &zb); in dsl_scan_visit_rootbp()
2448 dsl_scan_visitbp(bp, &zb, NULL, ds, scn, DMU_OST_NONE, tx); in dsl_scan_visit_rootbp()
2974 zbookmark_phys_t zb = { 0 }; in dsl_scan_ddt_entry() local
3002 scan_funcs[scn->scn_phys.scn_func](scn->scn_dp, &bp, &zb); in dsl_scan_ddt_entry()
3927 name_to_bookmark(char *buf, zbookmark_phys_t *zb) in name_to_bookmark() argument
3929 zb->zb_objset = zfs_strtonum(buf, &buf); in name_to_bookmark()
3931 zb->zb_object = zfs_strtonum(buf + 1, &buf); in name_to_bookmark()
3933 zb->zb_level = (int)zfs_strtonum(buf + 1, &buf); in name_to_bookmark()
3935 zb->zb_blkid = zfs_strtonum(buf + 1, &buf); in name_to_bookmark()
3947 read_by_block_level(dsl_scan_t *scn, zbookmark_phys_t zb) in read_by_block_level() argument
3952 if (dsl_dataset_hold_obj(dp, zb.zb_objset, FTAG, &ds) != 0) in read_by_block_level()
3978 if (dnode_hold(os, zb.zb_object, FTAG, &dn) != 0) { in read_by_block_level()
3984 int error = dbuf_dnode_findbp(dn, zb.zb_level, zb.zb_blkid, &bp, NULL, in read_by_block_level()
4005 if (zb.zb_level == ZB_ZIL_LEVEL) in read_by_block_level()
4009 scan_exec_io(dp, &bp, zio_flags, &zb, NULL); in read_by_block_level()
4046 zbookmark_phys_t zb; in scrub_filesystem() local
4047 zep_to_zb(fs, zep, &zb); in scrub_filesystem()
4051 read_by_block_level(scn, zb); in scrub_filesystem()
4060 dsl_error_scrub_check_suspend(scn, &zb)) { in scrub_filesystem()
4126 zbookmark_phys_t zb; in scrub_filesystem() local
4127 zep_to_zb(snap_obj, zep, &zb); in scrub_filesystem()
4131 read_by_block_level(scn, zb); in scrub_filesystem()
4140 dsl_error_scrub_check_suspend(scn, &zb)) { in scrub_filesystem()
4206 zbookmark_phys_t *zb; in dsl_errorscrub_sync() local
4210 zb = kmem_zalloc(sizeof (zbookmark_phys_t), KM_SLEEP); in dsl_errorscrub_sync()
4215 name_to_bookmark(za->za_name, zb); in dsl_errorscrub_sync()
4220 read_by_block_level(scn, *zb); in dsl_errorscrub_sync()
4230 dsl_error_scrub_check_suspend(scn, zb)) { in dsl_errorscrub_sync()
4241 kmem_free(zb, sizeof (*zb)); in dsl_errorscrub_sync()
4300 kmem_free(zb, sizeof (*zb)); in dsl_errorscrub_sync()
4678 zfs_blkstat_t *zb = &zab->zab_type[l][t]; in count_block() local
4681 zb->zb_count++; in count_block()
4682 zb->zb_asize += BP_GET_ASIZE(bp); in count_block()
4683 zb->zb_lsize += BP_GET_LSIZE(bp); in count_block()
4684 zb->zb_psize += BP_GET_PSIZE(bp); in count_block()
4685 zb->zb_gangs += BP_COUNT_GANG(bp); in count_block()
4691 zb->zb_ditto_2_of_2_samevdev++; in count_block()
4701 zb->zb_ditto_2_of_3_samevdev++; in count_block()
4703 zb->zb_ditto_3_of_3_samevdev++; in count_block()
4738 int zio_flags, const zbookmark_phys_t *zb) in scan_io_queue_insert() argument
4747 sio->sio_zb = *zb; in scan_io_queue_insert()
4760 const zbookmark_phys_t *zb) in dsl_scan_enqueue() argument
4771 scan_exec_io(dp, bp, zio_flags, zb, NULL); in dsl_scan_enqueue()
4788 i, zio_flags, zb); in dsl_scan_enqueue()
4795 const blkptr_t *bp, const zbookmark_phys_t *zb) in dsl_scan_scrub_cb() argument
4825 if (zb->zb_level == ZB_ZIL_LEVEL) in dsl_scan_scrub_cb()
4846 dsl_scan_enqueue(dp, bp, zio_flags, zb); in dsl_scan_scrub_cb()
4900 const zbookmark_phys_t *zb, dsl_scan_io_queue_t *queue) in scan_exec_io() argument
4931 queue, ZIO_PRIORITY_SCRUB, zio_flags, zb)); in scan_exec_io()