Hi Benjamin,
After merging the aio tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
fs/aio.c: In function 'aio_kernel_init_rw':
fs/aio.c:1359:6: error: 'struct kiocb' has no member named 'ki_left'
iocb->ki_left = nr;
^
fs/aio.c: In function 'aio_kernel_submit':
fs/aio.c:1394:6: error: 'struct kiocb' has no member named 'ki_opcode'
iocb->ki_opcode = op;
^
fs/aio.c:1395:6: error: 'struct kiocb' has no member named 'ki_buf'
iocb->ki_buf = (char __user *)(unsigned long)ptr;
^
fs/aio.c:1398:2: error: too few arguments to function 'aio_run_iocb'
ret = aio_run_iocb(iocb, 0);
^
fs/aio.c:1217:16: note: declared here
static ssize_t aio_run_iocb(struct kiocb *req, unsigned opcode,
^
Caused by commit af9fa2024c38 ("aio: add aio_kernel_() interface") from
the aio-direct tree interacting with commit 8bc92afcf7f5 ("aio: Kill
unneeded kiocb members") from the aio tree.
I applied the following merge fix patch (and I can carry it as necessary
- thanks, Dave, for the hint patches):
From: Stephen Rothwell <[email protected]>
Date: Wed, 21 Aug 2013 17:42:14 +1000
Subject: [PATCH] aio: semantic fixup
Signed-off-by: Stephen Rothwell <[email protected]>
---
fs/aio.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/aio.c b/fs/aio.c
index 39fb7b0..59b46cd 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1356,7 +1356,6 @@ void aio_kernel_init_rw(struct kiocb *iocb, struct file *filp,
size_t nr, loff_t off)
{
iocb->ki_filp = filp;
- iocb->ki_left = nr;
iocb->ki_nbytes = nr;
iocb->ki_pos = off;
iocb->ki_ctx = (void *)-1;
@@ -1391,11 +1390,7 @@ int aio_kernel_submit(struct kiocb *iocb, unsigned short op, void *ptr)
BUG_ON(!iocb->ki_obj.complete);
BUG_ON(!iocb->ki_filp);
- iocb->ki_opcode = op;
- iocb->ki_buf = (char __user *)(unsigned long)ptr;
- iocb->ki_iter = ptr;
-
- ret = aio_run_iocb(iocb, 0);
+ ret = aio_run_iocb(iocb, op, ptr, 0);
if (ret)
aio_kernel_free(iocb);
--
1.8.4.rc3
--
Cheers,
Stephen Rothwell [email protected]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Stephen,
There's another problem after the merge. Now that buf is passed into
aio_run_iocb(), ki_iter is no longer needed. It's not getting
initialized and causes an oops.
Signed-off-by: Dave Kleikamp <[email protected]>
- ---
fs/aio.c | 4 ++--
include/linux/aio.h | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/aio.c b/fs/aio.c
index 59b46cd..9f783e3 100644
- --- a/fs/aio.c
+++ b/fs/aio.c
@@ -1281,11 +1281,11 @@ rw_common:
break;
case IOCB_CMD_READ_ITER:
- - ret = aio_read_iter(req, req->ki_iter);
+ ret = aio_read_iter(req, (void *)buf);
break;
case IOCB_CMD_WRITE_ITER:
- - ret = aio_write_iter(req, req->ki_iter);
+ ret = aio_write_iter(req, (void *)buf);
break;
case IOCB_CMD_FDSYNC:
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 4fab377..c08d3ed 100644
- --- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -54,7 +54,6 @@ struct kiocb {
* this is the underlying eventfd context to deliver events to.
*/
struct eventfd_ctx *ki_eventfd;
- - struct iov_iter *ki_iter;
};
static inline bool is_sync_kiocb(struct kiocb *kiocb)
- --
1.8.3.4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJSFOI7AAoJEDaohF61QIxkuW4P/3XIggPvVE3ZypC2Qno9UwtB
KXCVu0A0eLNbA6tB82vCWaQ7IblazoCOAex74qpGGrSB4ReS8yJDHkqnFR1aK8i4
Jyi2EONVUzAq5ijH9amZQfFWwcXBsH6nb2uEcv/xQ2/lc1hPCl3kIy/fKYVRWfYB
7YfX5J3VQnrI28B8NEccfqtTdQlYGp7VaRbh9dKVsudjBZZW9LAMkNcWoFuJzL9l
mAtubeUSaq9F7Dp6p/8whXyh5Ue2jPKo2m87B1et9Y5RN+K45uX3hTUJcAdKY72k
p9U4KNTCFG5o5FfsxI62B3/41R7KeOSe0PvILmb822vxLBnQWgF+fTScswKDDUcP
BFLoKE0WeCgzBiIPLEHaxJZSW7wUJqYAYGrnHRM8yFjJHUMDkWjiNN/597MDbijF
5BBj+gLN2GiBxKQcjtZRTXpUZ2pThLhPYpz/REtS134wz3Hp+ftsytHISCeUUoso
Icf8qd+JmggLOugdXg0gq7LAAc7Wnm91TJ79jsXFc7HPRBKl7AflS3e5poSQoy+Y
YZfVCUWV8LAnnB/fa9JobCIajIOebhhODpd5Y1hcqd9YDrqzhF3KlwyQkAmy9e2x
kX2dvHcumSNkYzWmQnP8Yol7oDWA9XXaL0nYRKDkpy/3F9+pCeheO1bY7tUnMD9F
34UQznE6M8rRkgiRKGDe
=WSg+
-----END PGP SIGNATURE-----
Hi Dave,
On Wed, 21 Aug 2013 10:52:27 -0500 Dave Kleikamp <[email protected]> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> There's another problem after the merge. Now that buf is passed into
> aio_run_iocb(), ki_iter is no longer needed. It's not getting
> initialized and causes an oops.
>
> Signed-off-by: Dave Kleikamp <[email protected]>
OK, thanks, this will be applied to the aio tree merge today.
> - ---
BTW, your GPG clearsigning corrupts patches. You can clearsign them
using the --not-dash-escaped option to gpg (I think). I fixed this up.
--
Cheers,
Stephen Rothwell [email protected]