that was implemented as tracking first and last lock of each lock group
the patch changes that to using doubly linked lists
+Severity : normal
+Bugzilla : 15574
+Description: MDS LBUG: ASSERTION(!IS_ERR(dchild))
+Details : Change LASSERTs to client eviction (i.e. abort client's recovery)
+ because LASSERT on both the data supplied by a client, and the data
+ on disk is dangerous and incorrect.
+
--------------------------------------------------------------------------------
2007-08-10 Cluster File Systems, Inc. <info@clusterfs.com>
GOTO(out, rc = req->rq_status);
if (mdt_get_disposition(ldlm_rep, DISP_OPEN_CREATE)) {
+ struct obd_export *exp = req->rq_export;
/*
* We failed after creation, but we do not know in which step
* we failed. So try to check the child object.
*/
parent = mdt_object_find(env, mdt, rr->rr_fid1);
- LASSERT(!IS_ERR(parent));
-
+ if (IS_ERR(parent)) {
+ rc = PTR_ERR(parent);
+ LCONSOLE_WARN("Parent "DFID" lookup error %d."
+ " Evicting client %s with export %s.\n",
+ PFID(mdt_object_fid(parent)), rc,
+ obd_uuid2str(&exp->exp_client_uuid),
+ obd_export_nid2str(exp));
+ mdt_export_evict(exp);
+ EXIT;
+ return;
+ }
child = mdt_object_find(env, mdt, rr->rr_fid2);
- LASSERT(!IS_ERR(child));
-
+ if (IS_ERR(child)) {
+ rc = PTR_ERR(parent);
+ LCONSOLE_WARN("Child "DFID" lookup error %d."
+ " Evicting client %s with export %s.\n",
+ PFID(mdt_object_fid(child)), rc,
+ obd_uuid2str(&exp->exp_client_uuid),
+ obd_export_nid2str(exp));
+ mdt_export_evict(exp);
+ EXIT;
+ return;
+ }
rc = mdt_object_exists(child);
if (rc > 0) {
struct md_object *next;
struct mdt_lock_handle *lhc)
{
struct ptlrpc_request *req = mdt_info_req(mti);
- struct mdt_export_data *med = &req->rq_export->exp_mdt_data;
+ struct obd_export *exp = req->rq_export;
+ struct mdt_export_data *med = &exp->exp_mdt_data;
struct mdt_device *mdt = mti->mti_mdt;
struct mdt_object *child;
struct mdt_body *body;
/* if no error, so child was created with requested fid */
child = mdt_object_find(mti->mti_env, mdt, mti->mti_rr.rr_fid2);
- LASSERT(!IS_ERR(child));
+ if (IS_ERR(child)) {
+ rc = PTR_ERR(child);
+ LCONSOLE_WARN("Child "DFID" lookup error %d."
+ " Evicting client %s with export %s.\n",
+ PFID(mdt_object_fid(child)), rc,
+ obd_uuid2str(&exp->exp_client_uuid),
+ obd_export_nid2str(exp));
+ mdt_export_evict(exp);
+ EXIT;
+ return;
+ }
body = req_capsule_server_get(mti->mti_pill, &RMF_MDT_BODY);
rc = mo_attr_get(mti->mti_env, mdt_object_child(child), &mti->mti_attr);
struct mdt_lock_handle *lhc)
{
struct ptlrpc_request *req = mdt_info_req(mti);
- struct mdt_export_data *med = &req->rq_export->exp_mdt_data;
+ struct obd_export *exp = req->rq_export;
+ struct mdt_export_data *med = &exp->exp_mdt_data;
struct mdt_device *mdt = mti->mti_mdt;
struct mdt_object *obj;
struct mdt_body *body;
body = req_capsule_server_get(mti->mti_pill, &RMF_MDT_BODY);
obj = mdt_object_find(mti->mti_env, mdt, mti->mti_rr.rr_fid1);
- LASSERT(!IS_ERR(obj));
+ if (IS_ERR(obj)) {
+ int rc = PTR_ERR(obj);
+ LCONSOLE_WARN(""DFID" lookup error %d."
+ " Evicting client %s with export %s.\n",
+ PFID(mdt_object_fid(obj)), rc,
+ obd_uuid2str(&exp->exp_client_uuid),
+ obd_export_nid2str(exp));
+ mdt_export_evict(exp);
+ EXIT;
+ return;
+ }
mo_attr_get(mti->mti_env, mdt_object_child(obj), &mti->mti_attr);
mdt_pack_attr2body(mti, body, &mti->mti_attr.ma_attr,
mdt_object_fid(obj));