Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-15 Thread Peng Tao
On Wed, Apr 14, 2021 at 9:20 PM Miklos Szeredi wrote: > > On Wed, Apr 14, 2021 at 2:22 PM Peng Tao wrote: > > > > > > --- a/fs/fuse/file.c > > > +++ b/fs/fuse/file.c > > > @@ -1117,17 +1117,12 @@ static ssize_t fuse_send_write_pages(str > > > count = ia->write.out.size; > > > for (i

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Miklos Szeredi
On Wed, Apr 14, 2021 at 2:22 PM Peng Tao wrote: > > > --- a/fs/fuse/file.c > > +++ b/fs/fuse/file.c > > @@ -1117,17 +1117,12 @@ static ssize_t fuse_send_write_pages(str > > count = ia->write.out.size; > > for (i = 0; i < ap->num_pages; i++) { > > struct page *page =

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Peng Tao
On Tue, Apr 13, 2021 at 5:42 PM Miklos Szeredi wrote: > > On Mon, Apr 12, 2021 at 3:23 PM Baolin Wang > wrote: > > > > Hi Miklos, > > > > 在 2021/3/27 14:36, Baolin Wang 写道: > > > We can meet below deadlock scenario when writing back dirty pages, and > > > writing files at the same time. The

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Baolin Wang
在 2021/4/14 17:47, Miklos Szeredi 写道: On Wed, Apr 14, 2021 at 11:22 AM Baolin Wang wrote: 在 2021/4/14 17:02, Miklos Szeredi 写道: On Wed, Apr 14, 2021 at 10:42 AM Baolin Wang wrote: Sorry I missed this patch before, and I've tested this patch, it seems can solve the deadlock issue I

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Miklos Szeredi
On Wed, Apr 14, 2021 at 11:22 AM Baolin Wang wrote: > > > > 在 2021/4/14 17:02, Miklos Szeredi 写道: > > On Wed, Apr 14, 2021 at 10:42 AM Baolin Wang > > wrote: > > > >> Sorry I missed this patch before, and I've tested this patch, it seems > >> can solve the deadlock issue I met before. > > > >

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Baolin Wang
在 2021/4/14 17:02, Miklos Szeredi 写道: On Wed, Apr 14, 2021 at 10:42 AM Baolin Wang wrote: Sorry I missed this patch before, and I've tested this patch, it seems can solve the deadlock issue I met before. Great, thanks for testing. But look at this patch in detail, I think this patch

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Miklos Szeredi
On Wed, Apr 14, 2021 at 10:42 AM Baolin Wang wrote: > Sorry I missed this patch before, and I've tested this patch, it seems > can solve the deadlock issue I met before. Great, thanks for testing. > But look at this patch in detail, I think this patch only reduced the > deadlock window, but

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Baolin Wang
Hi, 在 2021/4/13 16:57, Miklos Szeredi 写道: On Mon, Apr 12, 2021 at 3:23 PM Baolin Wang wrote: Hi Miklos, 在 2021/3/27 14:36, Baolin Wang 写道: We can meet below deadlock scenario when writing back dirty pages, and writing files at the same time. The deadlock scenario can be reproduced by: - A

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-13 Thread Miklos Szeredi
On Mon, Apr 12, 2021 at 3:23 PM Baolin Wang wrote: > > Hi Miklos, > > 在 2021/3/27 14:36, Baolin Wang 写道: > > We can meet below deadlock scenario when writing back dirty pages, and > > writing files at the same time. The deadlock scenario can be reproduced > > by: > > > > - A writeback worker

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-12 Thread Baolin Wang
Hi Miklos, 在 2021/3/27 14:36, Baolin Wang 写道: We can meet below deadlock scenario when writing back dirty pages, and writing files at the same time. The deadlock scenario can be reproduced by: - A writeback worker thread A is trying to write a bunch of dirty pages by fuse_writepages(), and the

[PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-03-27 Thread Baolin Wang
We can meet below deadlock scenario when writing back dirty pages, and writing files at the same time. The deadlock scenario can be reproduced by: - A writeback worker thread A is trying to write a bunch of dirty pages by fuse_writepages(), and the fuse_writepages() will lock one page (named page