Whamcloud - gitweb
add lu2md device convertor
authortappro <tappro>
Fri, 7 Apr 2006 14:33:05 +0000 (14:33 +0000)
committertappro <tappro>
Fri, 7 Apr 2006 14:33:05 +0000 (14:33 +0000)
lustre/include/linux/md_object.h

index aabb920..c1b1dcc 100644 (file)
@@ -74,6 +74,12 @@ static inline int lu_device_is_md(struct lu_device *d)
         return d->ld_type->ldt_tags & LU_DEVICE_MD;
 }
 
+static inline struct md_device *lu2md_dev(struct lu_device *d)
+{
+        LASSERT(lu_device_is_md(d));
+        return container_of(d, struct md_device, md_lu_dev);
+}
+
 static inline struct md_object *lu2md(struct lu_object *o)
 {
         LASSERT(lu_device_is_md(o->lo_dev));