Lines Matching refs:sc_parent
108 struct disk *sc_parent; /* $: parent disk */ member
230 struct disk *pdk = sc->sc_parent; in dkwedge_attach()
380 KASSERT(mutex_owned(&sc->sc_parent->dk_openlock)); in dkwedge_size_increase()
475 sc->sc_parent = pdk; in dkwedge_add()
671 strcmp(sc->sc_parent->dk_name, dkw->dkw_parent) == 0) { in dkwedge_find_acquire()
761 sc->sc_parent->dk_name, in dkwedge_detach()
764 mutex_enter(&sc->sc_parent->dk_openlock); in dkwedge_detach()
765 sc->sc_parent->dk_nwedges--; in dkwedge_detach()
767 mutex_exit(&sc->sc_parent->dk_openlock); in dkwedge_detach()
895 strlcpy(dkw.dkw_parent, sc->sc_parent->dk_name, in dkwedge_list()
958 if (strcmp(sc->sc_parent->dk_name, name) != 0) in dkwedge_find_by_parent_acquire()
1326 mutex_enter(&sc->sc_parent->dk_rawlock); in dkopen()
1354 out: mutex_exit(&sc->sc_parent->dk_rawlock); in dkopen()
1368 KASSERT(mutex_owned(&sc->sc_parent->dk_rawlock)); in dkfirstopen()
1370 if (sc->sc_parent->dk_rawopens == 0) { in dkfirstopen()
1371 KASSERT(sc->sc_parent->dk_rawvp == NULL); in dkfirstopen()
1385 sc->sc_parent->dk_rawvp = vp; in dkfirstopen()
1395 KASSERT(sc->sc_parent->dk_rawopens < UINT_MAX); in dkfirstopen()
1396 KASSERT(sc->sc_parent->dk_rawvp != NULL); in dkfirstopen()
1398 mutex_enter(&sc->sc_parent->dk_openlock); in dkfirstopen()
1399 LIST_FOREACH(nsc, &sc->sc_parent->dk_wedges, sc_plink) { in dkfirstopen()
1405 mutex_exit(&sc->sc_parent->dk_openlock); in dkfirstopen()
1408 sc->sc_parent->dk_rawopens++; in dkfirstopen()
1418 KASSERT(mutex_owned(&sc->sc_parent->dk_rawlock)); in dklastclose()
1419 KASSERT(sc->sc_parent->dk_rawopens > 0); in dklastclose()
1420 KASSERT(sc->sc_parent->dk_rawvp != NULL); in dklastclose()
1422 if (--sc->sc_parent->dk_rawopens == 0) { in dklastclose()
1423 struct vnode *const vp = sc->sc_parent->dk_rawvp; in dklastclose()
1426 sc->sc_parent->dk_rawvp = NULL; in dklastclose()
1455 mutex_enter(&sc->sc_parent->dk_rawlock); in dkclose()
1470 mutex_exit(&sc->sc_parent->dk_rawlock); in dkclose()
1519 KASSERT(sc->sc_parent->dk_rawvp != NULL); in dkstrategy()
1525 p_offset = sc->sc_offset << sc->sc_parent->dk_blkshift; in dkstrategy()
1526 p_size = dkwedge_size(sc) << sc->sc_parent->dk_blkshift; in dkstrategy()
1576 nbp = getiobuf(sc->sc_parent->dk_rawvp, false); in dkstart()
1615 nbp->b_dev = sc->sc_parent->dk_rawvp->v_rdev; in dkstart()
1694 if (sc->sc_parent->dk_driver && sc->sc_parent->dk_driver->d_minphys) in dkminphys()
1695 (*sc->sc_parent->dk_driver->d_minphys)(bp); in dkminphys()
1752 KASSERT(sc->sc_parent->dk_rawvp != NULL); in dkioctl()
1768 error = VOP_IOCTL(sc->sc_parent->dk_rawvp, cmd, data, flag, in dkioctl()
1778 strlcpy(dkw->dkw_parent, sc->sc_parent->dk_name, in dkioctl()
1790 error = VOP_IOCTL(sc->sc_parent->dk_rawvp, cmd, dsa, flag, in dkioctl()
1828 KASSERT(sc->sc_parent->dk_rawvp != NULL); in dkdiscard()
1831 shift = (sc->sc_parent->dk_blkshift + DEV_BSHIFT); in dkdiscard()
1847 vn_lock(sc->sc_parent->dk_rawvp, LK_EXCLUSIVE | LK_RETRY); in dkdiscard()
1848 error = VOP_FDISCARD(sc->sc_parent->dk_rawvp, pos, len); in dkdiscard()
1849 VOP_UNLOCK(sc->sc_parent->dk_rawvp); in dkdiscard()
1879 p_size = dkwedge_size(sc) << sc->sc_parent->dk_blkshift; in dksize()
1921 p_offset = sc->sc_offset << sc->sc_parent->dk_blkshift; in dkdump()
1922 p_size = dkwedge_size(sc) << sc->sc_parent->dk_blkshift; in dkdump()
1957 if (strcmp(sc->sc_parent->dk_name, device_xname(parent)) == 0 && in dkwedge_find_partition_acquire()
2003 const char *const name = sc->sc_parent->dk_name; in dkwedge_get_parent_name()