Commit 6fc1fe5e authored by Jeff Layton's avatar Jeff Layton Committed by Ilya Dryomov

Revert "ceph: SetPageError() for writeback pages if writepages fails"

This reverts commit b109eec6.

If I'm filling up a filesystem with this sort of command:

    $ dd if=/dev/urandom of=/mnt/cephfs/fillfile bs=2M oflag=sync

...then I'll eventually get back EIO on a write. Further calls
will give us ENOSPC.

I'm not sure what prompted this change, but I don't think it's what we
want to do. If writepages failed, we will have already set the mapping
error appropriately, and that's what gets reported by fsync() or

__filemap_fdatawait_range however, does this:

	if (TestClearPageError(page))
		ret = -EIO;

...and that -EIO ends up trumping the mapping's error if one exists.

When writepages fails, we only want to set the error in the mapping,
and not flag the individual pages.
Signed-off-by: default avatarJeff Layton <>
Reviewed-by: default avatar"Yan, Zheng” <>
Signed-off-by: default avatarIlya Dryomov <>
parent 92475f05
......@@ -703,9 +703,6 @@ static void writepages_finish(struct ceph_osd_request *req)
if (rc < 0)
page->private = 0;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment