Whamcloud - gitweb
LU-3409 llite: silence lockdep warning in ll_md_blocking_ast
[fs/lustre-release.git] / lustre / llite / xattr.c
index 1d9923e..8772b74 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -47,7 +47,7 @@
 #include <lustre_lite.h>
 #include <lustre_dlm.h>
 #include <lustre_ver.h>
-#include <lustre_acl.h>
+#include <lustre_eacl.h>
 
 #include "llite_internal.h"
 
@@ -491,6 +491,10 @@ ssize_t ll_getxattr(struct dentry *dentry, const char *name,
 
                 lump = (struct lov_user_md *)buffer;
                 memcpy(lump, lmm, lmmsize);
+               /* do not return layout gen for getxattr otherwise it would
+                * confuse tar --xattr by recognizing layout gen as stripe
+                * offset when the file is restored. See LU-2809. */
+               lump->lmm_layout_gen = 0;
 
                 rc = lmmsize;
 out: