Re: [Cluster-devel] gfs2 iomap dealock, IOMAP_F_UNBALANCED

2019-03-21 Thread Andreas Gruenbacher
On Fri, 22 Mar 2019 at 00:01, Andreas Gruenbacher wrote: > On Thu, 21 Mar 2019 at 22:43, Dave Chinner wrote: > > The problem is calling balance_dirty_pages() inside the > > ->iomap_begin/->iomap_end calls and not that it is called by the > > iomap infrastructure itself, right? > > > > Is so, I'd

Re: [Cluster-devel] gfs2 iomap dealock, IOMAP_F_UNBALANCED

2019-03-21 Thread Andreas Gruenbacher
On Thu, 21 Mar 2019 at 22:43, Dave Chinner wrote: > The problem is calling balance_dirty_pages() inside the > ->iomap_begin/->iomap_end calls and not that it is called by the > iomap infrastructure itself, right? > > Is so, I'd prefer to see this in iomap_apply() after the call to >

Re: [Cluster-devel] gfs2 iomap dealock, IOMAP_F_UNBALANCED

2019-03-21 Thread Dave Chinner
On Thu, Mar 21, 2019 at 02:13:04PM +0100, Andreas Gruenbacher wrote: > Hi Christoph, > > we need your help fixing a gfs2 deadlock involving iomap. What's going > on is the following: > > * During iomap_file_buffered_write, gfs2_iomap_begin grabs the log flush > lock and keeps it until

Re: [Cluster-devel] [PATCH] vfs: Allow selection of fs root independent of sb

2019-03-21 Thread Matthew Wilcox
On Thu, Mar 21, 2019 at 05:26:44PM +, Andrew Price wrote: > Take a function pointer 'select_root' in vfs_get_block_super() to allow > callers to select the root dentry based on the context. Can't this be a fs_context_operations pointer?

Re: [Cluster-devel] [PATCH] vfs: Allow selection of fs root independent of sb

2019-03-21 Thread David Howells
That's not what I meant. There's a kerneldoc comment on vfs_get_block_super() that you need to modify. I would in any case roll your patch into mine. > This is intended for gfs2 to select between the normal root and the > 'meta' root, which must be done whether a root already exists for a >

[Cluster-devel] [PATCH] vfs: Allow selection of fs root independent of sb

2019-03-21 Thread Andrew Price
Take a function pointer 'select_root' in vfs_get_block_super() to allow callers to select the root dentry based on the context. This is intended for gfs2 to select between the normal root and the 'meta' root, which must be done whether a root already exists for a superblock or not, i.e. it cannot

Re: [Cluster-devel] [PATCH v2 1/2] gfs2: Convert gfs2 to fs_context

2019-03-21 Thread David Howells
Andrew Price wrote: > Would this fly? Can you update the comment to document what it's for? David

[Cluster-devel] gfs2 iomap dealock, IOMAP_F_UNBALANCED

2019-03-21 Thread Andreas Gruenbacher
Hi Christoph, we need your help fixing a gfs2 deadlock involving iomap. What's going on is the following: * During iomap_file_buffered_write, gfs2_iomap_begin grabs the log flush lock and keeps it until gfs2_iomap_end. It currently always does that even though there is no point other than

Re: [Cluster-devel] [PATCH v2 1/2] gfs2: Convert gfs2 to fs_context

2019-03-21 Thread Andrew Price
On 19/03/2019 17:53, Andrew Price wrote: On 19/03/2019 17:05, David Howells wrote: Can you use vfs_get_block_super()? It might be possible if we can rearrange things so that this can be done outside of the function:     if (args->ar_meta)     fc->root =