[PATCH 1/2] bio: define __BIOVEC_PHYS_MERGEABLE

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeremy Fitzhardinge
Date: Friday, October 24, 2008 - 1:59 pm

Define __BIOVEC_PHYS_MERGEABLE as the default implementation of
BIOVEC_PHYS_MERGEABLE, so that its available for reuse within an
arch-specific definition of BIOVEC_PHYS_MERGEABLE.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
---
 include/linux/bio.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

===================================================================
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -221,12 +221,16 @@
 #define __BVEC_END(bio)		bio_iovec_idx((bio), (bio)->bi_vcnt - 1)
 #define __BVEC_START(bio)	bio_iovec_idx((bio), (bio)->bi_idx)
 
+/* Default implementation of BIOVEC_PHYS_MERGEABLE */
+#define __BIOVEC_PHYS_MERGEABLE(vec1, vec2)	\
+	((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
+
 /*
  * allow arch override, for eg virtualized architectures (put in asm/io.h)
  */
 #ifndef BIOVEC_PHYS_MERGEABLE
 #define BIOVEC_PHYS_MERGEABLE(vec1, vec2)	\
-	((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
+	__BIOVEC_PHYS_MERGEABLE(vec1, vec2)
 #endif
 
 #define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86: remove dead BIO_VMERGE_BOUNDARY definition, FUJITA Tomonori, (Thu Oct 23, 10:41 pm)
Re: [PATCH] x86: remove dead BIO_VMERGE_BOUNDARY definition, Jeremy Fitzhardinge, (Fri Oct 24, 1:58 pm)
[PATCH 1/2] bio: define __BIOVEC_PHYS_MERGEABLE, Jeremy Fitzhardinge, (Fri Oct 24, 1:59 pm)
[PATCH 2/2] x86: replace BIO_VMERGE_BOUNDARY with BIOVEC_P ..., Jeremy Fitzhardinge, (Fri Oct 24, 1:59 pm)
Re: [PATCH] x86: remove dead BIO_VMERGE_BOUNDARY definition, FUJITA Tomonori, (Sun Oct 26, 9:42 pm)
Re: [PATCH 2/2] x86: replace BIO_VMERGE_BOUNDARY with BIOV ..., Jeremy Fitzhardinge, (Mon Oct 27, 1:21 am)
Re: [PATCH 2/2] x86: replace BIO_VMERGE_BOUNDARY with BIOV ..., Jeremy Fitzhardinge, (Mon Oct 27, 2:18 am)
Re: [PATCH 2/2] x86: replace BIO_VMERGE_BOUNDARY with BIOV ..., Jeremy Fitzhardinge, (Mon Oct 27, 4:43 am)
Re: [PATCH 2/2] x86: replace BIO_VMERGE_BOUNDARY with BIOV ..., Jeremy Fitzhardinge, (Wed Oct 29, 2:24 am)
Re: [PATCH 2/2] x86: replace BIO_VMERGE_BOUNDARY with BIOV ..., Jeremy Fitzhardinge, (Wed Oct 29, 5:12 am)
Re: [PATCH 2/2] x86: replace BIO_VMERGE_BOUNDARY with BIOV ..., Jeremy Fitzhardinge, (Wed Oct 29, 6:06 am)