[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [COMPILE TEST ONLY PATCH V3 9/9] xen/blkback: use helper in vbd_sz()
- To: linux-block@xxxxxxxxxxxxxxx
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Tue, 2 Jul 2019 10:42:35 -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: mfFwrIJ8KOpNUlfo+Ngtn8WvQ0xhu/6IM3qBEq86jDY43r8N8plygQSuFa8ZwyQRplGecHmx/F ykTjzGX3d6G1h23qbyMvgbYNfgz8nYF4ttNQ4vCeMoH/mhB3yq8c6yZ+vmzn/qwntMeati7nLv 1Rl7R3Cros7mJ54xgTzF45vDHFz7eS/4YLYDinkSw7SvPmaJMXVzGl053bdWyhr/Xcr5kdzgbc XyQTdaU+JaaO5A6cEGpnODcr9fgVosaIm1gHU19+tToOr9yPMePlilx9x8DS4kuCFtl85aSRvk pKs=
- Ironport-sdr: nvPRVBHqfSRbuCu6iOvb+1m1WyQQ7Tb4LrdESQt8y8MF3fOaX5paecofNiq8PZXfZeDjiaC9Bg lI+Q9f+DGItDXHvlKhTUbsSN/0xJCH13VuIM9oGSKMKm+gP9tXY5PZkrqaUguPE4J26htN8R45 PS6dxX7lPGuMLaxvOVedrgNnvdEG6ywrKggnwSZ8lw8qRtYq3042nNJoC9NWeu7m11ndW9eHHJ dXycQBA0Oc1OKAIecgrKHSZfCR34wlM9zqEI/F3+zh0+rgP+HPtzGGoRRq5tKgLjz/P7EPgqDq TbmOJTvnh8273PslFfhYs5fx
- Ironport-sdr: ZZ3hK2bjvxPpoDYY3dGllgVu8h4y5aH5oKqXW08FxIs6lNu/zSn8Lq0Vc3CKh0UxLaxt9BwD0v 3fTd0ZB6CA1nNk66QTwybNGG7hulaPt/5JjQ4RaSIjxNw/RiC1ddUlmt5cVduRWWvDMc6DPeRv QY23K1dCOsFVfF6zsp2JXeQ1ammNVuRE1dwh/CDI01AburqpZV0KpfKqu1xuzoJfo0j+AG3k47 ScfjN3W9uVeTshYH+ctIEZjqQRzreo7anBy5gwBbh5bWBmg6n07aXYscmGEGj90oNrBHWiocWt PF0=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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().
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.19.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|