Whamcloud - gitweb
LU-10132 llite: handle xattr cache refill race 95/29795/2
authorJohn L. Hammond <john.hammond@intel.com>
Tue, 17 Oct 2017 20:32:52 +0000 (15:32 -0500)
committerJohn L. Hammond <john.hammond@intel.com>
Wed, 1 Nov 2017 12:40:17 +0000 (12:40 +0000)
In ll_xattr_cache_refill() if the xattr cache was invalid (and no
request was sent) then return -EAGAIN so that ll_getxattr_common()
caller will fetch the xattr from the MDT.

Lustre-change: https://review.whamcloud.com/#/c/29654/
Lustre-commit: 9cc8c3a20c547ec75325dde3dd17f4b1dcc66348

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ia9ec7424e8786d92bdecf4897fafcf71d5061fb1
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29795
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/llite/xattr_cache.c

index d1527c9..a001e5c 100644 (file)
@@ -402,7 +402,7 @@ static int ll_xattr_cache_refill(struct inode *inode)
        if (unlikely(req == NULL)) {
                CDEBUG(D_CACHE, "cancelled by a parallel getxattr\n");
                ll_intent_drop_lock(&oit);
-               GOTO(err_unlock, rc = -EIO);
+               GOTO(err_unlock, rc = -EAGAIN);
        }
 
        body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);