From patchwork Mon Nov 5 05:52:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10667399 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2BF7013A4 for ; Mon, 5 Nov 2018 05:53:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14F4F2961C for ; Mon, 5 Nov 2018 05:53:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07DC12961E; Mon, 5 Nov 2018 05:53:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A17EE2961C for ; Mon, 5 Nov 2018 05:53:11 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 18EF721F3EB; Sun, 4 Nov 2018 21:53:06 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id F121521F2DA for ; Sun, 4 Nov 2018 21:53:04 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C4FDEAD5D; Mon, 5 Nov 2018 05:53:03 +0000 (UTC) From: NeilBrown To: James Simmons , Andreas Dilger , Oleg Drokin Date: Mon, 05 Nov 2018 16:52:53 +1100 Message-ID: <87k1lsyssq.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Subject: [lustre-devel] drivers/staging updated to 4.20-rc1 X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lustre Development List Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi, I've just pushed out new lustre/lustre, lustre/lustre-testing, lustre/lustre-wip to github.com:neilbrown/linux.git lustre is updated to 4.20-rc1 and doesn't compile because of some changes. The patch below makes it compile and (probably) work. I'd appreciate a review, especially of the iov_for_each change. Thanks, NeilBrown Subject: [PATCH] lustre: fixes for 4.20-rc1 Most are trivial. iov_for_each() is broken upstream and there are no users in mainline, so it seem to make sense to just open-code it in the one place we use it. Signed-off-by: NeilBrown Signed-off-by: NeilBrown --- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 4 ++-- drivers/staging/lustre/lustre/llite/vvp_io.c | 5 ++++- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h index c882345226e1..7f81fe24c5eb 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h @@ -478,7 +478,7 @@ struct kib_rx { /* receive message */ enum ib_wc_status rx_status; /* completion status */ struct kib_msg *rx_msg; /* message buffer (host vaddr) */ __u64 rx_msgaddr; /* message buffer (I/O addr) */ - DECLARE_PCI_UNMAP_ADDR(rx_msgunmap); /* for dma_unmap_single() */ + DEFINE_DMA_UNMAP_ADDR(rx_msgunmap); /* for dma_unmap_single() */ struct ib_recv_wr rx_wrq; /* receive work item... */ struct ib_sge rx_sge; /* ...and its memory */ }; @@ -501,7 +501,7 @@ struct kib_tx { /* transmit message */ struct lnet_msg *tx_lntmsg[2]; /* lnet msgs to finalize on completion */ struct kib_msg *tx_msg; /* message buffer (host vaddr) */ __u64 tx_msgaddr; /* message buffer (I/O addr) */ - DECLARE_PCI_UNMAP_ADDR(tx_msgunmap); /* for dma_unmap_single() */ + DEFINE_DMA_UNMAP_ADDR(tx_msgunmap); /* for dma_unmap_single() */ /** sge for tx_msgaddr */ struct ib_sge tx_msgsge; int tx_nwrq; /* # send work items */ diff --git a/drivers/staging/lustre/lustre/llite/vvp_io.c b/drivers/staging/lustre/lustre/llite/vvp_io.c index 70d23874b674..524f3f4feec8 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_io.c +++ b/drivers/staging/lustre/lustre/llite/vvp_io.c @@ -388,7 +388,10 @@ static int vvp_mmap_locks(const struct lu_env *env, if (!mm) return 0; - iov_for_each(iov, i, *vio->vui_iter) { + for (i = *vio->vui_iter; + i.count; + iov_iter_advance(&i, iov.iov_len)) { + iov = iov_iter_iovec(&i); addr = (unsigned long)iov.iov_base; count = iov.iov_len; if (count == 0) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 8f8e3d220dc8..2242204f3c9e 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -993,7 +993,7 @@ static struct page *mdc_page_locate(struct address_space *mapping, __u64 *hash, xa_lock_irq(&mapping->i_pages); found = radix_tree_gang_lookup(&mapping->i_pages, (void **)&page, offset, 1); - if (found > 0 && !radix_tree_exceptional_entry(page)) { + if (found > 0 && !xa_is_value(page)) { struct lu_dirpage *dp; get_page(page);