Whamcloud - gitweb
LU-6886 mdd: declare changelog store for POSIX ACLs 60/15660/3
authorLi Dongyang <dongyang.li@anu.edu.au>
Tue, 21 Jul 2015 05:20:49 +0000 (15:20 +1000)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 7 Oct 2015 18:52:09 +0000 (18:52 +0000)
mdd_xattr_del() records POSIX ACL ops in the changelog,
we should declare them in mdd_declare_xattr_del().

Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au>
Change-Id: I9184c7906d0da715c12b833bab080c56a1a07285
Reviewed-on: http://review.whamcloud.com/15660
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/mdd/mdd_object.c

index e283a64..03043f2 100644 (file)
@@ -1106,9 +1106,13 @@ static int mdd_declare_xattr_del(const struct lu_env *env,
        if (rc)
                return rc;
 
-       /* Only record user xattr changes */
-       if ((strncmp(XATTR_USER_PREFIX, name,
-                    sizeof(XATTR_USER_PREFIX) - 1) == 0))
+       /* Only record system & user xattr changes */
+       if (strncmp(XATTR_USER_PREFIX, name,
+                       sizeof(XATTR_USER_PREFIX) - 1) == 0 ||
+               strncmp(POSIX_ACL_XATTR_ACCESS, name,
+                       sizeof(POSIX_ACL_XATTR_ACCESS) - 1) == 0 ||
+               strncmp(POSIX_ACL_XATTR_DEFAULT, name,
+                       sizeof(POSIX_ACL_XATTR_DEFAULT) - 1) == 0)
                rc = mdd_declare_changelog_store(env, mdd, NULL, NULL, handle);
 
        return rc;