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

Function zio_trim

freebsd/contrib/openzfs/module/zfs/zio.c:1338–1356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1336}
1337
1338zio_t *
1339zio_trim(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size,
1340 zio_done_func_t *done, void *private, zio_priority_t priority,
1341 enum zio_flag flags, enum trim_flag trim_flags)
1342{
1343 zio_t *zio;
1344
1345 ASSERT0(vd->vdev_children);
1346 ASSERT0(P2PHASE(offset, 1ULL << vd->vdev_ashift));
1347 ASSERT0(P2PHASE(size, 1ULL << vd->vdev_ashift));
1348 ASSERT3U(size, !=, 0);
1349
1350 zio = zio_create(pio, vd->vdev_spa, 0, NULL, NULL, size, size, done,
1351 private, ZIO_TYPE_TRIM, priority, flags | ZIO_FLAG_PHYSICAL,
1352 vd, offset, NULL, ZIO_STAGE_OPEN, ZIO_TRIM_PIPELINE);
1353 zio->io_trim_flags = trim_flags;
1354
1355 return (zio);
1356}
1357
1358zio_t *
1359zio_read_phys(zio_t *pio, vdev_t *vd, uint64_t offset, uint64_t size,

Callers 1

vdev_trim_rangeFunction · 0.85

Calls 1

zio_createFunction · 0.85

Tested by

no test coverage detected