Whamcloud - gitweb
Branch b1_8_gate
authorhuanghua <huanghua>
Fri, 11 Jul 2008 05:21:51 +0000 (05:21 +0000)
committerhuanghua <huanghua>
Fri, 11 Jul 2008 05:21:51 +0000 (05:21 +0000)
b=11930
i=adilger
i=nikita.danilov
i=alex

lustre/include/obd_ost.h

index d2b399e..6277d56 100644 (file)
@@ -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