/* Description: Returns last LBA value on success, 0 on error. This is stored (by sd and ide-geometry) in the part entry for this disk, and is the number of physical sectors available on the disk.  */
static u64 last_lba(struct block_device *bdev)
/* Description: Returns last LBA value on success, 0 on error. This is stored (by sd and ide-geometry) in the part entry for this disk, and is the number of physical sectors available on the disk.  */
static u64 last_lba(struct block_device *bdev)
{
	if (!bdev || !bdev->bd_inode)
		return 0;
	return div_u64(bdev->bd_inode->i_size,
		       bdev_logical_block_size(bdev)) - 1ULL;
}