sys/dev/disk/dm/dm_pdev.c
off_t
dm_pdev_correct_dump_offset(dm_pdev_t *pdev, off_t offset)
{
	off_t noffset;

	noffset = pdev->pdev_pinfo.reserved_blocks +
	    pdev->pdev_pinfo.media_offset / pdev->pdev_pinfo.media_blksize;
	noffset *= DEV_BSIZE;
	noffset += offset;

	return noffset;
}
/*
 * Since dm can have arbitrary stacking on any number of disks and any dm
 * volume is at least stacked onto another disk, we need to adjust the
 * dumping offset (which is a raw offset from the beginning of the lowest
 * physical disk) taking into account the offset of the underlying device
 * which in turn takes into account the offset below it, etc.
 *
 * This function adjusts the dumping offset that is passed to the next
 * dev_ddump() so it is correct for that underlying device.
 */
Since dm can have arbitrary stacking on any number of disks and any dm
volume is at least stacked onto another disk, we need to adjust the
dumping offset (which is a raw offset from the beginning of the lowest
physical disk) taking into account the offset of the underlying device
which in turn takes into account the offset below it, etc.

This function adjusts the dumping offset that is passed to the next
dev_ddump() so it is correct for that underlying device.
Since dm can have arbitrary stacking on any number of disks and any dm volume is at least stacked onto another disk we need to adjust the dumping offset ( which is a raw offset from the beginning of the lowest physical disk ) taking into account the offset of the underlying device which in turn takes into account the offset below it etc . This function adjusts the dumping offset that is passed to the next dev_ddump () so it is correct for that underlying device .
off_t
dm_pdev_correct_dump_offset(dm_pdev_t *pdev, off_t offset)
{
	off_t noffset;
	noffset = pdev->pdev_pinfo.reserved_blocks +
	    pdev->pdev_pinfo.media_offset / pdev->pdev_pinfo.media_blksize;
	noffset *= DEV_BSIZE;
	noffset += offset;
	return noffset;
}
off_t dm_pdev_correct_dump_offset ( dm_pdev_t * pdev , off_t offset ) { off_t noffset ; noffset = pdev -> pdev_pinfo . reserved_blocks + pdev -> pdev_pinfo . media_offset / pdev -> pdev_pinfo . media_blksize ; noffset *= DEV_BSIZE ; noffset += offset ; return noffset ; }
Since dm can have arbitrary stacking on any number of disks and any dm
 volume is at least stacked onto another disk, we need to adjust the
 dumping offset (which is a raw offset from the beginning of the lowest
 physical disk) taking into account the offset of the underlying device
 which in turn takes into account the offset below it, etc.
Since dm can have arbitrary stacking on any number of disks and any dm volume is at least stacked onto another disk we need to adjust the dumping offset ( which is a raw offset from the beginning of the lowest physical disk ) taking into account the offset of the underlying device which in turn takes into account the offset below it etc .