From af530023bb41dafcdc3efa6e4dfcb38a1ae9806c Mon Sep 17 00:00:00 2001 From: tappro Date: Fri, 7 Apr 2006 14:33:05 +0000 Subject: [PATCH] add lu2md device convertor --- lustre/include/linux/md_object.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lustre/include/linux/md_object.h b/lustre/include/linux/md_object.h index aabb920..c1b1dcc 100644 --- a/lustre/include/linux/md_object.h +++ b/lustre/include/linux/md_object.h @@ -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)); -- 1.8.3.1