Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1271570 > unrolled thread
| Started by | Mike Krinkin <krinkin.m.u@gmail.com> |
|---|---|
| First post | 2015-11-17 20:00 +0100 |
| Last post | 2015-11-18 15:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] block: add calls to split trace point Mike Krinkin <krinkin.m.u@gmail.com> - 2015-11-17 20:00 +0100
Re: [PATCH] block: add calls to split trace point Christoph Hellwig <hch@lst.de> - 2015-11-18 15:10 +0100
| From | Mike Krinkin <krinkin.m.u@gmail.com> |
|---|---|
| Date | 2015-11-17 20:00 +0100 |
| Subject | [PATCH] block: add calls to split trace point |
| Message-ID | <qvTDY-m1-19@gated-at.bofh.it> |
There is a split tracepoint that is supposed to be called before
splitting a bio, and it was actually called in bio_split function
until commit 4b1faf931650d4a35b2a ("block: Kill bio_pair_split()").
But now, no one reports splits, so this patch adds calls to
trace_block_split back right before bio_split.
Signed-off-by: Mike Krinkin <krinkin.m.u@gmail.com>
---
block/blk-merge.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index de5716d8..832ec49 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -7,6 +7,8 @@
#include <linux/blkdev.h>
#include <linux/scatterlist.h>
+#include <trace/events/block.h>
+
#include "blk.h"
static struct bio *blk_bio_discard_split(struct request_queue *q,
@@ -49,6 +51,7 @@ static struct bio *blk_bio_discard_split(struct request_queue *q,
if (split_sectors > tmp)
split_sectors -= tmp;
+ trace_block_split(q, bio, bio->bi_iter.bi_sector + split_sectors);
return bio_split(bio, split_sectors, GFP_NOIO, bs);
}
@@ -65,6 +68,7 @@ static struct bio *blk_bio_write_same_split(struct request_queue *q,
if (bio_sectors(bio) <= q->limits.max_write_same_sectors)
return NULL;
+ trace_block_split(q, bio, bio->bi_iter.bi_sector);
return bio_split(bio, q->limits.max_write_same_sectors, GFP_NOIO, bs);
}
@@ -117,6 +121,7 @@ new_segment:
return NULL;
split:
*segs = nsegs;
+ trace_block_split(q, bio, bio->bi_iter.bi_sector + sectors);
return bio_split(bio, sectors, GFP_NOIO, bs);
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Date | 2015-11-18 15:10 +0100 |
| Message-ID | <qwbAR-3W1-5@gated-at.bofh.it> |
| In reply to | #1271570 |
Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web