Whamcloud - gitweb
b=16721
authorpravins <pravins>
Wed, 6 May 2009 12:44:36 +0000 (12:44 +0000)
committerpravins <pravins>
Wed, 6 May 2009 12:44:36 +0000 (12:44 +0000)
i=zam
i=rread

create separate context to execute osd specific transaction to avoid mdd
callback related to stop/commit transaction.

lustre/osd/osd_handler.c
lustre/osd/osd_internal.h

index 454b9e3..904b9d7 100644 (file)
@@ -523,17 +523,22 @@ static int osd_inode_remove(const struct lu_env *env, struct osd_object *obj)
         struct osd_device      *osd = osd_obj2dev(obj);
         struct osd_thread_info *oti = osd_oti_get(env);
         struct txn_param       *prm = &oti->oti_txn;
+        struct lu_env          *env_del_obj = &oti->oti_obj_delete_tx_env;
         struct thandle         *th;
         int result;
 
+        lu_env_init(env_del_obj, LCT_DT_THREAD);
         txn_param_init(prm, OSD_TXN_OI_DELETE_CREDITS +
                             OSD_TXN_INODE_DELETE_CREDITS);
-        th = osd_trans_start(env, &osd->od_dt_dev, prm);
+        th = osd_trans_start(env_del_obj, &osd->od_dt_dev, prm);
         if (!IS_ERR(th)) {
-                result = osd_oi_delete(oti, &osd->od_oi, fid, th);
-                osd_trans_stop(env, th);
+                result = osd_oi_delete(osd_oti_get(env_del_obj),
+                                       &osd->od_oi, fid, th);
+                osd_trans_stop(env_del_obj, th);
         } else
                 result = PTR_ERR(th);
+
+        lu_env_fini(env_del_obj);
         return result;
 }
 
index df1600b..6514dc7 100644 (file)
@@ -241,6 +241,7 @@ struct osd_thread_info {
 #ifdef HAVE_QUOTA_SUPPORT
         struct osd_ctxt        oti_ctxt;
 #endif
+        struct lu_env          oti_obj_delete_tx_env;
 };
 
 #ifdef LPROCFS