Lines Matching refs:vd
40 vdev_file_hold(vdev_t *vd)
42 ASSERT(vd->vdev_path != NULL);
46 vdev_file_rele(vdev_t *vd)
48 ASSERT(vd->vdev_path != NULL);
52 vdev_file_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
63 if (vd->vdev_path == NULL || vd->vdev_path[0] != '/') {
64 vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL;
72 if (vd->vdev_tsd != NULL) {
73 ASSERT(vd->vdev_reopening);
74 vf = vd->vdev_tsd;
78 vf = vd->vdev_tsd = kmem_zalloc(sizeof (vdev_file_t), KM_SLEEP);
86 ASSERT(vd->vdev_path != NULL && vd->vdev_path[0] == '/');
87 error = vn_openat(vd->vdev_path + 1, UIO_SYSSPACE,
88 spa_mode(vd->vdev_spa) | FOFFMAX, 0, &vp, 0, 0, rootdir, -1);
91 vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED;
102 vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED;
114 vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED;
125 vdev_file_close(vdev_t *vd)
127 vdev_file_t *vf = vd->vdev_tsd;
129 if (vd->vdev_reopening || vf == NULL)
134 (void) VOP_CLOSE(vf->vf_vnode, spa_mode(vd->vdev_spa), 1, 0,
139 vd->vdev_delayed_close = B_FALSE;
141 vd->vdev_tsd = NULL;
188 vdev_t *vd = zio->io_vd;
189 vdev_file_t *vf = vd->vdev_tsd;
195 if (!vdev_readable(vd)) {