aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2019-01-08 19:47:38 +0100
committerIlya Dryomov <idryomov@gmail.com>2019-01-10 09:45:09 +0100
commit85f5a4d666fd9be73856ed16bb36c5af5b406b29 (patch)
tree478748726b2075e0db2221d2553d46aa38f4edd5 /include
parentceph: use vmf_error() in ceph_filemap_fault() (diff)
downloadlinux-dev-85f5a4d666fd9be73856ed16bb36c5af5b406b29.tar.xz
linux-dev-85f5a4d666fd9be73856ed16bb36c5af5b406b29.zip
rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
There is a window between when RBD_DEV_FLAG_REMOVING is set and when the device is removed from rbd_dev_list. During this window, we set "already" and return 0. Returning 0 from write(2) can confuse userspace tools because 0 indicates that nothing was written. In particular, "rbd unmap" will retry the write multiple times a second: 10:28:05.463299 write(4, "0", 1) = 0 10:28:05.463509 write(4, "0", 1) = 0 10:28:05.463720 write(4, "0", 1) = 0 10:28:05.463942 write(4, "0", 1) = 0 10:28:05.464155 write(4, "0", 1) = 0 Cc: stable@vger.kernel.org Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Tested-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions