• 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
..
Kconfig Loading commit data...
Makefile Loading commit data...
acl.c Loading commit data...
addr.c Loading commit data...
cache.c Loading commit data...
cache.h Loading commit data...
caps.c Loading commit data...
ceph_frag.c Loading commit data...
debugfs.c Loading commit data...
dir.c Loading commit data...
export.c Loading commit data...
file.c Loading commit data...
inode.c Loading commit data...
ioctl.c Loading commit data...
ioctl.h Loading commit data...
locks.c Loading commit data...
mds_client.c Loading commit data...
mds_client.h Loading commit data...
mdsmap.c Loading commit data...
snap.c Loading commit data...
strings.c Loading commit data...
super.c Loading commit data...
super.h Loading commit data...
xattr.c Loading commit data...