Whamcloud - gitweb
LU-9045 osp: Revert "LU-8840 osp: handle EA cache properly"
[fs/lustre-release.git] / lustre / osp / osp_object.c
index cb1c252..1fcbac7 100644 (file)
@@ -1092,6 +1092,16 @@ int osp_xattr_set(const struct lu_env *env, struct dt_object *dt,
        if (rc != 0)
                RETURN(rc);
 
+       /* Do not cache linkEA that may be self-adjusted by peers
+        * under EA overflow case. */
+       if (strcmp(name, XATTR_NAME_LINK) == 0) {
+               oxe = osp_oac_xattr_find(o, name, true);
+               if (oxe != NULL)
+                       osp_oac_xattr_put(oxe);
+
+               RETURN(0);
+       }
+
        oxe = osp_oac_xattr_find_or_add(o, name, buf->lb_len);
        if (oxe == NULL) {
                CWARN("%s: cannot cache xattr '%s' of "DFID"\n",
@@ -1233,6 +1243,8 @@ int osp_invalidate(const struct lu_env *env, struct dt_object *dt)
        struct osp_object *obj = dt2osp_obj(dt);
        ENTRY;
 
+       CDEBUG(D_HA, "Invalidate osp_object "DFID"\n",
+              PFID(lu_object_fid(&dt->do_lu)));
        osp_obj_invalidate_cache(obj);
 
        spin_lock(&obj->opo_lock);