Re: [Cluster-devel] [PATCH v2] filelock: move file locking definitions to separate header file

2023-01-10 Thread Xiubo Li
On 06/01/2023 05:19, Jeff Layton wrote: The file locking definitions have lived in fs.h since the dawn of time, but they are only used by a small subset of the source files that include it. Move the file locking definitions to a new header file, and add the appropriate #include directives to

Re: [Cluster-devel] [PATCH v2] filelock: move file locking definitions to separate header file

2023-01-10 Thread Darrick J. Wong
On Thu, Jan 05, 2023 at 04:19:29PM -0500, Jeff Layton wrote: > The file locking definitions have lived in fs.h since the dawn of time, > but they are only used by a small subset of the source files that > include it. > > Move the file locking definitions to a new header file, and add the >

Re: [Cluster-devel] [PATCH v2] filelock: move file locking definitions to separate header file

2023-01-10 Thread Al Viro
On Thu, Jan 05, 2023 at 04:19:29PM -0500, Jeff Layton wrote: > The file locking definitions have lived in fs.h since the dawn of time, > but they are only used by a small subset of the source files that > include it. > > Move the file locking definitions to a new header file, and add the >

Re: [Cluster-devel] [PATCH v5 7/9] iomap/xfs: Eliminate the iomap_valid handler

2023-01-10 Thread Darrick J. Wong
On Sun, Jan 08, 2023 at 07:50:01PM +0100, Andreas Gruenbacher wrote: > On Sun, Jan 8, 2023 at 6:32 PM Christoph Hellwig wrote: > > On Wed, Jan 04, 2023 at 07:08:17PM +, Matthew Wilcox wrote: > > > On Wed, Jan 04, 2023 at 09:53:17AM -0800, Darrick J. Wong wrote: > > > > I wonder if this should

Re: [Cluster-devel] [RFC v6 04/10] iomap: Add iomap_get_folio helper

2023-01-10 Thread Christoph Hellwig
On Tue, Jan 10, 2023 at 01:34:16PM +, Matthew Wilcox wrote: > > Exactly. And as I already pointed out in reply to Dave's original > > patch what we really should be doing is returning an ERR_PTR from > > __filemap_get_folio instead of reverse-engineering the expected > > error code. > >

Re: [Cluster-devel] [RFC v6 04/10] iomap: Add iomap_get_folio helper

2023-01-10 Thread Matthew Wilcox
On Tue, Jan 10, 2023 at 12:46:45AM -0800, Christoph Hellwig wrote: > On Mon, Jan 09, 2023 at 01:46:42PM +0100, Andreas Gruenbacher wrote: > > We can handle that by adding a new IOMAP_NOCREATE iterator flag and > > checking for that in iomap_get_folio(). Your patch then turns into > > the below. >

Re: [Cluster-devel] [RFC v6 04/10] iomap: Add iomap_get_folio helper

2023-01-10 Thread Christoph Hellwig
On Mon, Jan 09, 2023 at 01:46:42PM +0100, Andreas Gruenbacher wrote: > We can handle that by adding a new IOMAP_NOCREATE iterator flag and > checking for that in iomap_get_folio(). Your patch then turns into > the below. Exactly. And as I already pointed out in reply to Dave's original patch

Re: [Cluster-devel] [RFC v6 04/10] iomap: Add iomap_get_folio helper

2023-01-10 Thread Andreas Grünbacher
Am Di., 10. Jan. 2023 um 09:52 Uhr schrieb Christoph Hellwig : > On Mon, Jan 09, 2023 at 01:46:42PM +0100, Andreas Gruenbacher wrote: > > We can handle that by adding a new IOMAP_NOCREATE iterator flag and > > checking for that in iomap_get_folio(). Your patch then turns into > > the below. > >

Re: [Cluster-devel] [RFC v6 08/10] iomap/xfs: Eliminate the iomap_valid handler

2023-01-10 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [Cluster-devel] [RFC v6 08/10] iomap/xfs: Eliminate the iomap_valid handler

2023-01-10 Thread Christoph Hellwig
On Mon, Jan 09, 2023 at 08:59:11AM +1100, Dave Chinner wrote: > Indeed, we also have this same "iomap valid check" functionality in the > writeback code as cached iomaps can become stale due to racing > writeback, truncated, etc. But you wouldn't know it by looking at the iomap > writeback code -

Re: [Cluster-devel] [RFC v6 06/10] iomap: Add __iomap_get_folio helper

2023-01-10 Thread Christoph Hellwig
On Sun, Jan 08, 2023 at 08:40:30PM +0100, Andreas Gruenbacher wrote: > +static struct folio *__iomap_get_folio(struct iomap_iter *iter, loff_t pos, > + size_t len) > +{ > + const struct iomap_page_ops *page_ops = iter->iomap.page_ops; > + > + if (page_ops &&