From 5291d454d49cd6048b815382fc5647712c277c1d Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Thu, 9 Jul 2015 17:05:50 +0800 Subject: [PATCH] LU-6817 llite: lower message level for ll_setattr_raw() truncate and write can happen at the same time, so that a file can be set modified even though the file is not restored from released state, and ll_hsm_state_set() is not applicable for the file, and it will return error in this case, we'd lower the error message level in this case. Signed-off-by: Bobi Jam Change-Id: Iff5bc0a6cec990e4e9f6f8f4ef0faacc229b828b Reviewed-on: http://review.whamcloud.com/15541 Tested-by: Jenkins Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/llite/llite_lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index dd8c8d8..dbc4302 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -1618,6 +1618,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) * modified, flag it. */ attr->ia_valid |= MDS_OPEN_OWNEROVERRIDE; op_data->op_bias |= MDS_DATA_MODIFIED; + ll_file_clear_flag(lli, LLIF_DATA_MODIFIED); } rc = ll_md_setattr(dentry, op_data); @@ -1660,8 +1661,13 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) int rc2; rc2 = ll_hsm_state_set(inode, &hss); + /* truncate and write can happen at the same time, so that + * the file can be set modified even though the file is not + * restored from released state, and ll_hsm_state_set() is + * not applicable for the file, and rc2 < 0 is normal in this + * case. */ if (rc2 < 0) - CERROR(DFID "HSM set dirty failed: rc2 = %d\n", + CDEBUG(D_INFO, DFID "HSM set dirty failed: rc2 = %d\n", PFID(ll_inode2fid(inode)), rc2); } -- 1.8.3.1