From 032da3f61e0d012aa9beb088d9ecc7c5c8bd78c2 Mon Sep 17 00:00:00 2001 From: shadow Date: Sun, 11 Jan 2009 07:16:58 +0000 Subject: [PATCH] resolve compile issue after 16919 landing. b=16919 Branch b_release_1_8_0 --- lustre/ost/ost_handler.c | 26 ++++++++++++++++++-------- lustre/tests/replay-single.sh | 4 ++-- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index fe24fb8..3f81b89 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -1253,20 +1253,30 @@ int ost_blocking_ast(struct ldlm_lock *lock, (obd->u.ost.ost_sync_on_lock_cancel == ALWAYS_SYNC_ON_CANCEL || (obd->u.ost.ost_sync_on_lock_cancel == BLOCKING_SYNC_ON_CANCEL && lock->l_flags & LDLM_FL_CBPENDING))) { - struct obdo *oa; + struct obd_info *oinfo; int rc; - OBDO_ALLOC(oa); - oa->o_id = lock->l_resource->lr_name.name[0]; - oa->o_valid = OBD_MD_FLID; + OBD_ALLOC_PTR(oinfo); + if (!oinfo) + RETURN(-ENOMEM); - rc = obd_sync(lock->l_export, oa, NULL, - lock->l_policy_data.l_extent.start, - lock->l_policy_data.l_extent.end); + 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); if (rc) CERROR("Error %d syncing data on lock cancel\n", rc); - OBDO_FREE(oa); + OBDO_FREE(oinfo->oi_oa); + OBD_FREE_PTR(oinfo); } return ldlm_server_blocking_ast(lock, desc, data, flag); diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index f51446e..47dcffb 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -1887,7 +1887,7 @@ test_73c() { } run_test 73c "open(O_CREAT), unlink, replay, reconnect at last_replay, close" -test_80() { +test_80a() { do_facet ost1 "lctl set_param -n obdfilter.${ost1_svc}.sync_journal 0" replay_barrier ost1 @@ -1902,7 +1902,7 @@ test_80() { error "New checksum $cksum2 does not match original $cksum" fi } -run_test 80 "write replay" +run_test 80a "write replay" test_80b() { do_facet ost1 "lctl set_param -n obdfilter.${ost1_svc}.sync_journal 0" -- 1.8.3.1