Assume starting one disk write action, the vdev_disk_io_start will be called from zio_execute.
static int vdev_disk_io_start(zio_t *zio) { ...... bp->b_lblkno = lbtodb(zio->io_offset); ...... } After scaning over the zfs source, I find the zio->io_offset is only set value in zio_create by the parameter offset. zio_write calls zio_create with the value 0 for the parameter offset. I can't find anywhere else the zio->io_offset being set. After the new block born, the correct offset has been filled in bp->blk_dva (see metaslab_alloc), when and where the correct value set to zio->io_offset? Who can tell me? thanks -- This message posted from opensolaris.org _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss