Commit fa71fefb authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov

ceph: redirty page when writepage_nounlock() skips unwritable page

Ceph needs to flush dirty page in the order in which in which snap
context they belong to. Dirty pages belong to older snap context
should be flushed earlier. if writepage_nounlock() can not flush a
page, it should redirty the page.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatar"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent f2b0c45f
...@@ -551,8 +551,9 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc) ...@@ -551,8 +551,9 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
dout("writepage %p page %p snapc %p not writeable - noop\n", dout("writepage %p page %p snapc %p not writeable - noop\n",
inode, page, snapc); inode, page, snapc);
/* we should only noop if called by kswapd */ /* we should only noop if called by kswapd */
WARN_ON((current->flags & PF_MEMALLOC) == 0); WARN_ON(!(current->flags & PF_MEMALLOC));
ceph_put_snap_context(oldest); ceph_put_snap_context(oldest);
redirty_page_for_writepage(wbc, page);
goto out; goto out;
} }
ceph_put_snap_context(oldest); ceph_put_snap_context(oldest);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment