[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [PATCH V4 9/9] xen/blkback: use helper in vbd_sz()
- To: linux-block@xxxxxxxxxxxxxxx
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Mon, 8 Jul 2019 11:47:11 -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:11 +0000
- Ironport-sdr: F0idmnkdb/Uqc+L+EDumMXodl8HeXZKv2i1lWyg0/J75hTb+W1oPbB6GehUYU7zNb9P14EmvHc Ns2D1nViU7nl9N1wh2dsJKZEMtid+556OQ1F1wRYqZ5gHdH1ghX5H4QNZd2zKpVlWVhAeHp9oG Fo8cnRUaBizsf4MnRJIp+yH6xZPVYGIsCbTi18yRHAVt2fmsjVOJE4krrpU6H2fxsBPFFMIvik dyEjRb9r/lu0t9X6hAjqtUIFLd5qjw2dxhpmTyQI/4GUY6IpUt2lzeWDbRir41Fdr/nWPP1lSE gHM=
- Ironport-sdr: k5CLCTRIXL8NVfF+90wz1N+uhMuumeYYOfOd2K881zxPInqq5vVRyno0KD218RaQh+eJdnbHIr 60/lkVb93N7VDQpYbkDB/1BawxNwQetZsSj4Glhk5kjzLeEAObIKRLxmfDRDRJ8UuoS5CfzF+I 7wPQerGsaAaobT6lPsLY0/v+M7fCXOqCjSjnhSCIqTQBD4A0abyQpGXabrMYk4BDts+x+zOSWP ZMNvN67qm1LjShUdyrZgGml5SM1ohrYqOc69fY6NoeYP/fdUoN3Dsz6qEIyDAJ+1/vUpfXsCyn 6aJcgsEHAKTlJ+fr5vLU4rVe
- Ironport-sdr: 26GGS3luZiL/5ckkNXHpZvmNp3T9hhLG9lVgKoii3ZrNjTfbn7JDDAdDbg3EYAFCavGLZwgseq bZ492xPRRMIg5a4Q/mNnufyTTDO/6t+CSUsrr62FgCwL4fDxOvEe5/ShBeTSWY/Bvhpct7909Q fLEbyMa16Zyu2TnBE7i5FRyyZVF0XAyIGTClGLHEislCugo9rwiVPBoIuTe8R03DFt4VG2cZH/ zk0t7Rms1al8fiv4wzxJ/f7DZivEmKC0K+mbDMQKseLJ16+Ye4oALigBMwGdWxAp4zWEJdV9tr 7V0=
- 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.17.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|