Re: [Cluster-devel] [PATCH 16/17] block: use iomap for writes to block devices

2023-05-23 Thread Dave Chinner
On Fri, May 19, 2023 at 04:22:01PM +0200, Hannes Reinecke wrote: > On 4/24/23 07:49, Christoph Hellwig wrote: > > Use iomap in buffer_head compat mode to write to block devices. > > > > Signed-off-by: Christoph Hellwig > > --- > > block/Kconfig | 1 + > > block/fops.c | 33

Re: [Cluster-devel] [PATCH 06/32] sched: Add task_struct->faults_disabled_mapping

2023-05-23 Thread Christoph Hellwig
On Tue, May 23, 2023 at 03:34:31PM +0200, Jan Kara wrote: > I've checked the code and AFAICT it is all indeed handled. BTW, I've now > remembered that GFS2 has dealt with the same deadlocks - b01b2d72da25 > ("gfs2: Fix mmap + page fault deadlocks for direct I/O") - in a different > way (by

Re: [Cluster-devel] [PATCH 06/32] sched: Add task_struct->faults_disabled_mapping

2023-05-23 Thread Kent Overstreet
> > No, that's definitely handled (and you can see it in the code I linked), > > and I wrote a torture test for fstests as well. > > I've checked the code and AFAICT it is all indeed handled. BTW, I've now > remembered that GFS2 has dealt with the same deadlocks - b01b2d72da25 > ("gfs2: Fix mmap

Re: [Cluster-devel] [PATCH 06/32] sched: Add task_struct->faults_disabled_mapping

2023-05-23 Thread Kent Overstreet
On Tue, May 23, 2023 at 09:21:56AM -0700, Christoph Hellwig wrote: > On Tue, May 23, 2023 at 03:34:31PM +0200, Jan Kara wrote: > > I've checked the code and AFAICT it is all indeed handled. BTW, I've now > > remembered that GFS2 has dealt with the same deadlocks - b01b2d72da25 > > ("gfs2: Fix mmap

Re: [Cluster-devel] [PATCH 10/13] fs: factor out a direct_write_fallback helper

2023-05-23 Thread Christoph Hellwig
On Mon, May 22, 2023 at 04:19:38PM +0200, Miklos Szeredi wrote: > > + ssize_t direct_written, ssize_t buffered_written) > > +{ > > + struct address_space *mapping = iocb->ki_filp->f_mapping; > > + loff_t pos = iocb->ki_pos, end; > > At this point pos will point after the

Re: [Cluster-devel] [PATCH 08/13] iomap: assign current->backing_dev_info in iomap_file_buffered_write

2023-05-23 Thread Christoph Hellwig
On Tue, May 23, 2023 at 04:30:51AM +0100, Matthew Wilcox wrote: > AFAICT (the code went through some metamorphoses in the intervening > twenty years), the last use of it ended up in current_may_throttle(), > and it was removed in March 2022 by Neil Brown in commit b9b1335e6403. > Since then, there

Re: [Cluster-devel] [PATCH 07/13] iomap: update ki_pos in iomap_file_buffered_write

2023-05-23 Thread Christoph Hellwig
On Mon, May 22, 2023 at 09:01:05AM +0900, Damien Le Moal wrote: > > - int ret; > > + ssize_t ret; > > > > if (iocb->ki_flags & IOCB_NOWAIT) > > iter.flags |= IOMAP_NOWAIT; > > > > while ((ret = iomap_iter(, ops)) > 0) > > iter.processed = iomap_write_iter(,

Re: [Cluster-devel] [PATCH 06/13] filemap: add a kiocb_invalidate_post_write helper

2023-05-23 Thread Christoph Hellwig
On Mon, May 22, 2023 at 08:56:34AM +0900, Damien Le Moal wrote: > On 5/19/23 18:35, Christoph Hellwig wrote: > > Add a helper to invalidate page cache after a dio write. > > > > Signed-off-by: Christoph Hellwig > > Nit: kiocb_invalidate_post_dio_write() may be a better name to be explicit >

Re: [Cluster-devel] [PATCH 06/32] sched: Add task_struct->faults_disabled_mapping

2023-05-23 Thread Jan Kara
On Wed 10-05-23 02:18:45, Kent Overstreet wrote: > On Wed, May 10, 2023 at 03:07:37AM +0200, Jan Kara wrote: > > On Tue 09-05-23 12:56:31, Kent Overstreet wrote: > > > From: Kent Overstreet > > > > > > This is used by bcachefs to fix a page cache coherency issue with > > > O_DIRECT writes. > > >

Re: [Cluster-devel] [PATCH 5/6] gfs2: Support ludicrously large folios in gfs2_trans_add_databufs()

2023-05-23 Thread Matthew Wilcox
On Tue, May 23, 2023 at 02:46:07PM +0200, Andreas Gruenbacher wrote: > > void gfs2_trans_add_databufs(struct gfs2_inode *ip, struct folio *folio, > > -unsigned int from, unsigned int len) > > +size_t from, size_t len) > > { > >

Re: [Cluster-devel] [PATCH 5/6] gfs2: Support ludicrously large folios in gfs2_trans_add_databufs()

2023-05-23 Thread Andreas Gruenbacher
On Wed, May 17, 2023 at 5:24 AM Matthew Wilcox (Oracle) wrote: > We may someday support folios larger than 4GB, so use a size_t for > the byte count within a folio to prevent unpleasant truncations. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > fs/gfs2/aops.c | 2 +- > fs/gfs2/aops.h | 2