Reset the do_body_ops from osd_body_ops_new to
osd_body_ops after object creation succeeds.
Otherwise in OUT handler, if creation the llog object
and write records to the llog object are in the same
transaction(one updates handling process), the object
will not have create do_body_ops in write update.
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Id45f1a29572faadc381194f45a980eb58d193e93
Reviewed-on: http://review.whamcloud.com/15595
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
RETURN(-EPERM);
result = __osd_object_create(info, obj, attr, hint, dof, th);
- if (result == 0)
+ if (result == 0) {
result = __osd_oi_insert(env, obj, fid, th);
-
+ if (obj->oo_dt.do_body_ops == &osd_body_ops_new)
+ obj->oo_dt.do_body_ops = &osd_body_ops;
+ }
LASSERT(ergo(result == 0,
dt_object_exists(dt) && !dt_object_remote(dt)));
fid, OI_CHECK_FLD) ?
LMAC_FID_ON_OST : 0, 0);
}
+ if (obj->oo_dt.do_body_ops == &osd_body_ops_new)
+ obj->oo_dt.do_body_ops = &osd_body_ops;
}
if (result == 0)