[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wh2dr=NgVSVj0sw-gSuzhxhLRV5FymfPS146zGgF4kBjA@mail.gmail.com>
Date: Thu, 16 Dec 2021 11:46:18 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Matthew Wilcox <willy@...radead.org>
Cc: David Howells <dhowells@...hat.com>, linux-cachefs@...hat.com,
Jeff Layton <jlayton@...nel.org>,
Marc Dionne <marc.dionne@...istor.com>,
linux-afs@...ts.infradead.org,
Trond Myklebust <trondmy@...merspace.com>,
Anna Schumaker <anna.schumaker@...app.com>,
Steve French <sfrench@...ba.org>,
Dominique Martinet <asmadeus@...ewreck.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Omar Sandoval <osandov@...ndov.com>,
JeffleXu <jefflexu@...ux.alibaba.com>,
"open list:NFS, SUNRPC, AND..." <linux-nfs@...r.kernel.org>,
CIFS <linux-cifs@...r.kernel.org>, ceph-devel@...r.kernel.org,
v9fs-developer@...ts.sourceforge.net,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 56/68] afs: Handle len being extending over page end in write_begin/write_end
On Thu, Dec 16, 2021 at 11:28 AM Matthew Wilcox <willy@...radead.org> wrote:
>
> Since ->write_begin is the place where we actually create folios, it
> needs to know what size folio to create. Unless you'd rather we do
> something to actually create the folio before calling ->write_begin?
I don't think we can create a folio before that, because the
filesystem may not even want a folio (think persistent memory or
whatever).
Honestly, I think you need to describe more what you actually want to
happen. Because generic_perform_write() has already decided to use a
PAGE_SIZE by the time write_begin() is called,
Right now the world order is "we chunk things by PAGE_SIZE", and
that's just how it is.
I can see other options - like the filesystem passing in the chunk
size when it calls generic_perform_write().
Or we make the rule be that ->write_begin() simply always is given the
whole area, and the filesystem can decide how it wants to chunk things
up, and return the size of the write chunk in the status (rather than
the current "success or error").
But at no point will this *EVER* be a "afs will limit the size to the
folio size" issue. Nothing like that will ever make sense. Allowing
bigger chunks will not be about any fscache issues, it will be about
every single filesystem that uses generic_perform_write().
So I will NAK these patches by David, because they are fundamentally
wrong, whichever way we turn. Any "write in bigger chunks" patch will
be something else entirely.
Linus
Powered by blists - more mailing lists