Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751613AbcKGBiG (ORCPT ); Sun, 6 Nov 2016 20:38:06 -0500 Received: from casper.infradead.org ([85.118.1.10]:56102 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750869AbcKGBiF (ORCPT ); Sun, 6 Nov 2016 20:38:05 -0500 Date: Mon, 7 Nov 2016 01:38:03 +0000 (GMT) From: James Simmons To: Oleg Drokin cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Linux Kernel Mailing List , Lustre Development List , Niu Yawei , Jinshan Xiong Subject: Re: [PATCH 04/14] staging/lustre/llite: clear inode timestamps after losing UPDATE lock In-Reply-To: <1478136304-867780-5-git-send-email-green@linuxhacker.ru> Message-ID: References: <1478136304-867780-1-git-send-email-green@linuxhacker.ru> <1478136304-867780-5-git-send-email-green@linuxhacker.ru> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161107_013803_303093_9C9079C7 X-CRM114-Status: GOOD ( 10.89 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1483 Lines: 44 > From: Niu Yawei > > Otherwise, those leftovers would interfere with new timestamps > especially when the timestamps are set back in time on the other > clients. Reviewed-by: James Simmons > Signed-off-by: Jinshan Xiong > Signed-off-by: Niu Yawei > Reviewed-on: http://review.whamcloud.com/22623 > Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8446 > Reviewed-by: Bobi Jam > Signed-off-by: Oleg Drokin > --- > drivers/staging/lustre/lustre/llite/namei.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c > index 74d9b73..c268f32 100644 > --- a/drivers/staging/lustre/lustre/llite/namei.c > +++ b/drivers/staging/lustre/lustre/llite/namei.c > @@ -251,6 +251,16 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, > PFID(ll_inode2fid(inode)), rc); > } > > + if (bits & MDS_INODELOCK_UPDATE) { > + struct ll_inode_info *lli = ll_i2info(inode); > + > + spin_lock(&lli->lli_lock); > + LTIME_S(inode->i_mtime) = 0; > + LTIME_S(inode->i_atime) = 0; > + LTIME_S(inode->i_ctime) = 0; > + spin_unlock(&lli->lli_lock); > + } > + > if ((bits & MDS_INODELOCK_UPDATE) && S_ISDIR(inode->i_mode)) { > struct ll_inode_info *lli = ll_i2info(inode); > > -- > 2.7.4 > >