[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [COMPILE TEST ONLY PATCH V3 8/9] target/pscsi: use helper in pscsi_get_blocks()
- To: linux-block@xxxxxxxxxxxxxxx
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Tue, 2 Jul 2019 10:42:34 -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: Tue, 02 Jul 2019 17:44:45 +0000
- Ironport-sdr: MfSUmUDtjeDdHQSsHTzyy0L9Z5CMjLEGqG1egJydV2xkJzXqVB9qf7ZrciJtpY4NkPpKIuyIxy hWl+HjgY6u5DAwgNkU19BVtdKGxSpOolBw81aFwDlogGBG97VXtnijgPTarEwAknOlps6RySJw qXw6ffDGjvAmOG22ob9ZAOdqWUMbkc8kwtVqUpfTBq6RXuQgLt7qd30lY/gFKRwJZMcPHLteKn N54udFK5vPA0e6UNaWHlL/IJ2dHlr4XUo2iqOaJ+UWT/qnutRMiFtF0Hjs5D40GREWVph5uZaM R2o=
- Ironport-sdr: sjNWu12K9YADpTjhbmPyEVOIW7FK2GLg2dgAP6W0T31O1rLYNXALoU9weNcPnCd3/mg1ORiEiZ i8CToRIp4H1VNH1DKOMiYqDKmZaETpVtSJmzUNbKjBuNujhDK2/tK9JZE9DmeAQIAy9TS8SKt2 gi/3NzQZE3rWmQIUQY6M4l45wT8RSDEQf4DLWHY9kpWrokHqhXK++scl93is8npCYt8paLamJ8 0BMB4l9g/KfaTexHWeqqXd1b8FX6v9m634MKIlyG2ESRsl2wfAUtIkjIgpl2NT7/vXbOARe/Ei +5Iqq/ky5uDncuxRdO60Bb2d
- Ironport-sdr: ws5rnzCM4RcXwdxe4HASEQFLH1dnYxxAMKAgVbT4JHCN2jgx943DO6rHgKP+swJs4M91iIs/sT gRrZoE1tIOaM6JyLKSoAUUb8hTK+NRvPlUPi1IJhe9ahYwL9curauLL4rf66dnNNMggCfCsFTI 3/Y+IKEv41CBry2zrJeQxThbAE0FA5Lf1EnTSrQvqmPHERsJ+iVZtdFiBfteYsvau3GieAffN7 Ri7patlKy/pzZ/QFGhDZFEMvG9Z+F8UK0U8dEwu/NxE5ZVctxdKWEE4Gv1UuEalLIUAzMIkkPs db8=
- 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.19.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|