public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel•org>
To: Sage Weil <sage@inktank•com>, Jianpeng Ma <majianpeng@gmail•com>,
	Zheng Yan <zheng.z.yan@intel•com>, Zach Brown <zab@zabbo•net>,
	Dave Kleikamp <dave.kleikamp@oracle•com>
Cc: ceph-devel@vger•kernel.org, linux-next@vger•kernel.org,
	linux-kernel@vger•kernel.org,
	Thierry Reding <thierry.reding@gmail•com>
Subject: Build failure after merge of ceph tree
Date: Thu, 3 Oct 2013 13:09:57 +0100	[thread overview]
Message-ID: <20131003120957.GK27287@sirena.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 4437 bytes --]

After merging the ceph tree into -next an x86 allmodconfig build fails
with:

fs/ceph/file.c: In function ‘ceph_sync_read’:
fs/ceph/file.c:437:25: error: ‘struct iov_iter’ has no member named ‘iov’
    void __user *data = i->iov[0].iov_base + i->iov_offset;
                         ^
fs/ceph/file.c:438:18: error: ‘struct iov_iter’ has no member named ‘iov’
    size_t len = i->iov[0].iov_len - i->iov_offset;
                  ^
fs/ceph/file.c:470:26: error: ‘struct iov_iter’ has no member named ‘iov’
     void __user *data = i->iov[0].iov_base
                          ^
In file included from include/linux/cache.h:4:0,
                 from include/linux/time.h:4,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from fs/ceph/file.c:3:
fs/ceph/file.c:472:14: error: ‘struct iov_iter’ has no member named ‘iov’
     l = min(i->iov[0].iov_len - i->iov_offset,
              ^
include/linux/kernel.h:670:9: note: in definition of macro ‘min’
  typeof(x) _min1 = (x);   \
         ^
fs/ceph/file.c:472:14: error: ‘struct iov_iter’ has no member named ‘iov’
     l = min(i->iov[0].iov_len - i->iov_offset,
              ^
include/linux/kernel.h:670:21: note: in definition of macro ‘min’
  typeof(x) _min1 = (x);   \
                     ^
include/linux/kernel.h:672:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
  (void) (&_min1 == &_min2);  \
                 ^
fs/ceph/file.c:472:9: note: in expansion of macro ‘min’
     l = min(i->iov[0].iov_len - i->iov_offset,
         ^
fs/ceph/file.c: In function ‘ceph_sync_direct_write’:
fs/ceph/file.c:586:24: error: ‘struct iov_iter’ has no member named ‘iov’
   void __user *data = i.iov->iov_base + i.iov_offset;
                        ^
fs/ceph/file.c:587:14: error: ‘struct iov_iter’ has no member named ‘iov’
   u64 len = i.iov->iov_len - i.iov_offset;
              ^
make[2]: *** [fs/ceph/file.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [fs/ceph] Error 2

caused by commits 53d028160 (ceph: implement readv/preadv for sync
operation) and 2f0a7a180 (ceph: Implement writev/pwritev for sync
operation) interacting with commit f6794d33a5ec ("iov_iter: hide iovec
details behind ops function pointers") from the aio-direct tree.

I extended Stephen's previous fix to this:

From 577435f0a97e67b735f355aef0ef55732814818c Mon Sep 17 00:00:00 2001
From: Mark Brown <broonie@linaro•org>
Date: Thu, 3 Oct 2013 13:05:20 +0100
Subject: [PATCH] ceph: Fix up for iov_iter changes

Extend an earlier fixup by Stephen Rothwell.

Signed-off-by: Mark Brown <broonie@linaro•org>
---
 fs/ceph/file.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index c4419e8..37b5b5c 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -434,8 +434,8 @@ static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *i,
 
 	if (file->f_flags & O_DIRECT) {
 		while (iov_iter_count(i)) {
-			void __user *data = i->iov[0].iov_base + i->iov_offset;
-			size_t len = i->iov[0].iov_len - i->iov_offset;
+			void __user *data = iov_iter_iovec(i)->iov_base + i->iov_offset;
+			size_t len = iov_iter_iovec(i)->iov_len - i->iov_offset;
 
 			num_pages = calc_pages_for((unsigned long)data, len);
 			pages = ceph_get_direct_page_vector(data,
@@ -467,9 +467,9 @@ static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *i,
 			size_t left = len = ret;
 
 			while (left) {
-				void __user *data = i->iov[0].iov_base
+				void __user *data = iov_iter_iovec(i)->iov_base
 							+ i->iov_offset;
-				l = min(i->iov[0].iov_len - i->iov_offset,
+				l = min(iov_iter_iovec(i)->iov_len - i->iov_offset,
 					left);
 
 				ret = ceph_copy_page_vector_to_user(&pages[k],
@@ -583,8 +583,8 @@ ceph_sync_direct_write(struct kiocb *iocb, const struct iovec *iov,
 	iov_iter_init(&i, iov, nr_segs, count, 0);
 
 	while (iov_iter_count(&i) > 0) {
-		void __user *data = i.iov->iov_base + i.iov_offset;
-		u64 len = i.iov->iov_len - i.iov_offset;
+		void __user *data = iov_iter_iovec(&i)->iov_base + i.iov_offset;
+		u64 len = iov_iter_iovec(&i)->iov_len - i.iov_offset;
 
 		page_align = (unsigned long)data & ~PAGE_MASK;
 
-- 
1.8.4.rc3


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

                 reply	other threads:[~2013-10-03 12:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131003120957.GK27287@sirena.org.uk \
    --to=broonie@kernel$(echo .)org \
    --cc=ceph-devel@vger$(echo .)kernel.org \
    --cc=dave.kleikamp@oracle$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=majianpeng@gmail$(echo .)com \
    --cc=sage@inktank$(echo .)com \
    --cc=thierry.reding@gmail$(echo .)com \
    --cc=zab@zabbo$(echo .)net \
    --cc=zheng.z.yan@intel$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox