Re: [PATCH 4/6] scsi_debug: add translation functions between LBA and index of provisioning map

Martin K. Petersen
2013-04-25T01:43:03Z

>>>>> "Akinobu" == Akinobu Mita <akinobu.mita@gmail.com> writes:

Akinobu> The translation from LBA to index of provisioning map
Akinobu> (map_storep) is used in various places (map_state(),
Akinobu> map_region(), and unmap_region()). But it is not correctly
Akinobu> calculated if scsi_debug_unmap_alignment is zero.

Akinobu> This introduces correct translation functions between LBA and
Akinobu> index of provisioning map:

Akinobu> static unsigned long lba_to_map_index(sector_t lba);
Akinobu> static sector_t map_index_to_lba(unsigned long index);

Akinobu> Actual bug fixes with using these functions will be done by
Akinobu> forthcoming patches.

Acked-by: Martin K. Petersen <martin.petersen@oracle.com>

--
Martin K. Petersen Oracle Linux Engineering