The LFSCK modification will be sent to remote server when the
transaction stop, for sync transaction case, we can check the
dt_trans_stop() result.
If the lfsck_namespace_create_orphan_dir() failed, but we may
ignored that before because of ignoring dt_trans_stop result.
Then it may cause subsequent lfsck_namespace_insert_normal()
failed at LASSERT(lu_object_exists(o) != 0);
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: If897b7bd479ecdb61e6435f3177211f865a4e303
Reviewed-on: http://review.whamcloud.com/17042
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
int namelen;
int idx = 0;
int rc = 0;
+ int rc1 = 0;
ENTRY;
LASSERT(!dt_object_exists(orphan));
dt_write_unlock(env, orphan);
stop:
- dt_trans_stop(env, dev, th);
+ rc1 = dt_trans_stop(env, dev, th);
+ if (rc1 != 0 && rc > 0)
+ rc = rc1;
unlock1:
lfsck_unlock(llh);
struct osp_object *obj,
void *data, int index, int rc)
{
- if (rc != 0) {
+ if (rc != 0 && rc != -EEXIST) {
obj->opo_obj.do_lu.lo_header->loh_attr &= ~LOHA_EXISTS;
obj->opo_non_exist = 1;
}