From 58f10cbb9ed30e2e5f3ba2ab7e0300ca09b1b308 Mon Sep 17 00:00:00 2001 From: vitaly Date: Mon, 17 Nov 2008 17:46:01 +0000 Subject: [PATCH] Branch b1_8_gate b=17239 i=adilger i=shadow async lov_sync() operation. --- lustre/include/obd_class.h | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index c6d49c5..c07578d 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -947,9 +947,30 @@ static inline int obd_statfs(struct obd_device *obd, struct obd_statfs *osfs, RETURN(rc); } -static inline int obd_sync(struct obd_export *exp, struct obdo *oa, - struct lov_stripe_md *ea, obd_size start, - obd_size end) +static inline int obd_sync_rqset(struct obd_export *exp, struct obd_info *oinfo, + obd_size start, obd_size end) +{ + struct ptlrpc_request_set *set = NULL; + int rc; + ENTRY; + + OBD_CHECK_OP(exp->exp_obd, sync, -EOPNOTSUPP); + EXP_COUNTER_INCREMENT(exp, sync); + + set = ptlrpc_prep_set(); + if (set == NULL) + RETURN(-ENOMEM); + + rc = OBP(exp->exp_obd, sync)(exp, oinfo, start, end, set); + if (rc == 0) + rc = ptlrpc_set_wait(set); + ptlrpc_set_destroy(set); + RETURN(rc); +} + +static inline int obd_sync(struct obd_export *exp, struct obd_info *oinfo, + obd_size start, obd_size end, + struct ptlrpc_request_set *set) { int rc; ENTRY; @@ -957,7 +978,7 @@ static inline int obd_sync(struct obd_export *exp, struct obdo *oa, OBD_CHECK_OP(exp->exp_obd, sync, -EOPNOTSUPP); EXP_COUNTER_INCREMENT(exp, sync); - rc = OBP(exp->exp_obd, sync)(exp, oa, ea, start, end); + rc = OBP(exp->exp_obd, sync)(exp, oinfo, start, end, set); RETURN(rc); } -- 1.8.3.1