2018-05-31 04:24:56

by Stephen Rothwell

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

Hi all,

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

drivers/md/dm-writecache.c: In function 'writecache_dtr':
drivers/md/dm-writecache.c:1799:3: error: implicit declaration of function 'bioset_free'; did you mean 'bvec_free'? [-Werror=implicit-function-declaration]
bioset_free(wc->bio_set);
^~~~~~~~~~~
bvec_free
drivers/md/dm-writecache.c: In function 'writecache_ctr':
drivers/md/dm-writecache.c:1929:17: error: implicit declaration of function 'bioset_create'; did you mean 'bioset_exit'? [-Werror=implicit-function-declaration]
wc->bio_set = bioset_create(BIO_POOL_SIZE,
^~~~~~~~~~~~~
bioset_exit
drivers/md/dm-writecache.c:1929:15: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
wc->bio_set = bioset_create(BIO_POOL_SIZE,
^

Caused by commit

2105231db61b ("dm: add writecache target")

interacting with commit

dad08527525f ("block: Drop bioset_create()")

from the block tree.

Can we please consider not immediately dropping APIs if at all
possible. :-(

I have added the following merge fix patch (hopefully this is enough):

From: Stephen Rothwell <[email protected]>
Date: Thu, 31 May 2018 14:06:10 +1000
Subject: [PATCH] dm: fixup for "block: Drop bioset_create()"

Signed-off-by: Stephen Rothwell <[email protected]>
---
drivers/md/dm-writecache.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
index 844c4fb2fcfc..b95f1f0e199d 100644
--- a/drivers/md/dm-writecache.c
+++ b/drivers/md/dm-writecache.c
@@ -211,7 +211,7 @@ struct dm_writecache {
struct completion flush_completion;
struct bio *flush_bio;

- struct bio_set *bio_set;
+ struct bio_set bio_set;
mempool_t *copy_pool;

struct dm_kcopyd_client *dm_kcopyd;
@@ -1494,7 +1494,7 @@ static void __writecache_writeback_pmem(struct dm_writecache *wc, struct writeba

max_pages = e->wc_list_contiguous;

- bio = bio_alloc_bioset(GFP_NOIO, max_pages, wc->bio_set);
+ bio = bio_alloc_bioset(GFP_NOIO, max_pages, &wc->bio_set);
wb = container_of(bio, struct writeback_struct, bio);
wb->wc = wc;
wb->bio.bi_end_io = writecache_writeback_endio;
@@ -1795,8 +1795,7 @@ static void writecache_dtr(struct dm_target *ti)
if (wc->flush_thread)
kthread_stop(wc->flush_thread);

- if (wc->bio_set)
- bioset_free(wc->bio_set);
+ bioset_exit(&wc->bio_set);

mempool_destroy(wc->copy_pool);

@@ -1926,11 +1925,10 @@ static int writecache_ctr(struct dm_target *ti, unsigned argc, char **argv)
}

if (WC_MODE_PMEM(wc)) {
- wc->bio_set = bioset_create(BIO_POOL_SIZE,
+ r = bioset_init(&wc->bio_set, BIO_POOL_SIZE,
offsetof(struct writeback_struct, bio),
BIOSET_NEED_BVECS);
- if (!wc->bio_set) {
- r = -ENOMEM;
+ if (r) {
ti->error = "Could not allocate bio set";
goto bad;
}
--
2.17.0

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-05-31 04:37:48

by Jens Axboe

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

On May 30, 2018, at 10:23 PM, Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> After merging the device-mapper tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/md/dm-writecache.c: In function 'writecache_dtr':
> drivers/md/dm-writecache.c:1799:3: error: implicit declaration of function 'bioset_free'; did you mean 'bvec_free'? [-Werror=implicit-function-declaration]
> bioset_free(wc->bio_set);
> ^~~~~~~~~~~
> bvec_free
> drivers/md/dm-writecache.c: In function 'writecache_ctr':
> drivers/md/dm-writecache.c:1929:17: error: implicit declaration of function 'bioset_create'; did you mean 'bioset_exit'? [-Werror=implicit-function-declaration]
> wc->bio_set = bioset_create(BIO_POOL_SIZE,
> ^~~~~~~~~~~~~
> bioset_exit
> drivers/md/dm-writecache.c:1929:15: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
> wc->bio_set = bioset_create(BIO_POOL_SIZE,
> ^
>
> Caused by commit
>
> 2105231db61b ("dm: add writecache target")
>
> interacting with commit
>
> dad08527525f ("block: Drop bioset_create()")
>
> from the block tree.
>
> Can we please consider not immediately dropping APIs if at all
> possible. :-(

I’ll drop the last patch, we can do that at the end of the merge window instead.


2018-05-31 04:38:57

by Stephen Rothwell

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

Hi Jens,

On Wed, 30 May 2018 22:35:40 -0600 Jens Axboe <[email protected]> wrote:
>
> I’ll drop the last patch, we can do that at the end of the merge window instead.

Thanks.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2018-05-31 12:12:18

by Mike Snitzer

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

On Thu, May 31 2018 at 12:35am -0400,
Jens Axboe <[email protected]> wrote:

> On May 30, 2018, at 10:23 PM, Stephen Rothwell <[email protected]> wrote:
> >
> > Hi all,
> >
> > After merging the device-mapper tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> >
> > drivers/md/dm-writecache.c: In function 'writecache_dtr':
> > drivers/md/dm-writecache.c:1799:3: error: implicit declaration of function 'bioset_free'; did you mean 'bvec_free'? [-Werror=implicit-function-declaration]
> > bioset_free(wc->bio_set);
> > ^~~~~~~~~~~
> > bvec_free
> > drivers/md/dm-writecache.c: In function 'writecache_ctr':
> > drivers/md/dm-writecache.c:1929:17: error: implicit declaration of function 'bioset_create'; did you mean 'bioset_exit'? [-Werror=implicit-function-declaration]
> > wc->bio_set = bioset_create(BIO_POOL_SIZE,
> > ^~~~~~~~~~~~~
> > bioset_exit
> > drivers/md/dm-writecache.c:1929:15: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
> > wc->bio_set = bioset_create(BIO_POOL_SIZE,
> > ^
> >
> > Caused by commit
> >
> > 2105231db61b ("dm: add writecache target")
> >
> > interacting with commit
> >
> > dad08527525f ("block: Drop bioset_create()")
> >
> > from the block tree.
> >
> > Can we please consider not immediately dropping APIs if at all
> > possible. :-(
>
> I’ll drop the last patch, we can do that at the end of the merge window instead.
>

FYI, I've since updated dm-writecache to use the new APIs

Mike

2018-05-31 14:21:33

by Jens Axboe

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

On 5/31/18 6:10 AM, Mike Snitzer wrote:
> On Thu, May 31 2018 at 12:35am -0400,
> Jens Axboe <[email protected]> wrote:
>
>> On May 30, 2018, at 10:23 PM, Stephen Rothwell <[email protected]> wrote:
>>>
>>> Hi all,
>>>
>>> After merging the device-mapper tree, today's linux-next build (x86_64
>>> allmodconfig) failed like this:
>>>
>>> drivers/md/dm-writecache.c: In function 'writecache_dtr':
>>> drivers/md/dm-writecache.c:1799:3: error: implicit declaration of function 'bioset_free'; did you mean 'bvec_free'? [-Werror=implicit-function-declaration]
>>> bioset_free(wc->bio_set);
>>> ^~~~~~~~~~~
>>> bvec_free
>>> drivers/md/dm-writecache.c: In function 'writecache_ctr':
>>> drivers/md/dm-writecache.c:1929:17: error: implicit declaration of function 'bioset_create'; did you mean 'bioset_exit'? [-Werror=implicit-function-declaration]
>>> wc->bio_set = bioset_create(BIO_POOL_SIZE,
>>> ^~~~~~~~~~~~~
>>> bioset_exit
>>> drivers/md/dm-writecache.c:1929:15: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
>>> wc->bio_set = bioset_create(BIO_POOL_SIZE,
>>> ^
>>>
>>> Caused by commit
>>>
>>> 2105231db61b ("dm: add writecache target")
>>>
>>> interacting with commit
>>>
>>> dad08527525f ("block: Drop bioset_create()")
>>>
>>> from the block tree.
>>>
>>> Can we please consider not immediately dropping APIs if at all
>>> possible. :-(
>>
>> I’ll drop the last patch, we can do that at the end of the merge window instead.
>>
>
> FYI, I've since updated dm-writecache to use the new APIs

Thanks Mike. I've rebased for-4.18/block to fold a bug fix for the
bounce code, and drop the patch that gets rid of the old API. When
we get to the end of the merge window, I'll push that last patch.
That's much more sensible, how it should have been done from the
get-go.

--
Jens Axboe


2018-05-31 14:23:16

by Jens Axboe

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

On 5/31/18 8:20 AM, Jens Axboe wrote:
> On 5/31/18 6:10 AM, Mike Snitzer wrote:
>> On Thu, May 31 2018 at 12:35am -0400,
>> Jens Axboe <[email protected]> wrote:
>>
>>> On May 30, 2018, at 10:23 PM, Stephen Rothwell <[email protected]> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> After merging the device-mapper tree, today's linux-next build (x86_64
>>>> allmodconfig) failed like this:
>>>>
>>>> drivers/md/dm-writecache.c: In function 'writecache_dtr':
>>>> drivers/md/dm-writecache.c:1799:3: error: implicit declaration of function 'bioset_free'; did you mean 'bvec_free'? [-Werror=implicit-function-declaration]
>>>> bioset_free(wc->bio_set);
>>>> ^~~~~~~~~~~
>>>> bvec_free
>>>> drivers/md/dm-writecache.c: In function 'writecache_ctr':
>>>> drivers/md/dm-writecache.c:1929:17: error: implicit declaration of function 'bioset_create'; did you mean 'bioset_exit'? [-Werror=implicit-function-declaration]
>>>> wc->bio_set = bioset_create(BIO_POOL_SIZE,
>>>> ^~~~~~~~~~~~~
>>>> bioset_exit
>>>> drivers/md/dm-writecache.c:1929:15: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
>>>> wc->bio_set = bioset_create(BIO_POOL_SIZE,
>>>> ^
>>>>
>>>> Caused by commit
>>>>
>>>> 2105231db61b ("dm: add writecache target")
>>>>
>>>> interacting with commit
>>>>
>>>> dad08527525f ("block: Drop bioset_create()")
>>>>
>>>> from the block tree.
>>>>
>>>> Can we please consider not immediately dropping APIs if at all
>>>> possible. :-(
>>>
>>> I’ll drop the last patch, we can do that at the end of the merge window instead.
>>>
>>
>> FYI, I've since updated dm-writecache to use the new APIs
>
> Thanks Mike. I've rebased for-4.18/block to fold a bug fix for the
> bounce code, and drop the patch that gets rid of the old API. When
> we get to the end of the merge window, I'll push that last patch.
> That's much more sensible, how it should have been done from the
> get-go.

Actually, maybe I should roll them back, since you both fixed that
up AND based on my tree - which is of course totally fine, but
now I'm thinking the rebase will do more harm than good in this
case.

--
Jens Axboe


2018-05-31 15:03:11

by Jens Axboe

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

On 5/31/18 8:22 AM, Jens Axboe wrote:
> On 5/31/18 8:20 AM, Jens Axboe wrote:
>> On 5/31/18 6:10 AM, Mike Snitzer wrote:
>>> On Thu, May 31 2018 at 12:35am -0400,
>>> Jens Axboe <[email protected]> wrote:
>>>
>>>> On May 30, 2018, at 10:23 PM, Stephen Rothwell <[email protected]> wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> After merging the device-mapper tree, today's linux-next build (x86_64
>>>>> allmodconfig) failed like this:
>>>>>
>>>>> drivers/md/dm-writecache.c: In function 'writecache_dtr':
>>>>> drivers/md/dm-writecache.c:1799:3: error: implicit declaration of function 'bioset_free'; did you mean 'bvec_free'? [-Werror=implicit-function-declaration]
>>>>> bioset_free(wc->bio_set);
>>>>> ^~~~~~~~~~~
>>>>> bvec_free
>>>>> drivers/md/dm-writecache.c: In function 'writecache_ctr':
>>>>> drivers/md/dm-writecache.c:1929:17: error: implicit declaration of function 'bioset_create'; did you mean 'bioset_exit'? [-Werror=implicit-function-declaration]
>>>>> wc->bio_set = bioset_create(BIO_POOL_SIZE,
>>>>> ^~~~~~~~~~~~~
>>>>> bioset_exit
>>>>> drivers/md/dm-writecache.c:1929:15: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
>>>>> wc->bio_set = bioset_create(BIO_POOL_SIZE,
>>>>> ^
>>>>>
>>>>> Caused by commit
>>>>>
>>>>> 2105231db61b ("dm: add writecache target")
>>>>>
>>>>> interacting with commit
>>>>>
>>>>> dad08527525f ("block: Drop bioset_create()")
>>>>>
>>>>> from the block tree.
>>>>>
>>>>> Can we please consider not immediately dropping APIs if at all
>>>>> possible. :-(
>>>>
>>>> I’ll drop the last patch, we can do that at the end of the merge window instead.
>>>>
>>>
>>> FYI, I've since updated dm-writecache to use the new APIs
>>
>> Thanks Mike. I've rebased for-4.18/block to fold a bug fix for the
>> bounce code, and drop the patch that gets rid of the old API. When
>> we get to the end of the merge window, I'll push that last patch.
>> That's much more sensible, how it should have been done from the
>> get-go.
>
> Actually, maybe I should roll them back, since you both fixed that
> up AND based on my tree - which is of course totally fine, but
> now I'm thinking the rebase will do more harm than good in this
> case.

Talked to Mike offline, but for Stephen's sake I'll reiterate here
too. Since I'm assuming that dm-writecache is the only problematic
user here, and since Mike based dm-4.18 on the block tree, I considered
it saner to leave things as-is. This means that the API removal is still
in the tree.

Stephen, if you see further conflicts due to that, do let me know and
I'll do a proper revert of the patch instead. Hopefully it'll be smooth
sailing from here on out.

--
Jens Axboe


2018-05-31 21:43:26

by Stephen Rothwell

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

Hi Jens,

On Thu, 31 May 2018 09:02:01 -0600 Jens Axboe <[email protected]> wrote:
>
> Talked to Mike offline, but for Stephen's sake I'll reiterate here
> too. Since I'm assuming that dm-writecache is the only problematic
> user here, and since Mike based dm-4.18 on the block tree, I considered
> it saner to leave things as-is. This means that the API removal is still
> in the tree.

Understood.

> Stephen, if you see further conflicts due to that, do let me know and
> I'll do a proper revert of the patch instead. Hopefully it'll be smooth
> sailing from here on out.

Yes, thanks, will do.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature