Whamcloud - gitweb
LU-12324 mdd: Do not record xattr size get in changelogs 36/34936/2
authorOleg Drokin <green@whamcloud.com>
Wed, 22 May 2019 05:22:49 +0000 (01:22 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 25 May 2019 04:52:46 +0000 (04:52 +0000)
It looks like if the xattr itself was not fetched there's no
need to create a changelog entry for it. The real get will come
and we'd do it there

Change-Id: I5b19f9309f65da0a4c58cb79a95787dab862eb94
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34936
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
lustre/mdd/mdd_object.c

index ff99634..e94118e 100644 (file)
@@ -428,7 +428,7 @@ static int mdd_xattr_get(const struct lu_env *env,
        mdd = mdo2mdd(obj);
 
        /* record only getting user xattrs and acls */
        mdd = mdo2mdd(obj);
 
        /* record only getting user xattrs and acls */
-       if (rc >= 0 &&
+       if (rc >= 0 && buf->lb_buf &&
            mdd_changelog_enabled(env, mdd, CL_GETXATTR) &&
            (has_prefix(name, XATTR_USER_PREFIX) ||
             has_prefix(name, XATTR_NAME_POSIX_ACL_ACCESS) ||
            mdd_changelog_enabled(env, mdd, CL_GETXATTR) &&
            (has_prefix(name, XATTR_USER_PREFIX) ||
             has_prefix(name, XATTR_NAME_POSIX_ACL_ACCESS) ||