linux-next: build failure after merge of the device-mapper tree

From: Stephen Rothwell
Date: Tue Jun 29 2010 - 22:57:59 EST

Hi Alasdair,

After merging the device-mapper tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

drivers/md/dm.c: In function '__clone_and_map':
/data/sfr/next/drivers/md/dm.c:1245: error: implicit declaration of function 'bio_rw_flagged'
/data/sfr/next/drivers/md/dm.c:1245: error: 'BIO_RW_DISCARD' undeclared (first use in this function)

Caused by commit d134095c1564b101987d8f2920d0928cae669be2
("dm-linear-support-discard") interacting with commit
74450be123b6f3cb480c358a056be398cce6aa6e ("block: unify flags for struct
bio and struct request") from the block tree.

I hate API changes :-)

I applied the following merge fix up patch:

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Wed, 30 Jun 2010 12:54:22 +1000
Subject: [PATCH] device-mapper: fix for bio API change

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
drivers/md/dm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 518bfe0..20b4248 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1242,7 +1242,7 @@ static int __clone_and_map(struct clone_info *ci)
if (unlikely(bio_empty_barrier(bio)))
return __clone_and_map_empty_barrier(ci);

- if (unlikely(bio_rw_flagged(bio, BIO_RW_DISCARD)))
+ if (unlikely(bio->bi_rw & REQ_DISCARD))
return __clone_and_map_discard(ci);

ti = dm_table_find_target(ci->map, ci->sector);

Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at