From e2f38bfaacc38a6febafd5828deb48df81ffa656 Mon Sep 17 00:00:00 2001 From: Johann Lombardi Date: Fri, 12 Mar 2010 15:28:41 +0100 Subject: [PATCH] b=22241 call sync instead of fsync on local cancel to reduce stack usage i=oleg i=andreas sync_on_lock_cancel is needed for recovery when async journal is enabled, but we actually just need to make sure that metadata blocks have hit the journal, so doing a fs sync should be enough and should consume less stack (just create an empty handle and commmit it). --- lustre/ost/ost_handler.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 72c394d..f36efc3 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -1397,22 +1397,11 @@ int ost_blocking_ast(struct ldlm_lock *lock, if (!oinfo) RETURN(-ENOMEM); - OBDO_ALLOC(oinfo->oi_oa); - if (!oinfo->oi_oa) { - OBD_FREE_PTR(oinfo); - RETURN(-ENOMEM); - } - - oinfo->oi_oa->o_id = lock->l_resource->lr_name.name[0]; - oinfo->oi_oa->o_valid = OBD_MD_FLID; - - rc = obd_sync_rqset(lock->l_export, oinfo, - lock->l_policy_data.l_extent.start, - lock->l_policy_data.l_extent.end); + /* force journal commit through fs sync */ + rc = obd_sync(lock->l_export, oinfo, 0, 0, NULL); if (rc) CERROR("Error %d syncing data on lock cancel\n", rc); - OBDO_FREE(oinfo->oi_oa); OBD_FREE_PTR(oinfo); } -- 1.8.3.1