/********* Changelogs **********/
/** Changelog record types */
enum changelog_rec_type {
+ CL_NONE = -1,
CL_MARK = 0,
CL_CREATE = 1, /* namespace */
CL_MKDIR = 2, /* namespace */
if (strcmp(XATTR_NAME_HSM, xattr_name) == 0)
return CL_HSM;
+ /* Avoid logging SOM xattr for every file */
+ if (strcmp(XATTR_NAME_SOM, xattr_name) == 0)
+ return CL_NONE;
+
if (has_prefix(xattr_name, XATTR_USER_PREFIX) ||
has_prefix(xattr_name, XATTR_NAME_POSIX_ACL_ACCESS) ||
has_prefix(xattr_name, XATTR_NAME_POSIX_ACL_DEFAULT) ||
has_prefix(xattr_name, XATTR_SECURITY_PREFIX))
return CL_SETXATTR;
- return -1;
+ return CL_NONE;
}
static int mdd_declare_xattr_set(const struct lu_env *env,
}
run_test 807 "verify LSOM syncing tool"
+check_som_nologged()
+{
+ local lines=$($LFS changelog $FSNAME-MDT0000 |
+ grep 'x=trusted.som' | wc -l)
+ [ $lines -ne 0 ] && error "trusted.som xattr is logged in Changelogs"
+}
+
+test_808() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.11.55) ] &&
+ skip "Need MDS version at least 2.11.55" && return
+
+ # Registration step
+ changelog_register || error "changelog_register failed"
+
+ touch $DIR/$tfile || error "touch $tfile failed"
+ check_som_nologged
+
+ dd if=/dev/zero of=$DIR/$tfile bs=1048576 count=1 ||
+ error "write $tfile failed"
+ check_som_nologged
+
+ $TRUNCATE $DIR/$tfile 1234
+ check_som_nologged
+
+ $TRUNCATE $DIR/$tfile 1048576
+ check_som_nologged
+
+ # Deregistration step
+ changelog_deregister || error "changelog_deregister failed"
+}
+run_test 808 "Check trusted.som xattr not logged in Changelogs"
+
#
# tests that do cleanup/setup should be run at the end
#