[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [PATCH V4 7/9] blktrace: use helper in blk_trace_setup_lba()
- To: linux-block@xxxxxxxxxxxxxxx
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Mon, 8 Jul 2019 11:47:09 -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:04 +0000
- Ironport-sdr: GPOI4FGeiHYVLU2GTywxO4tPZt/4Rw0taNSit2n+tLuHxKxHWCMPZFwENP/RWw75B6wURP5IhP nYVvWArCCVIv+4Ai6Vey6Q0bTWBa/BJIFExF0xLtdqHZoT/biWSBZQM+d7Wvjs1m7oNVkrpAAv 2waG9/YlkYMeHS/P726prkpJv+piR1Ek01Xfc+UMntTMt5i63sBBfB29wnweK2SbRpTHPJR05u s49+q/MLGbcmwwvgBi2Yluja7SsvMcN9YZjTwm/NUEMVy6gUFnGkLwci7oojaYk9qNLQEo9SQC i6w=
- Ironport-sdr: pgapf2a9tSDKjkhuBN6mEbnjnd9i9Z52utoNLhBZn4Re79512AVypCxEnpOP3i5gOhWiAMWnFp Xrfw2XWCVngko9+LEDULkN94GLwsL+hZWWjMOKew86LFKzNDnX8SRqn2n12neKTWxOIGaPj38Y Ii1XTCBOwrqYYtfxHs+dhz305p/r77L9429xUt/TawS37g2bSDj2tbLHqz5szLM5gRy5w90zEH 6x9nojv1Xc83gVR5jH8k9MaGQAksoVFCBjBFjoA/vwn8qj5LFFbBw3qnqN++Z5vqkYRb+GArOV XFjP8KDJO8STl7uQl9P+S/El
- Ironport-sdr: /lvUb5Q0myDa5zcgSkRV5mq0xWp1dDUOhPS4Wf9cFbmpG/IvRSSGEJ9lGM8k7Pjd6GkWTfDTv+ avvWzfyzdR+eOgrKUapLjgHI2vMsorvgoJy9+HYsgkE8YYl214niu7w2HnG8nciCH6ySy43zmH ohwVHaTLIjzccyfIkUQ95mnACdoPRdlSU5MIKSY0Z7xcK7GgXG7jb4ypPBfDeBz7hFQfKTcB1z axureZOqr+I/9iazjQ5dwfRkKdkMZP03pkSPzM+08pOLf2ElGq3Di+24xjBJ7cTOHtOLO4EHwy eec=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
This patch updates the blk_trace_setup_lba() 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>
---
kernel/trace/blktrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index e1c6d79fb4cc..35ff49503b85 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -461,7 +461,7 @@ static void blk_trace_setup_lba(struct blk_trace *bt,
if (part) {
bt->start_lba = part->start_sect;
- bt->end_lba = part->start_sect + part->nr_sects;
+ bt->end_lba = part->start_sect + bdev_nr_sects(bdev);
} else {
bt->start_lba = 0;
bt->end_lba = -1ULL;
--
2.17.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|