Whamcloud - gitweb
b=18881
[fs/lustre-release.git] / lustre / osc / osc_io.c
index ba068a8..5cb13ee 100644 (file)
@@ -149,8 +149,11 @@ static int osc_io_submit(const struct lu_env *env,
                 osc = cl2osc(opg->ops_cl.cpl_obj);
                 exp = osc_export(osc);
 
-                if (priority > CRP_NORMAL)
+                if (priority > CRP_NORMAL) {
+                        spin_lock(&oap->oap_lock);
                         oap->oap_async_flags |= ASYNC_HP;
+                        spin_unlock(&oap->oap_lock);
+                }
                 /*
                  * This can be checked without cli->cl_loi_list_lock, because
                  * ->oap_*_item are always manipulated when the page is owned.
@@ -191,6 +194,7 @@ static int osc_io_submit(const struct lu_env *env,
                                  */
                                 LASSERT(result == 0);
                         }
+                        opg->ops_submit_time = cfs_time_current();
                 } else {
                         LASSERT(result < 0);
                         if (result != -EALREADY)