From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751675AbdBRVwm (ORCPT ); Sat, 18 Feb 2017 16:52:42 -0500 Received: from [160.91.203.10] ([160.91.203.10]:51102 "EHLO smtp1.ccs.ornl.gov" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1750785AbdBRVuC (ORCPT ); Sat, 18 Feb 2017 16:50:02 -0500 From: James Simmons To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin Cc: Linux Kernel Mailing List , Lustre Development List , Bobi Jam , James Simmons Subject: [PATCH 01/14] staging: lustre: llite: lower message level for ll_setattr_raw() Date: Sat, 18 Feb 2017 16:47:02 -0500 Message-Id: <1487454435-4895-2-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1487454435-4895-1-git-send-email-jsimmons@infradead.org> References: <1487454435-4895-1-git-send-email-jsimmons@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bobi Jam 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 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6817 Reviewed-on: http://review.whamcloud.com/15541 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/llite_lib.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index b229cbc..34422df 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1513,6 +1513,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) */ attr->ia_valid |= MDS_OPEN_OWNEROVERRIDE; op_data->op_bias |= MDS_DATA_MODIFIED; + clear_bit(LLIF_DATA_MODIFIED, &lli->lli_flags); } rc = ll_md_setattr(dentry, op_data); @@ -1560,8 +1561,15 @@ 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