Whamcloud - gitweb
LU-1187 lmv: Locate right MDT in lmv.
[fs/lustre-release.git] / lustre / lod / lod_qos.c
index e59b904..5e91e88 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright  2009 Sun Microsystems, Inc. All rights reserved
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Whamcloud, Inc.
+ * Copyright (c) 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -1262,10 +1262,12 @@ static int lod_qos_parse_config(const struct lu_env *env,
        v1 = buf->lb_buf;
        magic = v1->lmm_magic;
 
-       if (magic == __swab32(LOV_USER_MAGIC_V1))
+       if (magic == __swab32(LOV_USER_MAGIC_V1)) {
                lustre_swab_lov_user_md_v1(v1);
-       else if (magic == __swab32(LOV_USER_MAGIC_V3))
+       } else if (magic == __swab32(LOV_USER_MAGIC_V3)) {
+               v3 = buf->lb_buf;
                lustre_swab_lov_user_md_v3(v3);
+       }
 
        if (unlikely(magic != LOV_MAGIC_V1 && magic != LOV_MAGIC_V3)) {
                /* try to use as fully defined striping */