2015-07-30 04:17:16

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the block tree

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

Signed-off-by: Stephen Rothwell <[email protected]>
---
drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
index 513c81f43d6e..1aac5a77c500 100644
--- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
+++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
@@ -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)

--
2.4.6

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


2015-07-30 06:19:55

by Christoph Hellwig

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

On Thu, Jul 30, 2015 at 02:17:13PM +1000, Stephen Rothwell wrote:
> 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.

2015-07-30 12:24:34

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree

Hi Christoph,

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.

> 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.

> 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. :-)

--
Cheers,
Stephen Rothwell [email protected]

2015-07-30 14:38:29

by Oleg Drokin

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the block tree


On Jul 30, 2015, at 12:17 AM, Stephen Rothwell wrote:

> 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:

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.

> 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
>
> Signed-off-by: Stephen Rothwell <[email protected]>
> ---
> drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
> index 513c81f43d6e..1aac5a77c500 100644
> --- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
> +++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
> @@ -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)
>
> --
> 2.4.6
>
> --
> Cheers,
> Stephen Rothwell [email protected]
> http://www.canb.auug.org.au/~sfr/

2015-07-30 15:03:57

by Oleg Drokin

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

From: Oleg Drokin <[email protected]>

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

Signed-off-by: Oleg Drokin <[email protected]>
---
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(-)

diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
index 513c81f..c2a4ffd 100644
--- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
+++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h
@@ -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)


diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
index cc00fd1..d614234 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -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;
}
}
--
2.1.0

2015-07-31 11:27:23

by Sudip Mukherjee

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

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.
>
> Signed-off-by: Oleg Drokin <[email protected]>
> ---
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

2015-07-31 16:52:10

by Oleg Drokin

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

On Jul 31, 2015, at 7:27 AM, Sudip Mukherjee wrote:

> 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.
>>
>> Signed-off-by: Oleg Drokin <[email protected]>
>> ---
> 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