X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Fobd_class.h;h=d56fc5bd6a5b5a4b8fd03144964eedf8121a9c7b;hb=840274b5c5e95e44a5ffedd08ebb4727bc39a845;hp=26b043e3398feb28910289375801c7cb2c8a670e;hpb=3049ba6ba1241770adeeeffbdfb6fef82bbf0b92;p=fs%2Flustre-release.git diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index 26b043e..d56fc5b 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -1827,6 +1827,54 @@ static inline int md_rmfid(struct obd_export *exp, struct fid_array *fa, return MDP(exp->exp_obd, rmfid)(exp, fa, rcs, set); } +static inline struct lu_batch * +md_batch_create(struct obd_export *exp, enum lu_batch_flags flags, + __u32 max_count) +{ + int rc; + + rc = exp_check_ops(exp); + if (rc) + return ERR_PTR(rc); + + return MDP(exp->exp_obd, batch_create)(exp, flags, max_count); +} + +static inline int md_batch_stop(struct obd_export *exp, struct lu_batch *bh) +{ + int rc; + + rc = exp_check_ops(exp); + if (rc) + return rc; + + return MDP(exp->exp_obd, batch_stop)(exp, bh); +} + +static inline int md_batch_flush(struct obd_export *exp, struct lu_batch *bh, + bool wait) +{ + int rc; + + rc = exp_check_ops(exp); + if (rc) + return rc; + + return MDP(exp->exp_obd, batch_flush)(exp, bh, wait); +} + +static inline int md_batch_add(struct obd_export *exp, struct lu_batch *bh, + struct md_op_item *item) +{ + int rc; + + rc = exp_check_ops(exp); + if (rc) + return rc; + + return MDP(exp->exp_obd, batch_add)(exp, bh, item); +} + /* OBD Metadata Support */ extern int obd_init_caches(void);