From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85C9AC4338F for ; Tue, 10 Aug 2021 01:51:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 682F361040 for ; Tue, 10 Aug 2021 01:51:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236465AbhHJBv7 (ORCPT ); Mon, 9 Aug 2021 21:51:59 -0400 Received: from mail-m17654.qiye.163.com ([59.111.176.54]:23616 "EHLO mail-m17654.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232334AbhHJBv5 (ORCPT ); Mon, 9 Aug 2021 21:51:57 -0400 X-Greylist: delayed 593 seconds by postgrey-1.27 at vger.kernel.org; Mon, 09 Aug 2021 21:51:57 EDT Received: from [172.25.44.145] (unknown [58.251.74.232]) by mail-m17654.qiye.163.com (Hmail) with ESMTPA id A603E200D6; Tue, 10 Aug 2021 09:41:40 +0800 (CST) Subject: Re: [PATCH v2] fuse: use newer inode info when writeback cache is enabled To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org References: <20210130085003.1392-1-changfengnan@vivo.com> <3e740389-9734-a959-a88a-3b1d54b59e22@vivo.com> <29a3623f-fb4d-2a2b-af28-26f9ef0b0764@vivo.com> From: Fengnan Chang Message-ID: Date: Tue, 10 Aug 2021 09:41:40 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.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-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgPGg8OCBgUHx5ZQUlOS1dZCBgUCR5ZQVlLVUtZV1 kWDxoPAgseWUFZKDYvK1lXWShZQUhPN1dZLVlBSVdZDwkaFQgSH1lBWUMfHh1WQk1MTUxKHUkfSE 4YVRMBExYaEhckFA4PWVdZFhoPEhUdFFlBWU9LSFVKSktISkNVS1kG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NBw6KRw6FT9CFy4KMkMjMANM OiwaCgtVSlVKTUlDTk5CTEtKSk9PVTMWGhIXVRgTGhUcHR4VHBUaFTsNEg0UVRgUFkVZV1kSC1lB WU5DVUlOSlVMT1VJSElZV1kIAVlBSElDTTcG X-HM-Tid: 0a7b2db8f310d9fdkuwsa603e200d6 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Remove cache=always still have this problem, this problem is related about FUSE_CAP_WRITEBACK_CACHE. On 2021/8/6 20:20, Miklos Szeredi wrote: > On Thu, 24 Jun 2021 at 09:42, Fengnan Chang wrote: >> >> Hi Miklos: >> >> Thank you for the information, I have been able to reproduce the problem. >> >> The new version of the patch as below. Previous fsx test is pass now. >> Need do more test, Can you help to test new patch? or send me your test >> case, I will test this. >> >> Here is my test case, and is the problem this patch is trying to solve. >> Case A: >> mkdir /tmp/test >> passthrough_ll -ocache=always,writeback /mnt/test/ >> echo "11111" > /tmp/test/fsx >> ls -l /mnt/test/tmp/test/ >> echo "2222" >> /tmp/test/fsx >> ls -l /mnt/test/tmp/test/ >> >> Case B: >> mkdir /tmp/test >> passthrough_ll -ocache=always,writeback /mnt/test/ >> passthrough_ll -ocache=always,writeback /mnt/test2/ >> echo "11111" > /tmp/test/fsx >> ls -l /mnt/test/tmp/test/ >> ls -l /mnt/test2/tmp/test/ >> echo "222" >> /mnt/test/tmp/test/fsx >> ls -l /mnt/test/tmp/test/ >> ls -l /mnt/test2/tmp/test/ > > Both these testcases have the "cache=always" option, which means: > cached values (both data and metadata) are always valid; i.e. changes > will be made only through this client and not through some other > channel (like the backing filesystem or another instance). > > Why is "cache=always" used? > > Thanks, > Miklos >