Lines Matching refs:parent
21 bdev_t *parent; member
34 return bio_read(subdev->parent, buf, offset + subdev->offset * subdev->dev.block_size, len); in subdev_read()
40 return bio_read_block(subdev->parent, buf, block + subdev->offset, count); in subdev_read_block()
46 return bio_write(subdev->parent, buf, offset + subdev->offset * subdev->dev.block_size, len); in subdev_write()
52 return bio_write_block(subdev->parent, buf, block + subdev->offset, count); in subdev_write_block()
58 return bio_erase(subdev->parent, offset + subdev->offset * subdev->dev.block_size, len); in subdev_erase()
64 bio_close(subdev->parent); in subdev_close()
65 subdev->parent = NULL; in subdev_close()
74 bdev_t *parent = NULL; in bio_publish_subdevice() local
82 parent = bio_open(parent_dev); in bio_publish_subdevice()
83 if (!parent) { in bio_publish_subdevice()
101 if (parent->geometry_count && parent->geometry) { in bio_publish_subdevice()
102 uint64_t byte_start = ((uint64_t)startblock << parent->block_shift); in bio_publish_subdevice()
103 uint64_t byte_size = ((uint64_t)block_count << parent->block_shift); in bio_publish_subdevice()
110 for (size_t i = 0; i < parent->geometry_count; ++i) { in bio_publish_subdevice()
111 geo = parent->geometry + i; in bio_publish_subdevice()
144 if ((endblock < startblock) || (endblock > parent->block_count)) in bio_publish_subdevice()
152 parent->block_size, block_count, in bio_publish_subdevice()
155 sub->parent = parent; in bio_publish_subdevice()
156 sub->dev.erase_byte = parent->erase_byte; in bio_publish_subdevice()
170 if (NULL != parent) in bio_publish_subdevice()
171 bio_close(parent); in bio_publish_subdevice()