Re: [fuse-devel] [PATCH] fuse: avoid deadlock when write fuse inode
From: Miklos Szeredi <miklos@szeredi.hu>
Date: 2021-03-24 15:29:52
Also in:
linux-fsdevel, lkml
From: Miklos Szeredi <miklos@szeredi.hu>
Date: 2021-03-24 15:29:52
Also in:
linux-fsdevel, lkml
On Tue, Feb 2, 2021 at 5:41 AM Huang Jianan via fuse-devel [off-list ref] wrote:
We found the following deadlock situations in low memory scenarios:
Thread A Thread B
- __writeback_single_inode
- fuse_write_inode
- fuse_simple_request
- __fuse_request_send
- request_wait_answer
- fuse_dev_splice_read
- fuse_copy_fill
- __alloc_pages_direct_reclaim
- do_shrink_slab
- super_cache_scan
- shrink_dentry_list
- dentry_unlink_inode
- iput_final
- inode_wait_for_writebackOn what kernel are you seeing this? I don't see how it can happen on upstream kernels, since there's a "write_inode_now(inode, 1)" call in fuse_release() and nothing can dirty the inode after the file has been released. Thanks, Miklos