Whamcloud - gitweb
LU-6817 llite: lower message level for ll_setattr_raw() 41/15541/4
authorBobi Jam <bobijam.xu@intel.com>
Thu, 9 Jul 2015 09:05:50 +0000 (17:05 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 18 Aug 2015 11:27:34 +0000 (11:27 +0000)
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 <bobijam.xu@intel.com>
Change-Id: Iff5bc0a6cec990e4e9f6f8f4ef0faacc229b828b
Reviewed-on: http://review.whamcloud.com/15541
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/llite_lib.c

index dd8c8d8..dbc4302 100644 (file)
@@ -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);
        }