Whamcloud - gitweb
LU-2675 obdclass: remove uses of lov_stripe_md
[fs/lustre-release.git] / lustre / include / obd.h
index 3be4697..b9c2433 100644 (file)
@@ -145,6 +145,13 @@ static inline bool lsm_has_objects(struct lov_stripe_md *lsm)
        return true;
 }
 
+static inline int lov_stripe_md_size(unsigned int stripe_count)
+{
+       struct lov_stripe_md lsm;
+
+       return sizeof(lsm) + stripe_count * sizeof(lsm.lsm_oinfo[0]);
+}
+
 struct obd_info;
 
 typedef int (*obd_enqueue_update_f)(void *cookie, int rc);