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)
commitf017754d6919f3bd9786710b07b4708293594f20
treefc4fd28fdc63468a6ce162ba49fb623f742b3ffd
parentacb1872577b346bd15ab3a3f8dff780d6cca4b70
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