[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [PATCH V3 7/9] blktrace: use helper in blk_trace_setup_lba()
- To: linux-block@xxxxxxxxxxxxxxx
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Tue, 2 Jul 2019 10:42:33 -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: 0KMDCxQVwEg1FJKfTJ9ocndWwiRtytDyutq3Q/SA598muLBX3tE0g0K9CT6wcZAUCEPFuGc80y hYplh8q3JRQV3OcoeGI/xO+VbATs+TXF34QQ+q9PPLtwEQD4eiHTXRAh9FJSkZgbNi6+IwJd3G 2MYUl0pVsECvCI2L2MInAKB7Ck8bEBjtv8H+tjAxbUhHkzX+abW9/5eqknB3GR13iBkg6Z9kgJ elkvfZVqvLKOmG+A0trwYt+oOROhj2gZTnXBjBhfmzDq1ISM9bvK0DOX8KEu5J7Ug3fe3htJ2h SM0=
- Ironport-sdr: bsE3gykKHyDhvN6hPMnYvPz7lIkV13TzxBQ7iOpFGI0wgmyfSXicTJkBkDrADwmzli1gSMYPOa Aehi6aPQFcpRaAMNFXpyoJPxDEjm3C6Yj+1RKr/J5pS5ajTpVlOQFK34H1oVFnuFkvZFqVq+5g kIFO8edo5gZtk39x/xQAVK4YRPkv4wCxTu95DhyzZiVBFZVcJUq5qia4QHKxBu7Mj3zBTE/FlE H3jM5rIp3zDr6cJg9ToqxSEbJufV5QkKm+qKxU6r7hyGSmEDNluJn05W9mkQuUrNxMQ9wkd3bk 6Z4c6KyA7cWTgDZqAu/JYE2W
- Ironport-sdr: 3pY21X4H4oFet0YyacV+YlVBI/O5kjvwVM4K9RGH+lSxN8T2EcXrvGPqEb2YvDqKJFkrfhunvd wPT3NX+wyNa0Yzhxb/uYEWOC4wde2+iswg6SvGEkFsZEG7xl9F9e8Oeh0HWaPS7CCQMwKIe6a2 GRLymXkPc2sWwjDgBgV2nTvewLvTRednJE1LimHwb7D160IlrHhdJ5+6fX+M/NoUYRwOZ7jWJK xH+13m0ZRYpDhSMhKeTSxyUsymuQr84jPMXHTt+eleYamt6aHvlAIY3bJMXzg/m6m51iKwKuyF K5M=
- 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.19.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|