From 30239f1d84d56ca4a8b9a97a52f08aa4aa26451d Mon Sep 17 00:00:00 2001 From: huanghua Date: Fri, 11 Jul 2008 05:21:51 +0000 Subject: [PATCH] Branch b1_8_gate b=11930 i=adilger i=nikita.danilov i=alex --- lustre/include/obd_ost.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lustre/include/obd_ost.h b/lustre/include/obd_ost.h index d2b399e..6277d56 100644 --- a/lustre/include/obd_ost.h +++ b/lustre/include/obd_ost.h @@ -38,4 +38,18 @@ int osc_extent_blocking_cb(struct ldlm_lock *lock, struct ldlm_lock_desc *new, void *data, int flag); +static inline struct ldlm_res_id *osc_build_res_name(__u64 id, __u64 gr, + struct ldlm_res_id *name) +{ + memset(name, 0, sizeof *name); + name->name[0] = id; + name->name[2] = gr; + return name; +} + +static inline int osc_res_name_eq(__u64 id, __u64 gr, struct ldlm_res_id *name) +{ + return name->name[0] == id && name->name[2] == gr; +} + #endif -- 1.8.3.1