]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: add retry logic for error -ERANGE in ceph_get_acl()
authorChengguang Xu <cgxu519@gmx.com>
Wed, 20 Jun 2018 07:42:55 +0000 (15:42 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 2 Aug 2018 19:26:11 +0000 (21:26 +0200)
commitfba41a5f30ca5246d36fb769601035ad58ba777d
treefc4fd28fdc63468a6ce162ba49fb623f742b3ffd
parentde609bdfc8e820be16305a09e9a073d207fbc9d8
ceph: add retry logic for error -ERANGE in ceph_get_acl()

When the size of acl extended attribution is larger than pre-allocated
value buffer size, we will hit error '-ERANGE' and it's probabaly caused
by concurrent get/set acl from different clients. In this case, current
logic just sets acl to NULL so that we cannot get proper information but
the operation looks successful.

This patch adds retry logic for error -ERANGE and return -EIO if fail
from the retry. Additionally, print real errno when failing from
__ceph_getxattr().

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/acl.c