2016-12-01 02:56:03

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 (powerpc
ppc64_defconfig) failed like this:

fs/iomap.c: In function 'iomap_dio_zero':
fs/iomap.c:725:38: error: 'WRITE_ODIRECT' undeclared (first use in this function)
bio_set_op_attrs(bio, REQ_OP_WRITE, WRITE_ODIRECT);
^
fs/iomap.c:725:38: note: each undeclared identifier is reported only once for each function it appears in
fs/iomap.c: In function 'iomap_dio_actor':
fs/iomap.c:808:40: error: 'WRITE_ODIRECT' undeclared (first use in this function)
bio_set_op_attrs(bio, REQ_OP_WRITE, WRITE_ODIRECT);
^
fs/iomap.c: In function 'iomap_dio_rw':
fs/iomap.c:933:9: error: implicit declaration of function 'blk_poll' [-Werror=implicit-function-declaration]
!blk_poll(dio->submit.last_queue,
^

Caused by commits

70fd76140a6c ("block,fs: use REQ_* flags directly")
bbd7bb7017d5 ("block: move poll code to blk-mq")

interacting with commit

ff6a9292e6f6 ("iomap: implement direct I/O")

from the xfs tree.

I love APIs changing :-(

I have applied the following merge fix patch for today.

From: Stephen Rothwell <[email protected]>
Date: Thu, 1 Dec 2016 13:45:33 +1100
Subject: [PATCH] iomap: fix up for blk_poll and WRITE_ODIRECT change

Signed-off-by: Stephen Rothwell <[email protected]>
---
fs/iomap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/iomap.c b/fs/iomap.c
index fc2446242935..c9d6c1176345 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -722,7 +722,7 @@ iomap_dio_zero(struct iomap_dio *dio, struct iomap *iomap, loff_t pos,
get_page(page);
if (bio_add_page(bio, page, len, 0) != len)
BUG();
- bio_set_op_attrs(bio, REQ_OP_WRITE, WRITE_ODIRECT);
+ bio_set_op_attrs(bio, REQ_OP_WRITE, REQ_SYNC | REQ_IDLE);

atomic_inc(&dio->ref);
return submit_bio(bio);
@@ -805,7 +805,7 @@ iomap_dio_actor(struct inode *inode, loff_t pos, loff_t length,
}

if (dio->flags & IOMAP_DIO_WRITE) {
- bio_set_op_attrs(bio, REQ_OP_WRITE, WRITE_ODIRECT);
+ bio_set_op_attrs(bio, REQ_OP_WRITE, REQ_SYNC | REQ_IDLE);
task_io_account_write(bio->bi_iter.bi_size);
} else {
bio_set_op_attrs(bio, REQ_OP_READ, 0);
@@ -930,7 +930,7 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, struct iomap_ops *ops,

if (!(iocb->ki_flags & IOCB_HIPRI) ||
!dio->submit.last_queue ||
- !blk_poll(dio->submit.last_queue,
+ !blk_mq_poll(dio->submit.last_queue,
dio->submit.cookie))
io_schedule();
}
--
2.10.2

--
Cheers,
Stephen Rothwell


2016-12-01 03:00:42

by Jens Axboe

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

On 11/30/2016 07:55 PM, Stephen Rothwell wrote:
> Hi Jens,
>
> After merging the block tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> fs/iomap.c: In function 'iomap_dio_zero':
> fs/iomap.c:725:38: error: 'WRITE_ODIRECT' undeclared (first use in this function)
> bio_set_op_attrs(bio, REQ_OP_WRITE, WRITE_ODIRECT);
> ^
> fs/iomap.c:725:38: note: each undeclared identifier is reported only once for each function it appears in
> fs/iomap.c: In function 'iomap_dio_actor':
> fs/iomap.c:808:40: error: 'WRITE_ODIRECT' undeclared (first use in this function)
> bio_set_op_attrs(bio, REQ_OP_WRITE, WRITE_ODIRECT);
> ^
> fs/iomap.c: In function 'iomap_dio_rw':
> fs/iomap.c:933:9: error: implicit declaration of function 'blk_poll' [-Werror=implicit-function-declaration]
> !blk_poll(dio->submit.last_queue,
> ^
>
> Caused by commits
>
> 70fd76140a6c ("block,fs: use REQ_* flags directly")
> bbd7bb7017d5 ("block: move poll code to blk-mq")
>
> interacting with commit
>
> ff6a9292e6f6 ("iomap: implement direct I/O")
>
> from the xfs tree.
>
> I love APIs changing :-(

It's a necessary evil...

This could have been avoided with the XFS tree pulling in the block
changes, but that obviously has other implications. Something to watch
for when the XFS tree is sent in for the merge window, however.

> I have applied the following merge fix patch for today.

The fix is correct.

--
Jens Axboe

2016-12-01 03:02:48

by Stephen Rothwell

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

Hi Jens,

On Wed, 30 Nov 2016 20:00:36 -0700 Jens Axboe <[email protected]> wrote:
>
> On 11/30/2016 07:55 PM, Stephen Rothwell wrote:
> >
> > I love APIs changing :-(
>
> It's a necessary evil...

Yeah

> This could have been avoided with the XFS tree pulling in the block
> changes, but that obviously has other implications. Something to watch
> for when the XFS tree is sent in for the merge window, however.

Indeed. Or the block tree, which ever comes last.

> > I have applied the following merge fix patch for today.
>
> The fix is correct.

Thanks.

--
Cheers,
Stephen Rothwell

2016-12-01 03:04:59

by Jens Axboe

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

On 11/30/2016 08:02 PM, Stephen Rothwell wrote:
> Hi Jens,
>
> On Wed, 30 Nov 2016 20:00:36 -0700 Jens Axboe <[email protected]> wrote:
>>
>> On 11/30/2016 07:55 PM, Stephen Rothwell wrote:
>>>
>>> I love APIs changing :-(
>>
>> It's a necessary evil...
>
> Yeah
>
>> This could have been avoided with the XFS tree pulling in the block
>> changes, but that obviously has other implications. Something to watch
>> for when the XFS tree is sent in for the merge window, however.
>
> Indeed. Or the block tree, which ever comes last.

Sure, but I usually try and push in the first few days since other trees
depend on mine. So it's more likely that the XFS tree will run into the
issue.

--
Jens Axboe