Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2731221pxb; Sun, 24 Jan 2021 18:45:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxASbXk6B7nLNbgUKO3NfozmKQ4fz1k2JWGR4IixYT8qrzQdWS5Yu/K9slzJP5V05a1KoeS X-Received: by 2002:a50:bc14:: with SMTP id j20mr715863edh.381.1611542705167; Sun, 24 Jan 2021 18:45:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611542705; cv=none; d=google.com; s=arc-20160816; b=ThojMIcf+Pgnw7/KstZhSd4qJ51cydvqyjJH9jSfkZ1KzBx1PBCkIibrY97Cn6HDT0 9Q/vP95Oz9qTnWTkQfDky/r41/lmNXHRT4KgMaMnwBb3GGmErmz8gNPtZhz1qUhZ2xhS W/IZFNen729JSp3SWWIJV2/5ecuKo1vB+hIguNiz7U2tKQbqMqibWsNCSfPxrAVzIYEE lEU8lJshuR3pS7cf19oufmX7+MzQW8mlAU4o7KDkSJ6bkxItBMRkxfTqFa0KVG2a1YxK VQN705myf9oOpqGRPUXnx1yS/vLQ+uItwTl7S32H6nJGWLBpbXOCL079Z42mWuuapw0K lQ6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:abuse-reports-to:tuid:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=YharDfi/MPVjTdChUavesW6w2ZnpPJiBQRkuCJ5MTdo=; b=Sz6AlMxRsh5U5rJJ2gXWWiAw1Azyfo6Y7Jkb3puS7sIGhVGj7vmhzrTvQJzWoG6Yn/ VlJDaUbE1W2jyilQ5P2miESw8Myzn8xQYGB4nAvVgtHlsrqjt+G0oaEDqRv3cozOpAAR pM/f9f0Nc0Iv91kGen8PG0wZh//3YyL7PGuIHzHrDoM7Ys8WYkJEP/3Nkwy71KMk4uqj Z8kRseVCcqJM3lLvsNVwlr/HkS+I2VVulSC5W1uho3k+159wmX2IbCyo76m5pUN7qiwJ +eFLdZz0qsgreju5y8frgSuhaUMH1VioCSHn4TEmQFw+RZV+CFz6B5zV1X0An7XaKGAK 8nzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zh18si5289907ejb.182.2021.01.24.18.44.41; Sun, 24 Jan 2021 18:45:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726725AbhAYClQ (ORCPT + 99 others); Sun, 24 Jan 2021 21:41:16 -0500 Received: from relay.corp-email.com ([222.73.234.233]:18759 "EHLO relay.corp-email.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726700AbhAYClL (ORCPT ); Sun, 24 Jan 2021 21:41:11 -0500 Received: from ([183.47.25.45]) by relay.corp-email.com ((LNX1044)) with ASMTP (SSL) id STM00155; Mon, 25 Jan 2021 10:39:55 +0800 Received: from GCY-EXS-15.TCL.com (10.74.128.165) by GCY-EXS-06.TCL.com (10.74.128.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 25 Jan 2021 10:39:54 +0800 Received: from [172.16.34.11] (172.16.34.11) by GCY-EXS-15.TCL.com (10.74.128.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 25 Jan 2021 10:39:53 +0800 Subject: Re: [PATCH RESEND V11 0/7] fuse: Add support for passthrough read/write To: Alessio Balsini CC: , , , , , , , , , , , , , , , , , References: From: "wu-yan@tcl.com" Message-ID: Date: Mon, 25 Jan 2021 10:39:52 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.34.11] X-ClientProxiedBy: GCY-EXS-04.TCL.com (10.74.128.154) To GCY-EXS-15.TCL.com (10.74.128.165) tUid: 20211251039550fc344f5981a91c859305db0b63c51bd X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/22/21 7:06 PM, Alessio Balsini wrote: > On Tue, Jan 19, 2021 at 12:34:23PM +0000, Alessio Balsini wrote: >> On Tue, Jan 19, 2021 at 07:06:54PM +0800, Rokudo Yan wrote: >>> on Mon, Jan 18, 2021 at 5:27 PM Alessio Balsini wrote: >>>> >>>> This is the 11th version of the series, rebased on top of v5.11-rc4. >>>> Please find the changelog at the bottom of this cover letter. >>>> >>>> Add support for file system passthrough read/write of files when enabled >>>> in userspace through the option FUSE_PASSTHROUGH. >>> [...] >>> >>> >>> Hi Allesio, >>> >>> Could you please add support for passthrough mmap too ? >>> If the fuse file opened with passthrough actived, and then map (shared) to (another) process >>> address space using mmap interface. As access the file with mmap will pass the vfs cache of fuse, >>> but access the file with read/write will bypass the vfs cache of fuse, this may cause inconsistency. >>> eg. the reader read the fuse file with mmap() and the writer modify the file with write(), the reader >>> may not see the modification immediately since the writer bypass the vfs cache of fuse. >>> Actually we have already meet an issue caused by the inconsistency after applying fuse passthrough >>> scheme to our product. >>> >>> Thanks, >>> yanwu. >> >> Hi yanwu, >> >> Thank you for your interest in this change. >> >> FUSE passthrough for mmap is an extension that is already in my TODO >> list, together with passthrough for directories. >> For now I would prefer to keep this series minimal to make the review >> process leaner and simpler. >> I will start working on extending this series with new features and >> addressing more corner cases as soon as these changes get merged, what >> do you think? >> >> Thanks, >> Alessio > > Hi yanwu, > > Sorry if I overlooked this issue. I added memory-mapping to my tests and > could reproduce/verify this wrong behavior you mentioned. > > I created this WIP (history may change) branch that has the missing mmap > implementation: > > https://github.com/balsini/linux/commits/fuse-passthrough-v12-develop-v5.11-rc4 > > I did some mmap testing in the last days with this extra mmap > implementation and couldn't find any issues, everything seems to be > working as expected with the extra mmap patch. Can you please confirm > this is fixed on your end too? > I'm also going to revert in this branch the stacking policy changes to > how they were in V10 as suggested by Amir if there are no concerns with > that. > I'm waiting for some extra tests to complete and, if no issue is > detected, I'll post the V12 series super soon. > > Thanks, > Alessio > Hi, Alessio Thank you for your reply. I have already added mmap for passthrough in our product, and the issue mentioned before is fixed. And I will update if any new issuses found. Thanks yanwu