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

Function vdev_disk_close

freebsd/contrib/openzfs/module/os/linux/zfs/vdev_disk.c:332–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332static void
333vdev_disk_close(vdev_t *v)
334{
335 vdev_disk_t *vd = v->vdev_tsd;
336
337 if (v->vdev_reopening || vd == NULL)
338 return;
339
340 if (vd->vd_bdev != NULL) {
341 blkdev_put(vd->vd_bdev,
342 vdev_bdev_mode(spa_mode(v->vdev_spa)) | FMODE_EXCL);
343 }
344
345 rw_destroy(&vd->vd_lock);
346 kmem_free(vd, sizeof (vdev_disk_t));
347 v->vdev_tsd = NULL;
348}
349
350static dio_request_t *
351vdev_disk_dio_alloc(int bio_count)

Callers

nothing calls this directly

Calls 4

vdev_bdev_modeFunction · 0.85
rw_destroyFunction · 0.85
spa_modeFunction · 0.50
kmem_freeFunction · 0.50

Tested by

no test coverage detected