From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:39719 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726241AbeIXOoA (ORCPT ); Mon, 24 Sep 2018 10:44:00 -0400 From: Nikolaus Rath To: Miklos Szeredi Cc: fuse-devel , linux-fsdevel Subject: Re: [fuse-devel] [fuse] What happens with dirty pages on NOTIFY_INVAL_INODE? References: <87worbs4ju.fsf@thinkpad.rath.org> Date: Mon, 24 Sep 2018 09:43:00 +0100 In-Reply-To: (Miklos Szeredi's message of "Mon, 24 Sep 2018 10:22:07 +0200") Message-ID: <87sh1zs2uj.fsf@thinkpad.rath.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sep 24 2018, Miklos Szeredi wrote: > On Mon, Sep 24, 2018 at 10:06 AM, Nikolaus Rath wrote: >> Hi, >> >> What happens with dirty pages when a (writeback-cache enabled) FUSE >> filesystem sends a NOTIFY_INVAL_INODE request? Are they dropped? >> flushed? > > Haven't tried, but AFAICS it flushes dirty pages and waits on > writeback for these. "waits on writeback" means "wait until the write requests have completed"? > However, it doesn't wait on already queued > writes. So it's a bit of a mess at the moment. > >> >> To me neither behaviour seems correct... > > What would be the correct operation be if neither flushing not > dropping them is correct? What about returning an error? My thinking is that if the filesystem issues an inval request, then the data has already been changed/disappeared. So a writeback at this point would most likely not do the right thing - since it would partially write back old data that has actually been mutated. Similarly, just dropping the cache seems bad because most likely this causes data loss for the new data that hasn't been flushed. Best, -Nikolaus --=20 GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB