On 10/30/20 9:51 AM, Naohiro Aota wrote:
btrfs_rmap_block currently reverse-maps the physical addresses on all devices to the corresponding logical addresses. This commit extends the function to match to a specified device. The old functionality of querying all devices is left intact by specifying NULL as target device. We pass block_device instead of btrfs_device to __btrfs_rmap_block. This function is intended to reverse-map the result of bio, which only have block_device. This commit also exports the function for later use. Signed-off-by: Naohiro Aota <naohiro.aota@xxxxxxx>
Since there's only one caller of btrfs_rmap_block() in this file, and the rest are for tests, you might as well just make btrfs_rmap_block() exported with the device, and switch the existing callers to use NULL for the device. Thanks,
Josef