OSP should also cache non-exist EA, otherwise
it will keep sending RPC to try to get remote
non-exist EA.
So if default stripe EA does not exist on root
MDT, file creation on non-root MDT will always
try to send extra OSP RPC to get the EA.
This patch also fixes a LFSCK bug that may cause
the LFSCK repaired items to be counted repeately.
Test-Parameters: mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs mdscount=2 mdtcount=4 testlist=sanity-lfsck,sanity-lfsck,sanity-lfsck
Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: Ie9c8cb5fd54e404f1af97de47e809f6f96de8d86
Reviewed-on: https://review.whamcloud.com/29078
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
ll_lmv_updated:1,
ll_inline:1,
ll_failed:1,
- ll_ignore:1;
+ ll_ignore:1,
+ ll_counted:1;
struct lfsck_slave_lmv_rec *ll_lslr; /* may be vmalloc'd */
};
lfsck_lmv_put(env, llmv);
} else {
ns->ln_striped_dirs_repaired++;
+ llmv->ll_counted = 1;
spin_lock(&lfsck->li_lock);
list_add_tail(&llu->llu_link, &lfsck->li_list_lmv);
spin_unlock(&lfsck->li_lock);
RETURN(rc);
ns->ln_striped_dirs_scanned++;
- ns->ln_striped_dirs_repaired++;
+ if (!llmv->ll_counted)
+ ns->ln_striped_dirs_repaired++;
}
fld_range_set_mdt(range);
rc = object_update_result_data_get(reply, rbuf, 0);
if (rc < 0 || rbuf->lb_len == 0) {
+ if (oxe == NULL && rc == -ENODATA) {
+ oxe = osp_oac_xattr_find_or_add(obj, name, buf->lb_len);
+ if (oxe == NULL) {
+ rc = -ENOMEM;
+ CWARN("%s: Fail to add xattr (%s) to cache for "
+ DFID" (1): rc = %d\n", dname, name,
+ PFID(lu_object_fid(&dt->do_lu)), rc);
+ GOTO(out, rc);
+ }
+ }
+
if (oxe) {
spin_lock(&obj->opo_lock);
if (unlikely(rc == -ENODATA)) {