[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [COMPILE TESTED PATCH V5 8/9] target/pscsi: use helper in pscsi_get_blocks()
- To: linux-block@xxxxxxxxxxxxxxx
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Tue, 20 Aug 2019 23:14:22 -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: Wed, 21 Aug 2019 06:15:22 +0000
- Ironport-sdr: ESuskfTbwZvU/ioZ4wD03fqJkd53Nvi+fcpFUfou1Ibdl8h9F+k0HeUy4+6nk3p/6XLxgTtbzy VLaCDOm4OgjbJ45Zs4scVJPXebObXDYhlT4Uov11KmZ4qg5J8MTprnjalLPiksTZ4Uvtzjzusm Fv8Au7lG3mSBzWHTfc6DUJzzRrnO8kiAqeMJoggvqLK3w2QnkDu71hPDWC8xGLWL1sp4tCbITI MgV/7uy8F17XcFX5XqbEVQNLY+OBZlDi6lYdS0mGAvoG1tRekUjtjWyXLqu0tbM9VpLguzHpoc XAI=
- Ironport-sdr: L182bfiB4orBuGOY1RLDtsfrLuQy+fuRgRsvKWyzbi/Wk9tNCtkJEN+VCkNtBxR9v1+cNCvo7g JMNNT3bKVBz6esG51NWChzGOA96fhW2botYV0XSHiZW3TMCf++qleBVay2bLrJkcjv/KcYa2nC /yu9TriDM6tsec0fS+g5xnkSfYNkQOzIx82Nd+89G38wQkDMHbVDtIw1RnlZBGaNmBvsW40AP9 294JpDud7s7araDwTzAaBoTgQl89wpV/E2tfA9kpXSjCmGItXZgAxZ2w+dKMXTKqX4heY/p3we P6hpdkAsRk+56QkfnFBpFIPz
- Ironport-sdr: 1yyzw1PKyEPWh8uB2oJ4KRZ7o5fJYOCS3TLjOfJjglT/lGWvLyF7NmCbICpqjeV9uwoFw7sBmV nJoZ8sJ5Wdusbzi2NM2t1/6bvQvetVzJBResAGi6iRHNn8y3zCfRh7I9MBJXBsny6rNr83aMIx uqewzTGkqWRbDAG1nxzDKivWsjDb/QHL9tkpqMGfM2elRtbSBA3gZ1zdEE2ldZAXE6deT1xBWI U7VASCa1lSf94SNnDxADwyjBizyM8Y+ZkI/gi6oZJV3ZNsGYz6OiM/GGSlOshqrL1LpuA25Xqd ZrU=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Wdcironportexception: Internal
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
|