From d50059ecf078224b00b0b341173fd35dbbd0eea3 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sun, 27 Oct 2002 16:49:35 -0800 Subject: [PATCH] end_io bouncing o Split blk_queue_bounce() into a slow and fast path. The fast path is inlined, only if we actually need to check the bio for possible bounces (and bounce) do we enter __blk_queue_bounce() slow path. o Fix a nasty bug that could cause corruption for file systems not using PAGE_CACHE_SIZE blok size! We were not correctly setting the 'to' bv_offset correctly. o Add BIO_BOUNCE flag. Later patches will use this for debug checking. --- include/linux/bio.h | 1 + include/linux/blkdev.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/bio.h b/include/linux/bio.h index 93ac8216aae4..d5decec17fe7 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -101,6 +101,7 @@ struct bio { #define BIO_EOF 2 /* out-out-bounds error */ #define BIO_SEG_VALID 3 /* nr_hw_seg valid */ #define BIO_CLONED 4 /* doesn't own data */ +#define BIO_BOUNCED 5 /* bio is a bounce bio */ #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag))) /* diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 42e81a4a0cab..6437522be832 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -268,7 +268,7 @@ extern unsigned long blk_max_low_pfn, blk_max_pfn; #define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD) extern int init_emergency_isa_pool(void); -void blk_queue_bounce(request_queue_t *q, struct bio **bio); +inline void blk_queue_bounce(request_queue_t *q, struct bio **bio); #define rq_for_each_bio(bio, rq) \ if ((rq->bio)) \ -- cgit v1.2.3