From patchwork Sun Mar 17 00:35:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 10856155 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 A32341575 for ; Sun, 17 Mar 2019 00:35:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9711C29B10 for ; Sun, 17 Mar 2019 00:35:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B9F329B20; Sun, 17 Mar 2019 00:35:47 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 048CF29B1F for ; Sun, 17 Mar 2019 00:35:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727130AbfCQAfd (ORCPT ); Sat, 16 Mar 2019 20:35:33 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:49051 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbfCQAfd (ORCPT ); Sat, 16 Mar 2019 20:35:33 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04392;MF=bo.liu@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0TMuH0Ub_1552782930; Received: from localhost(mailfrom:bo.liu@linux.alibaba.com fp:SMTPD_---0TMuH0Ub_1552782930) by smtp.aliyun-inc.com(127.0.0.1); Sun, 17 Mar 2019 08:35:31 +0800 From: Liu Bo To: Vivek Goyal Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH] virtio-fs: fix multiple tag support Date: Sun, 17 Mar 2019 08:35:21 +0800 Message-Id: <20190317003521.69366-1-bo.liu@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.2.gb21ebb6 In-Reply-To: <20181210171318.16998-19-vgoyal@redhat.com> References: <20181210171318.16998-19-vgoyal@redhat.com> MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While doing memremap from pci_dev's system bus address to kernel virtual address, we assign a wrong value to the %end of pgmap.res, which ends up with a wrong resource size in the process of memremap, and that further prevent the second virtiofs pci device from being probed successfully. Signed-off-by: Liu Bo --- fs/fuse/virtio_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index 88b00055589b..7abf2187d85f 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -713,7 +713,7 @@ static int virtio_fs_setup_dax(struct virtio_device *vdev, struct virtio_fs *fs) pgmap->res = (struct resource){ .name = "virtio-fs dax window", .start = phys_addr, - .end = phys_addr + cache_len, + .end = phys_addr + cache_len - 1, }; fs->window_kaddr = devm_memremap_pages(&pci_dev->dev, pgmap);