https://bugzilla.kernel.org/show_bug.cgi?id=216050
--- Comment #131 from Jaegeuk Kim (jaeg...@kernel.org) --- Re Comment #122, By any chance, could you add a code to print "page->mapping->host->i_ino" if page->mapping->host exists, and the status of PageUptodate(page)? When GC tries to move the valid block, if the block was truncated and somehow MM gives a stale page, we may hit a loop? How about this to report the error to GC? GC will skip this migration and will do it later or skip it, if the block was really truncated. --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1325,18 +1325,14 @@ struct page *f2fs_get_lock_data_page(struct inode *inode, pgoff_t index, { struct address_space *mapping = inode->i_mapping; struct page *page; -repeat: + page = f2fs_get_read_data_page(inode, index, 0, for_write, NULL); if (IS_ERR(page)) return page; /* wait for read completion */ lock_page(page); - if (unlikely(page->mapping != mapping)) { - f2fs_put_page(page, 1); - goto repeat; - } - if (unlikely(!PageUptodate(page))) { + if (unlikely(page->mapping != mapping || !PageUptodate(page))) { f2fs_put_page(page, 1); return ERR_PTR(-EIO); } -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel