]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: when seeing write errors on an inode, switch to sync writes
authorJeff Layton <jlayton@redhat.com>
Tue, 4 Apr 2017 12:39:46 +0000 (08:39 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 4 May 2017 07:19:22 +0000 (09:19 +0200)
commit32c4b06739205e3a11eaafe20f93dc270f98f19f
tree72810f59f5735dad3b29c5a127ae2a823fc1ff1d
parent18d8116a11bffcec44000317c9b8bf9fa9f70b85
ceph: when seeing write errors on an inode, switch to sync writes

Currently, we don't have a real feedback mechanism in place for when we
start seeing buffered writeback errors. If writeback is failing, there
is nothing that prevents an application from continuing to dirty pages
that aren't being cleaned.

In the event that we're seeing write errors of any sort occur on an
inode, have the callback set a flag to force further writes to be
synchronous. When the next write succeeds, clear the flag to allow
buffered writeback to continue.

Since this is just a hint to the write submission mechanism, we only
take the i_ceph_lock when a lockless check shows that the flag needs to
be changed.

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
fs/ceph/file.c
fs/ceph/super.h