[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [PATCH V4 8/9] target/pscsi: use helper in pscsi_get_blocks()
- To: linux-block@xxxxxxxxxxxxxxx
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Mon, 8 Jul 2019 11:47:10 -0700
- Cc: damien.lemoal@xxxxxxx, linux-btrace@xxxxxxxxxxxxxxx, bvanassche@xxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, konrad.wilk@xxxxxxxxxx, Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>, yuchao0@xxxxxxxxxx, colyli@xxxxxxx, linux-bcache@xxxxxxxxxxxxxxx, jaegeuk@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, kent.overstreet@xxxxxxxxx, roger.pau@xxxxxxxxxx
- Delivery-date: Mon, 08 Jul 2019 18:48:07 +0000
- Ironport-sdr: GjJURN+IAbSDrU/URckutHVGzUgZBYJmRMXBymDr43cGG+c1si/VH2U5Axt1VbHWNGI5XyWGRX RgpZzHx5+wqTTzKavNd+pU9USr/5b4E4LWWZ2heTIPv6wPpBZFpMfhedZ8He2mmQfgMsANG4Z5 nztPUspEaF259SARvRIcaPWSwxzPPikj6IDJlDQR5limexpWFR3Bed4+wYWS/Sbism39i1jmHW mj7Nlcfncb58ea7IvBmESvNZ0eE4R16+/SNeiJ67yxQzx40MxbJXQqHspJzndvtn6JuPDvyfcr nLA=
- Ironport-sdr: ai80TSm8aqVpjcyCOnf7Khn3zSC0gG4ONWuuU/ys1eLuBX9JB6KRTdDhorzSQLnnE4fMOCuM3O s4kwwHOtOUL5W+I/SRWGNrDWQpV/RQoSqY62xJsTYE2ckSFqBMwYDFInYCzI+IcM8WUbfTRgiw 7MokmE6vg1zcObZlfDIdkAmzoN8mFGb8IHUZFqtjLmRswg60E8j8p9ygjKwVAj/L9clUnvMKOk P57gnu64tqAqCxpdvQjmu6CGpKxvun5cYTqec8bc1+MbzCzJhEKXWfodWmaXo6gFAjLD5p18IT HXFbYfem0OlrS5WWftXgFxsB
- Ironport-sdr: IANeuyJ1+oRIdNc63u5j8ED18tDaGyZU+gvHhHZl87+2ajQm6m/jQpodcxPNu6UDb5asJbFKCF 6kz3QDjj06c+UBwngWRsx/wVxzGhe9RxGj9M6n8nOLjRppziguHG7Au4OsvD9KbRnMH5je9sId HZ4Az4HgCGj+Ik8pP5ZOAxIWgro9VZXW9hO0HsvtN/hE2ky3WsAJ8tq8rmu1xhjScNYGWeQANg CM/zAZ7im7Ix2Wx+pAYuDpo1aK5GRVnwAfHYBnzr+C01DF6NPe1R8G3EOZVTfz4MlWW3FOijlF U58=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
This patch updates the pscsi_get_blocks() with newly introduced helper
function to read the nr_sects from block device's hd_parts with the
help of part_nr_sects_read().
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
drivers/target/target_core_pscsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/target/target_core_pscsi.c
b/drivers/target/target_core_pscsi.c
index c9d92b3e777d..da481edab2de 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -1030,7 +1030,7 @@ static sector_t pscsi_get_blocks(struct se_device *dev)
struct pscsi_dev_virt *pdv = PSCSI_DEV(dev);
if (pdv->pdv_bd && pdv->pdv_bd->bd_part)
- return pdv->pdv_bd->bd_part->nr_sects;
+ return bdev_nr_sects(pdv->pdv_bd);
return 0;
}
--
2.17.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|