Return-Path: Received: from mail-ve1eur01on0138.outbound.protection.outlook.com ([104.47.1.138]:63616 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966056AbdIZGzT (ORCPT ); Tue, 26 Sep 2017 02:55:19 -0400 Subject: Re: [fuse-devel] [fuse] getattr() results ignored when writeback cache is active To: Nikolaus Rath References: <87zi9pk2ra.fsf@vostro.rath.org> <87vakdjsjj.fsf@vostro.rath.org> <87y3p8uzpw.fsf@vostro.rath.org> <11acc9f1-12e5-9806-48ff-de261acae979@virtuozzo.com> <87wp4s9bva.fsf@vostro.rath.org> <97fa18f6-84ab-7723-42a8-84e2bc2d92ed@virtuozzo.com> <87o9q3aop8.fsf@vostro.rath.org> <87lgl7ame3.fsf@vostro.rath.org> <87shffyt48.fsf@vostro.rath.org> Cc: mszeredi@redhat.com, "fuse-devel@lists.sourceforge.net" , linux-fsdevel From: Maxim Patlasov Message-ID: Date: Tue, 26 Sep 2017 09:55:11 +0300 MIME-Version: 1.0 In-Reply-To: <87shffyt48.fsf@vostro.rath.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 09/22/2017 12:34 PM, Nikolaus Rath wrote: > On Sep 21 2017, Maxim Patlasov wrote: >> Oh, I understand now. Your example actually demonstrates that >> FUSE_WRITEBACK_CACHE must not be used if it's possible to modify >> underlying data (/tmp/issue_93/file_1) externally w.r.t fuse >> filesystem. That's correct. But initial statement: >> >>> this mode of operation is not suitable for any network filesystem >>> even if no write operations are actually carried out >> is not, because it's not impossible to protect underlying data against >> such an external change somehow. A network filesystem is not obliged >> to keep transparent correspondence like /tmp/issue_93_mnt/file_1 <--> >> /tmp/issue_93/file_1. It can keep all user data (and metadata) in >> internal structures making any external modifications >> impossible. Then, implementing exclusive write semantics would make >> using FUSE_WRITEBACK_CACHE safe. Agree? > I agree with what you're saying, but I don't agree that this should go > into the documentation for which the sentence in dispute was intended > :-). I think in 93% of all cases, the simplified statement will be more > helpful to a potential FUSE user than the correct one. > > If this bothers you a lot, can we compromise and just be a little more > vague overall? I.e., > > | This mode of operation is therefore generally not suitable for > | filesystems where modifications may not come through the (local) FUSE > | layer (i.e, most network filesystems). The way how Miklos conveyed it: > This mode > assumes that all changes to the filesystem go through the FUSE kernel module > (size and atime/ctime/mtime attributes are kept up-to-date by the kernel), so > it's generally not suitable for network filesystems. looks perfect. Thank you! Maxim