Whamcloud - gitweb
LU-11376 lov: new foreign LOV format
[fs/lustre-release.git] / lustre / llite / xattr.c
index 3958dd6..c98a852 100644 (file)
@@ -472,6 +472,7 @@ static ssize_t ll_getxattr_lov(struct inode *inode, void *buf, size_t buf_size)
                };
                struct lu_env *env;
                u16 refcheck;
+               u32 magic;
 
                if (!obj)
                        RETURN(-ENODATA);
@@ -500,7 +501,8 @@ static ssize_t ll_getxattr_lov(struct inode *inode, void *buf, size_t buf_size)
                 * recognizing layout gen as stripe offset when the
                 * file is restored. See LU-2809.
                 */
-               if (((struct lov_mds_md *)buf)->lmm_magic == LOV_MAGIC_COMP_V1)
+               magic = ((struct lov_mds_md *)buf)->lmm_magic;
+               if (magic == LOV_MAGIC_COMP_V1 || magic == LOV_MAGIC_FOREIGN)
                        goto out_env;
 
                ((struct lov_mds_md *)buf)->lmm_layout_gen = 0;