linux-next: build failure after merge of the final tree (md tree related)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi Neil,

After merging the final tree, today's linux-next build (i386 defconfig)
failed like this:

drivers/built-in.o: In function `bitmap_resize':
(.text+0x202b76): undefined reference to `__udivdi3'
drivers/built-in.o: In function `bitmap_resize':
(.text+0x202bac): undefined reference to `__udivdi3'

Caused by commit 6c5cb1922cca ("md/bitmap: add bitmap_resize function to
allow bitmap resizing").

I also get these warnings:

drivers/md/bitmap.c: In function 'bitmap_resize':
drivers/md/bitmap.c:1878:11: warning: comparison of distinct pointer types lacks a cast [enabled by default]
drivers/md/bitmap.c:1887:11: warning: passing argument 3 of 'bitmap_get_counter' from incompatible pointer type [enabled by default]
drivers/md/bitmap.c:1225:26: note: expected 'sector_t *' but argument is of type 'long int *'
drivers/md/bitmap.c:1892:12: warning: passing argument 3 of 'bitmap_get_counter' from incompatible pointer type [enabled by default]
drivers/md/bitmap.c:1225:26: note: expected 'sector_t *' but argument is of type 'long int *'
drivers/md/bitmap.c:1920:8: warning: passing argument 3 of 'bitmap_get_counter' from incompatible pointer type [enabled by default]
drivers/md/bitmap.c:1225:26: note: expected 'sector_t *' but argument is of type 'long int *'

I applied the patch below for the link failure, but the above warnings
should be addressed as well.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Fri, 20 Apr 2012 15:26:52 +1000
Subject: [PATCH] md/bitmap: use DIV_ROUND_UP_SECTOR_T

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
 drivers/md/bitmap.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 47d5c8d..a780407 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1828,15 +1828,15 @@ int bitmap_resize(struct bitmap *bitmap, sector_t blocks,
 		do {
 			/* 'chunkshift' is shift from block size to chunk size */
 			chunkshift++;
-			chunks = DIV_ROUND_UP(blocks, 1 << chunkshift);
-			bytes = DIV_ROUND_UP(chunks, 8);
+			chunks = DIV_ROUND_UP_SECTOR_T(blocks, 1 << chunkshift);
+			bytes = DIV_ROUND_UP_SECTOR_T(chunks, 8);
 			if (!bitmap->mddev->bitmap_info.external)
 				bytes += sizeof(bitmap_super_t);
 		} while (bytes > (space << 9));
 	} else
 		chunkshift = ffz(~chunksize) - BITMAP_BLOCK_SHIFT;
 
-	chunks = DIV_ROUND_UP(blocks, 1 << chunkshift);
+	chunks = DIV_ROUND_UP_SECTOR_T(blocks, 1 << chunkshift);
 	memset(&store, 0, sizeof(store));
 	if (bitmap->mddev->bitmap_info.offset || bitmap->mddev->bitmap_info.file)
 		ret = bitmap_storage_alloc(&store, chunks,
@@ -1844,7 +1844,7 @@ int bitmap_resize(struct bitmap *bitmap, sector_t blocks,
 	if (ret)
 		goto err;
 
-	pages = DIV_ROUND_UP(chunks, PAGE_COUNTER_RATIO);
+	pages = DIV_ROUND_UP_SECTOR_T(chunks, PAGE_COUNTER_RATIO);
 
 	new_bp = kzalloc(pages * sizeof(*new_bp), GFP_KERNEL);
 	ret = -ENOMEM;
-- 
1.7.10.rc3

-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

Attachment: pgphNzNAQk3n_.pgp
Description: PGP signature


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux