Re: [fuse-devel] [fuse] getattr() results ignored when writeback cache is active

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sep 21 2017, Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
> Thanks for your feedback.  Fixed and expanded version:
>
> Fuse supports the following I/O modes:
>
> - direct-io
> - cached
>   + write-through
>   + writeback-cache
>
> The direct-io mode can be selected with the FOPEN_DIRECT_IO flag in the
> FUSE_OPEN reply.
>
> In direct-io mode the page cache is completely bypassed for reads and writes.
> No read-ahead takes place. Shared mmap is disabled.
>
> In cached mode reads may be satisfied from the page cache, and data may be
> read-ahead by the kernel to fill the cache.  The cache is always kept consistent
> after any writes to the file.  All mmap modes are supported.
>
> The cached mode has two sub modes controlling how writes are handled.  The
> write-through mode is the default and is supported on all kernels.  The
> writeback-cache mode may be selected by the FUSE_WRITEBACK_CACHE flag in the
> FUSE_INIT reply.
>
> In write-through mode each write is immediately sent to userspace as one or more
> WRITE requests, as well as updating any cached pages (and caching previously
> uncached, but fully written pages).  No READ requests are ever sent for writes,
> so when an uncached page is partially written, the page is discarded.
>
> In writeback-cache mode (enabled by the FUSE_WRITEBACK_CACHE flag) writes go to
> the cache only, which means that the write(2) syscall can often complete very
> fast.  Dirty pages are written back implicitly (background writeback or page
> reclaim on memory pressure) or explicitly (invoked by fsync(2)).

I think it would be useful to mention if the cache is flushed when the
file is not opened anymore, or (if not) to explicitly say that that's
not the case.

> This mode assumes that the file is never changed outside the mounted
> filesystem

This sounds a little awkward. How about "assumes that all changes to the
filesystem go through the FUSE kernel module"

> (the size time attributes are kept uptodate by the kernel),

"size and atime/ctime/mtime attributes", and I think "uptodate" should
be up-to-date.

> so it's not suitable for any any network filesystem

duplicated "any"


I think this is great. I may work on similar documentation for some of
the other stuff that currently lives only in include/fuse*.h


Best,
-Nikolaus

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

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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux