X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fllite%2Fxattr.c;h=f9e425d2eebe2aed618fd088f22322f07866d282;hp=1d9923eff2a5adf8fb7d5a389ced6dcc54ed4dbd;hb=16e0fe6eab3e54aa7beddb75bf7dae05645408e9;hpb=bc5d8ddb32aad8eb382f00a058a59c1ec8de0d20 diff --git a/lustre/llite/xattr.c b/lustre/llite/xattr.c index 1d9923e..f9e425d 100644 --- a/lustre/llite/xattr.c +++ b/lustre/llite/xattr.c @@ -47,7 +47,7 @@ #include #include #include -#include +#include #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: