Re: [PATCH] Btrfs: add another missing end_page_writeback on submit_extent_page failure

2017-02-04 Thread takafumi-sslab
(But it could be changed after subpagesize block patchset, and there is more work rather than just adding a end_page_writeback, e.g. writepage endio also needs to be updated). Ok... the discussion become complicated. So, let me make this clear. you think a) this is a bug; we need to clear the

Re: [PATCH] Btrfs: add another missing end_page_writeback on submit_extent_page failure

2017-02-01 Thread Liu Bo
On Wed, Feb 01, 2017 at 12:27:24PM +0900, takafumi-sslab wrote: > Thanks for your reply. > > I think you mentioned about the below if-block in __extent_writepage(). > > if (nr == 0) { > /* make sure the mapping tag for page dirty gets cleared */ > set_page_writeback(page); >

Re: [PATCH] Btrfs: add another missing end_page_writeback on submit_extent_page failure

2017-01-31 Thread takafumi-sslab
Thanks for your reply. I think you mentioned about the below if-block in __extent_writepage(). if (nr == 0) { /* make sure the mapping tag for page dirty gets cleared */ set_page_writeback(page); end_page_writeback(page); } However, this if-block only works when nr is 0,

Re: [PATCH] Btrfs: add another missing end_page_writeback on submit_extent_page failure

2017-01-30 Thread Liu Bo
On Fri, Jan 13, 2017 at 03:12:31PM +0900, takafumi-sslab wrote: > Thanks for your replying. > > I understand this bug is more complicated than I expected. > I classify error cases under submit_extent_page() below > > A: ENOMEM error at btrfs_bio_alloc() in submit_extent_page() > I first assumed t

Re: [PATCH] Btrfs: add another missing end_page_writeback on submit_extent_page failure

2017-01-12 Thread takafumi-sslab
Thanks for your replying. I understand this bug is more complicated than I expected. I classify error cases under submit_extent_page() below A: ENOMEM error at btrfs_bio_alloc() in submit_extent_page() I first assumed this case and sent the mail. When bio_ret is NULL, submit_extent_page() calls

Re: [PATCH] Btrfs: add another missing end_page_writeback on submit_extent_page failure

2016-12-21 Thread Liu Bo
On Fri, Dec 16, 2016 at 03:41:50PM +0900, Takafumi Kubota wrote: > This is actually inspired by Filipe's patch(55e3bd2e0c2e1). > > When submit_extent_page() in __extent_writepage_io() fails, > Btrfs misses clearing a writeback bit of the failed page. > This causes the false under-writeback page. >

[PATCH] Btrfs: add another missing end_page_writeback on submit_extent_page failure

2016-12-15 Thread Takafumi Kubota
This is actually inspired by Filipe's patch(55e3bd2e0c2e1). When submit_extent_page() in __extent_writepage_io() fails, Btrfs misses clearing a writeback bit of the failed page. This causes the false under-writeback page. Then, another sync task hangs in filemap_fdatawait_range(), because it waits