* Why doesn't FUSE use stable writes?
@ 2023-12-16 1:05 Matthew Wilcox
2023-12-16 9:33 ` Miklos Szeredi
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2023-12-16 1:05 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: linux-fsdevel
I'm looking at fuse_writepage_locked() and it allocates a new page, then
copies from the page cache into that page before sending that page to
userspace. I imagine you want to prevent torn writes, so why not set
SB_I_STABLE_WRITES instead of having this memcpy?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Why doesn't FUSE use stable writes?
2023-12-16 1:05 Why doesn't FUSE use stable writes? Matthew Wilcox
@ 2023-12-16 9:33 ` Miklos Szeredi
0 siblings, 0 replies; 2+ messages in thread
From: Miklos Szeredi @ 2023-12-16 9:33 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-fsdevel
On Sat, 16 Dec 2023 at 02:06, Matthew Wilcox <willy@infradead.org> wrote:
>
>
> I'm looking at fuse_writepage_locked() and it allocates a new page, then
> copies from the page cache into that page before sending that page to
> userspace. I imagine you want to prevent torn writes, so why not set
> SB_I_STABLE_WRITES instead of having this memcpy?
It's not as simple as that. Fuse wants to do its writes independently
of the mm's reclaim mechanisms so that it doesn't get into the sort of
deadlock that PF_MEMALLOC is supposed to prevent inside the kernel. I
don't remember the details, but the last time I looked this issue
(which wasn't recently) there was no feasible alternative to copying
the page.
Thanks,
Miklos
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-16 9:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-16 1:05 Why doesn't FUSE use stable writes? Matthew Wilcox
2023-12-16 9:33 ` Miklos Szeredi
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).