[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [COMPILE TESTED PATCH V5 9/9] xen/blkback: use helper in vbd_sz()
- To: linux-block@xxxxxxxxxxxxxxx
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Tue, 20 Aug 2019 23:14:23 -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:27 +0000
- Ironport-sdr: e9d4u7zv3oHUS2eoop+Oj1q5E4wCyhbzf/rOdqXtt+gIu1HOX16m4cEqwl79SUqGu+P4aeX/Y3 Ig4v1EuRL/qTD13+8h1ifoQiqwT3epomF1ABRWZTfUUcuw3QoAC76uEnwH/3nqU/zYfQKKxTW2 eH5Ag1gnhPrxkJaoOl7IqobTaX56Q1yLbOmjmc7Y9lBaS7IxeNp86Sx9sKUWtBEUXGf5ibVhuA rgJPx3Vw49NvI4b9iA28FOzgV7FlLhUMhamZnOZYaK293/AIBnyeKTv+uKarz8ujE6YHkoHQu8 7g0=
- Ironport-sdr: vs1wc/yGVRhTjMI4TNZtdpd5ETxwGgMRCQwWpq2H1/NkGh0OtDrlNzLfNykbCpk7EJUwVOHRK+ tB9fbFRSy4tJq/cwOb221AEx/hCgqqkVLpIzjUtDStrKE5VqvOuPh0pP7T0Y0Dv1rDfcchbVvN tYOuotR9TsMgnCFjkSlYIiQ7PPxLZ6eUYtDhFIVbeM0RAulxSyKATlZhW8ZrWVifWhmyck64xG BvyVFLlSRVFRE4t/sIySJ4uhzvaGHK/ScIijF0nXIqx8XRwFM0dr/qBKbVBk1aPb56Iuos4mPt IHDuppRyY/O10fPDIjgiw0+j
- Ironport-sdr: OdxGZ+ZIUZXNxHsyk4r1jitBzzOKbws59uKyfKyGqxJAsocaYs8oIxpzZfzjt5ML1whAzbLmaX RwM7I6UulMIpLElfhfQc5hYfBEAbff6XiTo6OdUg2IOOnMUz0R9KML2qvnTlEseLVHNS7pyeSc 9CTOUyji2b5zizhazjbzfCPSVvgrBe56YrLfQaH1Zt4rfNfxQIaRAfBPRZjR9OpapUegl1b+jL uJtoBjulj24n+tVENNu5L8VD++n13brc0PAUBMrQdHgf+PQ6TPFgyBzEVVQm4JhNIRu+VBGZP5 OFY=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Wdcironportexception: Internal
This patch updates the vbd_sz() macro with newly introduced helper
function to read the nr_sects from block device's hd_parts with the
help of part_nr_sects_read().
Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
drivers/block/xen-blkback/common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/xen-blkback/common.h
b/drivers/block/xen-blkback/common.h
index 1d3002d773f7..f96cb8d1cb99 100644
--- a/drivers/block/xen-blkback/common.h
+++ b/drivers/block/xen-blkback/common.h
@@ -359,7 +359,7 @@ struct pending_req {
#define vbd_sz(_v) ((_v)->bdev->bd_part ? \
- (_v)->bdev->bd_part->nr_sects : \
+ bdev_nr_sects((_v)->bdev) : \
get_capacity((_v)->bdev->bd_disk))
#define xen_blkif_get(_b) (atomic_inc(&(_b)->refcnt))
--
2.17.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|