From patchwork Thu Oct 3 12:09:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 2982491 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 328E0BFF0B for ; Thu, 3 Oct 2013 12:10:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9512420126 for ; Thu, 3 Oct 2013 12:10:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F1C720125 for ; Thu, 3 Oct 2013 12:10:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753710Ab3JCMKN (ORCPT ); Thu, 3 Oct 2013 08:10:13 -0400 Received: from cassiel.sirena.org.uk ([80.68.93.111]:43281 "EHLO cassiel.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753453Ab3JCMKM (ORCPT ); Thu, 3 Oct 2013 08:10:12 -0400 Received: from cpc11-sgyl31-2-0-cust68.sgyl.cable.virginmedia.com ([94.175.92.69] helo=debutante.sirena.org.uk) by cassiel.sirena.org.uk with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1VRhjD-0004Ru-RI; Thu, 03 Oct 2013 13:10:01 +0100 Received: from broonie by debutante.sirena.org.uk with local (Exim 4.80) (envelope-from ) id 1VRhjB-0005Hs-B1; Thu, 03 Oct 2013 13:09:57 +0100 Date: Thu, 3 Oct 2013 13:09:57 +0100 From: Mark Brown To: Sage Weil , Jianpeng Ma , Zheng Yan , Zach Brown , Dave Kleikamp Cc: ceph-devel@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Thierry Reding Message-ID: <20131003120957.GK27287@sirena.org.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 94.175.92.69 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Subject: Build failure after merge of ceph tree X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:57:07 +0000) X-SA-Exim-Scanned: Yes (on cassiel.sirena.org.uk) Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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 --- 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;