From: nathan Date: Fri, 22 Aug 2008 17:40:19 +0000 (+0000) Subject: b=15899 X-Git-Tag: v1_7_140~1^124 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=bdef9a4553c1901b05ac6526f512dd7792897d31;p=fs%2Flustre-release.git b=15899 i=nathan i=adilger add OST pools --- diff --git a/lustre/include/obd_lov.h b/lustre/include/obd_lov.h index 64798ab..da3ca51 100644 --- a/lustre/include/obd_lov.h +++ b/lustre/include/obd_lov.h @@ -42,13 +42,17 @@ static inline int lov_stripe_md_size(int stripes) return sizeof(struct lov_stripe_md) + stripes*sizeof(struct lov_oinfo*); } -#define lov_mds_md_size(stripes) lov_mds_md_v1_size(stripes) -static inline int lov_mds_md_v1_size(int stripes) +static inline int lov_mds_md_size(int stripes, int lmm_magic) { - return sizeof(struct lov_mds_md_v1) + - stripes * sizeof(struct lov_ost_data_v1); + if (lmm_magic == LOV_MAGIC_V3) + return sizeof(struct lov_mds_md_v3) + + stripes * sizeof(struct lov_ost_data_v1); + else + return sizeof(struct lov_mds_md_v1) + + stripes * sizeof(struct lov_ost_data_v1); } + #define IOC_LOV_TYPE 'g' #define IOC_LOV_MIN_NR 50 #define IOC_LOV_SET_OSC_ACTIVE _IOWR('g', 50, long)