lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <87vavlfsar.fsf@notabene.neil.brown.name>
Date:   Fri, 18 Nov 2016 13:14:20 +1100
From:   NeilBrown <neilb@...e.com>
To:     Jens Axboe <axboe@...nel.dk>, Christoph Hellwig <hch@...radead.org>
Cc:     linux-block@...r.kernel.org, linux-raid@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] block: call trace_block_split() from bio_split()



Somewhere around
Commit: 20d0189b1012 ("block: Introduce new bio_split()")
and
Commit: 4b1faf931650 ("block: Kill bio_pair_split()")

in 3.14 we lost the call to trace_block_split() from bio_split().

Commit: cda22646adaa ("block: add call to split trace point")

in 4.5 added it back for blk_queue_split(), but not for other users of
bio_split(), and particularly not for md/raid.

This patch moves the trace_block_split() call from blk_queue_split()
to bio_split().
As blk_queue_split() calls bio_split() (via various helper functions)
the same events that were traced before will still be traced.

Signed-off-by: NeilBrown <neilb@...e.com>
---
 block/bio.c       | 1 +
 block/blk-merge.c | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/bio.c b/block/bio.c
index db85c5753a76..212ea95a7401 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1804,6 +1804,7 @@ struct bio *bio_split(struct bio *bio, int sectors,
 		bio_integrity_trim(split, 0, sectors);
 
 	bio_advance(bio, split->bi_iter.bi_size);
+	trace_block_split(bdev_get_queue(bio->bi_bdev), split, bio->bi_iter.bi_sector);
 
 	return split;
 }
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 2642e5fc8b69..82cdd35a9f07 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -217,7 +217,6 @@ void blk_queue_split(struct request_queue *q, struct bio **bio,
 		split->bi_opf |= REQ_NOMERGE;
 
 		bio_chain(split, *bio);
-		trace_block_split(q, split, (*bio)->bi_iter.bi_sector);
 		generic_make_request(*bio);
 		*bio = split;
 	}
-- 
2.10.2


Download attachment "signature.asc" of type "application/pgp-signature" (801 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ