linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolaus Rath <Nikolaus@rath.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: fuse-devel <fuse-devel@lists.sourceforge.net>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [fuse-devel] [fuse] What happens with dirty pages on NOTIFY_INVAL_INODE?
Date: Mon, 24 Sep 2018 09:43:00 +0100	[thread overview]
Message-ID: <87sh1zs2uj.fsf@thinkpad.rath.org> (raw)
In-Reply-To: <CAJfpegtXV62VBT4XjfrZ3NJnCpu3pkpirYw8D1obvjWssc7yZQ@mail.gmail.com> (Miklos Szeredi's message of "Mon, 24 Sep 2018 10:22:07 +0200")

On Sep 24 2018, Miklos Szeredi <miklos@szeredi.hu> wrote:
> On Mon, Sep 24, 2018 at 10:06 AM, Nikolaus Rath <Nikolaus@rath.org> 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

-- 
GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«

  reply	other threads:[~2018-09-24 14:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-24  8:06 [fuse] What happens with dirty pages on NOTIFY_INVAL_INODE? Nikolaus Rath
2018-09-24  8:22 ` Miklos Szeredi
2018-09-24  8:43   ` Nikolaus Rath [this message]
2018-09-24 13:38     ` [fuse-devel] " Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sh1zs2uj.fsf@thinkpad.rath.org \
    --to=nikolaus@rath.org \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).