Skip to contentSkip to conversation

linux-next: build failure after merge of the block tree

PATCH In review Stephen Rothwell 5 participants 7 messages Jul 30, 2015 – Jul 31, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Jens,

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

drivers/staging/lustre/lustre/llite/../include/obd_support.h:42:0,
from drivers/staging/lustre/lustre/llite/../include/lustre_cfg.h:225,
from drivers/staging/lustre/lustre/llite/../include/lustre_lib.h:55,
from drivers/staging/lustre/lustre/llite/lloop.c:105:
drivers/staging/lustre/lustre/llite/lloop.c: In function 'loop_handle_bio':
drivers/staging/lustre/lustre/llite/../include/linux/lustre_compat25.h:89:35: error: too many arguments to function 'bio_endio'

 #define cfs_bio_endio(a, b, c)    bio_endio((a), (c))
                                   ^

drivers/staging/lustre/lustre/llite/lloop.c:379:3: note: in expansion of macro 'cfs_bio_endio'
cfs_bio_endio(bio, bio->bi_iter.bi_size, ret);
^
In file included from include/linux/blkdev.h:18:0,
from drivers/staging/lustre/lustre/llite/lloop.c:91:
include/linux/bio.h:442:13: note: declared here

 extern void bio_endio(struct bio *);
             ^

Caused by commit

4246a0b63bd8 ("block: add a bi_error field to struct bio")

I added the following fix patch, but more is probably required:

From: Stephen Rothwell <[email protected]>
Date: Thu, 30 Jul 2015 14:10:57 +1000
Subject: [PATCH] block: lustre: temporary fix for bio_endio API change

---
 drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +1 -1
index 513c81f43d6e..1aac5a77c500 100644
@@ -86,7 +86,7 @@
 		vfs_rename(old, old_dir, new, new_dir, NULL, 0)
 
 #define cfs_bio_io_error(a, b)   bio_io_error((a))
-#define cfs_bio_endio(a, b, c)    bio_endio((a), (c))
+#define cfs_bio_endio(a, b, c)    bio_endio((a))
 
 #define cfs_path_put(nd)     path_put(&(nd)->path)
 
Signature · 6 lines
2.4.6

-- 
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#1 lore raw
Quoted 4 lines · Stephen Rothwell

Hi Jens,

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

Can you please drop staging and especially lustre from these runs? Conditions of the staging tree are they don't need to update. Nevermind that it never should have grown something as big and stale as lustre without any prospects of being merged.

#2 lore raw

Hi Christoph,

Quoted 2 lines · On Thu, 30 Jul 2015 08:19:51 +0200 Christoph Hellwig <[email protected]> wrote:

Can you please drop staging and especially lustre from these runs?

One problem with that is that staging is expected to at least build. and when Linus eventually merges this code in the block tree, he will do an allmodconfig build and it will fail. I don't really care about how things get fixed in the staging tree (as you can see from the patch I applied to get it to build) and sometimes mostly I just disable an affected driver. This was just as easy.

At least this way people know ahead of time that it needs an update.

Quoted 1 line

Conditions of the staging tree are they don't need to update.

See above - it is expected to build. Linus himself asked me to make sure that remains true.

Quoted 3 lines

Nevermind that
it never should have grown something as big and stale as lustre without any prospects of being merged.

You can have that discussion with Greg and the Lustre maintainers. :-)

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#3 lore raw
In reply to Stephen Rothwell
Quoted 19 lines · Stephen Rothwell

Hi Jens,

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

drivers/staging/lustre/lustre/llite/../include/obd_support.h:42:0,
from drivers/staging/lustre/lustre/llite/../include/lustre_cfg.h:225,
from drivers/staging/lustre/lustre/llite/../include/lustre_lib.h:55,
from drivers/staging/lustre/lustre/llite/lloop.c:105:
drivers/staging/lustre/lustre/llite/lloop.c: In function 'loop_handle_bio':
drivers/staging/lustre/lustre/llite/../include/linux/lustre_compat25.h:89:35: error: too many arguments to function 'bio_endio'

#define cfs_bio_endio(a, b, c)    bio_endio((a), (c))
                                  ^

drivers/staging/lustre/lustre/llite/lloop.c:379:3: note: in expansion of macro 'cfs_bio_endio'
cfs_bio_endio(bio, bio->bi_iter.bi_size, ret);
^
In file included from include/linux/blkdev.h:18:0,
from drivers/staging/lustre/lustre/llite/lloop.c:91:
include/linux/bio.h:442:13: note: declared here

Quoted 8 lines
extern void bio_endio(struct bio *);
            ^

Caused by commit

4246a0b63bd8 ("block: add a bi_error field to struct bio")

I added the following fix patch, but more is probably required:

It looks like this in itself is enough, but we probably should be good to kill those cfs_bio_* compat macros while we are at it.
I'll submit a patch, but not sure where to base it on.
If basing on current block tree's linux-next, then I get a bunch of errors about how kstrto* are undefined, so I cannot really test this yet.

Thanks.

Quoted 29 lines

From: Stephen Rothwell <[email protected]>
Date: Thu, 30 Jul 2015 14:10:57 +1000
Subject: [PATCH] block: lustre: temporary fix for bio_endio API change

---
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +1 -1
index 513c81f43d6e..1aac5a77c500 100644
@@ -86,7 +86,7 @@
 		vfs_rename(old, old_dir, new, new_dir, NULL, 0)
 
 #define cfs_bio_io_error(a, b)   bio_io_error((a))
-#define cfs_bio_endio(a, b, c)    bio_endio((a), (c))
+#define cfs_bio_endio(a, b, c)    bio_endio((a))
 
 #define cfs_path_put(nd)     path_put(&(nd)->path)
 
Signature · 6 lines
2.4.6

-- 
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#4 lore raw

PATCH 1/1 staging/lustre/lloop: Update call to bio_endio() to match new prototype

In reply to Stephen Rothwell

From: Oleg Drokin <[email protected]>

Also while we are at it, drop all cfs_bio_* wrappers.

---
 drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 3 ---
 drivers/staging/lustre/lustre/llite/lloop.c                   | 4 ++--
 2 files changed, 2 insertions(+), 5 deletions(-)
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +0 -3
index 513c81f..c2a4ffd 100644
@@ -85,9 +85,6 @@
 #define ll_vfs_rename(old, old_dir, mnt, new, new_dir, mnt1) \
 		vfs_rename(old, old_dir, new, new_dir, NULL, 0)
 
-#define cfs_bio_io_error(a, b)   bio_io_error((a))
-#define cfs_bio_endio(a, b, c)    bio_endio((a), (c))
-
 #define cfs_path_put(nd)     path_put(&(nd)->path)
 
 
drivers/staging/lustre/lustre/llite/lloop.c +2 -2
index cc00fd1..d614234 100644
@@ -365,7 +365,7 @@ static void loop_make_request(struct request_queue *q, struct bio *old_bio)
 	loop_add_bio(lo, old_bio);
 	return;
 err:
-	cfs_bio_io_error(old_bio, old_bio->bi_iter.bi_size);
+	bio_io_error(old_bio);
 }
 
 
@@ -376,7 +376,7 @@ static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio)
 	while (bio) {
 		struct bio *tmp = bio->bi_next;
 		bio->bi_next = NULL;
-		cfs_bio_endio(bio, bio->bi_iter.bi_size, ret);
+		bio_endio(bio);
 		bio = tmp;
 	}
 }
Signature · 1 line
2.1.0
#5 lore raw

Re: [PATCH] staging/lustre/lloop: Update call to bio_endio() to match new prototype

Quoted 6 lines · On Thu, Jul 30, 2015 at 11:03:35AM -0400, [email protected] wrote:

From: Oleg Drokin <[email protected]>

Also while we are at it, drop all cfs_bio_* wrappers.

---

Is it dependent on some other patch? This applies cleanly but is breaking the build. "error: too few arguments to function bio_endio"

regards
sudip

#6 lore raw

Re: [PATCH] staging/lustre/lloop: Update call to bio_endio() to match new prototype

Quoted 9 lines · Sudip Mukherjee
Quoted 6 lines · On Thu, Jul 30, 2015 at 11:03:35AM -0400, [email protected] wrote:

From: Oleg Drokin <[email protected]>

Also while we are at it, drop all cfs_bio_* wrappers.

---

Is it dependent on some other patch? This applies cleanly but is breaking the build. "error: too few arguments to function bio_endio"

Yes, this is for block/linux-next specifically.
For current staging tree a corresponding one is
http://www.gossamer-threads.com/lists/linux/kernel/2227687