• Jeff Layton's avatar
    Revert "ceph: SetPageError() for writeback pages if writepages fails" · 6fc1fe5e
    Jeff Layton authored
    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
    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: default avatarJeff Layton <jlayton@redhat.com>
    Reviewed-by: default avatar"Yan, Zheng” <zyan@redhat.com>
    Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
    6fc1fe5e
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...