aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bio.h
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-11-23 21:19:27 -0500
committerKent Overstreet <kmo@daterainc.com>2013-11-24 01:33:54 -0500
commit59d276fe02d7e887a4825ef05c80b8f8c54ba60a (patch)
treedbb8c78a922d47652c08d9f5e46d77708ac95543 /include/linux/bio.h
parentbdb53207411ae39b8a80dda0a66d1b468cbe1380 (diff)
block: Add bio_clone_fast()
bio_clone() just got more expensive - however, most users of bio_clone() don't actually need to modify the biovec. If they aren't modifying the biovec, and they can guarantee that the original bio isn't freed before the clone (also true in most cases), we can just point the clone at the original bio's biovec. Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r--include/linux/bio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 1a31f9d9e057..1f83f4a3083e 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -328,6 +328,8 @@ extern mempool_t *biovec_create_pool(struct bio_set *bs, int pool_entries);
328extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *); 328extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *);
329extern void bio_put(struct bio *); 329extern void bio_put(struct bio *);
330 330
331extern void __bio_clone_fast(struct bio *, struct bio *);
332extern struct bio *bio_clone_fast(struct bio *, gfp_t, struct bio_set *);
331extern void __bio_clone(struct bio *, struct bio *); 333extern void __bio_clone(struct bio *, struct bio *);
332extern struct bio *bio_clone_bioset(struct bio *, gfp_t, struct bio_set *bs); 334extern struct bio *bio_clone_bioset(struct bio *, gfp_t, struct bio_set *bs);
333 335