Hi all,

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

drivers/md/dm-cache-target.c: In function 'bio_writes_complete_block':
drivers/md/dm-cache-target.c:1020:7: error: 'struct bio' has no member named 
'bi_size'
   (bio->bi_size == (cache->sectors_per_block << SECTOR_SHIFT));
       ^

Caused by commit 1bd270d800ec ("dm cache: promotion optimisation for
writes") interacting with commit ed2d2f9a8265 ("block: Abstract out bvec
iterator") from the block tree.

I applied this fix up patch and can carry it as necessary:

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Tue, 5 Nov 2013 13:49:25 +1100
Subject: [PATCH] dm_cache: fix up for bvec iterator abstraction

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 drivers/md/dm-cache-target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index a977d5c6d544..5ce0f5ec6d74 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -1017,7 +1017,7 @@ static void issue_overwrite(struct dm_cache_migration 
*mg, struct bio *bio)
 static bool bio_writes_complete_block(struct cache *cache, struct bio *bio)
 {
        return (bio_data_dir(bio) == WRITE) &&
-               (bio->bi_size == (cache->sectors_per_block << SECTOR_SHIFT));
+               (bio->bi_iter.bi_size == (cache->sectors_per_block << 
SECTOR_SHIFT));
 }
 
 static void avoid_copy(struct dm_cache_migration *mg)
-- 
1.8.4.rc3

-- 
Cheers,
Stephen Rothwell                    s...@canb.auug.org.au

Attachment: pgpv9OhCKl6a4.pgp
Description: PGP signature

Reply via email to