linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Jiachen Zhang <zhangjiachen.jaycee@bytedance.com>,
	Miklos Szeredi <miklos@szeredi.hu>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: me@jcix.top
Subject: Re: [PATCH 5/5] docs: fuse: improve FUSE consistency explanation
Date: Mon, 10 Jul 2023 21:42:39 -0700	[thread overview]
Message-ID: <36b37893-c297-dab0-df2d-eeacfa1e06c0@infradead.org> (raw)
In-Reply-To: <20230711043405.66256-6-zhangjiachen.jaycee@bytedance.com>

Hi--

On 7/10/23 21:34, Jiachen Zhang wrote:
> Signed-off-by: Jiachen Zhang <zhangjiachen.jaycee@bytedance.com>
> ---
>  Documentation/filesystems/fuse-io.rst | 32 +++++++++++++++++++++++++--
>  1 file changed, 30 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/filesystems/fuse-io.rst b/Documentation/filesystems/fuse-io.rst
> index 255a368fe534..cdd292dd2e9c 100644
> --- a/Documentation/filesystems/fuse-io.rst
> +++ b/Documentation/filesystems/fuse-io.rst

> @@ -24,7 +31,8 @@ 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.
> +FUSE_INIT reply. In either modes, if the FOPEN_KEEP_CACHE flag is not set in

                       either mode,

> +the FUSE_OPEN, cached pages of the file will be invalidated immediatedly.

                                                               immediately.

>  
>  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
> @@ -38,7 +46,27 @@ reclaim on memory pressure) or explicitly (invoked by close(2), fsync(2) and
>  when the last ref to the file is being released on munmap(2)).  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.  If a partial page is
> +it's generally not suitable for network filesystems (you can consider the
> +writeback-cache-v2 mode mentioned latter for them).  If a partial page is

                                     later

>  written, then the page needs to be first read from userspace.  This means, that
>  even for files opened for O_WRONLY it is possible that READ requests will be
>  generated by the kernel.


-- 
~Randy

  reply	other threads:[~2023-07-11  4:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11  4:34 [PATCH 0/5] FUSE consistency improvements Jiachen Zhang
2023-07-11  4:34 ` [PATCH 1/5] fuse: check attributes staleness on fuse_iget() Jiachen Zhang
2023-08-23  8:57   ` Miklos Szeredi
2023-07-11  4:34 ` [PATCH 2/5] fuse: invalidate dentry on EEXIST creates or ENOENT deletes Jiachen Zhang
2023-08-16 12:27   ` Miklos Szeredi
2023-07-11  4:34 ` [PATCH 3/5] fuse: add FOPEN_INVAL_ATTR Jiachen Zhang
2023-08-23  9:01   ` Miklos Szeredi
2023-08-23 11:12     ` Jiachen Zhang
2023-07-11  4:34 ` [PATCH 4/5] fuse: writeback_cache consistency enhancement (writeback_cache_v2) Jiachen Zhang
2023-08-23  9:07   ` Miklos Szeredi
2023-08-23 10:35     ` Bernd Schubert
2023-08-23 10:59       ` Jiachen Zhang
2023-08-23 22:55         ` Bernd Schubert
2023-07-11  4:34 ` [PATCH 5/5] docs: fuse: improve FUSE consistency explanation Jiachen Zhang
2023-07-11  4:42   ` Randy Dunlap [this message]
2023-07-11  7:15     ` Jiachen Zhang
2023-07-14  5:50 ` [PATCH 0/5] FUSE consistency improvements Jingbo Xu

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=36b37893-c297-dab0-df2d-eeacfa1e06c0@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@jcix.top \
    --cc=miklos@szeredi.hu \
    --cc=zhangjiachen.jaycee@bytedance.com \
    /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).