Skip to content

Commit

Permalink
Revert "ceph: SetPageError() for writeback pages if writepages fails"
Browse files Browse the repository at this point in the history
This reverts commit b109eec.

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
close().

__filemap_fdatawait_range however, does this:

	wait_on_page_writeback(page);
	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: Jeff Layton <jlayton@redhat.com>
Reviewed-by: "Yan, Zheng” <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
Jeff Layton authored and Ilya Dryomov committed May 4, 2017
1 parent 92475f0 commit 6fc1fe5
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,6 @@ static void writepages_finish(struct ceph_osd_request *req)
clear_bdi_congested(&fsc->backing_dev_info,
BLK_RW_ASYNC);

if (rc < 0)
SetPageError(page);

ceph_put_snap_context(page_snap_context(page));
page->private = 0;
ClearPagePrivate(page);
Expand Down

0 comments on commit 6fc1fe5

Please sign in to comment.