]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "ceph: SetPageError() for writeback pages if writepages fails"
authorJeff Layton <jlayton@redhat.com>
Tue, 4 Apr 2017 12:39:44 +0000 (08:39 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 4 May 2017 07:19:22 +0000 (09:19 +0200)
commit18d8116a11bffcec44000317c9b8bf9fa9f70b85
tree80c3320c80480827a86fe8274cf6e064e2be6b14
parent6b478e93b13a67c670f617d093dc83bb196ef44e
Revert "ceph: SetPageError() for writeback pages if writepages fails"

This reverts commit 285e5503021422c3ffe888faaacba91f04712f48.

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>
fs/ceph/addr.c