Re: [PATCH] [fuse] alloc_page nofs avoid deadlock

From: Miklos Szeredi
Date: Mon Jun 13 2022 - 04:45:38 EST


On Fri, 10 Jun 2022 at 09:48, Ed Tsai <ed.tsai@xxxxxxxxxxxx> wrote:

> Recently, we get this deadlock issue again. fuse_flush_time_update()
> use sync_inode_metadata() and it only write the metadata, so the
> writeback worker could still be blocked becaused of file data.
>
> I try to use write_inode_now() instead of sync_inode_metadata() and the
> writeback thread will not be blocked anymore. I don't think this is a
> good solution, but this confirm that there is still a potential
> deadlock because of file data. WDYT.

I'm not sure how that happens. Normally writeback doesn't block. Can
you provide the stack traces of all related tasks in the deadlock?

Thanks,
Miklos