On Sep 24 2018, Miklos Szeredi <miklos@xxxxxxxxxx> wrote: > On Mon, Sep 24, 2018 at 10:06 AM, Nikolaus Rath <Nikolaus@xxxxxxxx> 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.«