From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753351AbdA2Aau (ORCPT ); Sat, 28 Jan 2017 19:30:50 -0500 Received: from [160.91.203.10] ([160.91.203.10]:49074 "EHLO smtp1.ccs.ornl.gov" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752760AbdA2Aaa (ORCPT ); Sat, 28 Jan 2017 19:30:30 -0500 From: James Simmons To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin Cc: Linux Kernel Mailing List , Lustre Development List , wang di , James Simmons Subject: [PATCH 57/60] staging: lustre: lmv: remove nlink check in lmv_revalidate_slaves Date: Sat, 28 Jan 2017 19:05:25 -0500 Message-Id: <1485648328-2141-58-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1485648328-2141-1-git-send-email-jsimmons@infradead.org> References: <1485648328-2141-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: wang di If an application attempts to remove millions of files in a single directory it will fail. This failure was tracked down to the nlink < 2 check in lmv_revalidate_slaves, because after nlink reaches to maximum value of LDISKFS_LINK_MAX (65000), the nlink broadcast back from the server will be reported as one. The return value of 1 is not invalid so lets remove the check. Signed-off-by: wang di Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6984 Reviewed-on: http://review.whamcloud.com/16490 Reviewed-by: James Simmons Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/staging/lustre/lustre/lmv/lmv_intent.c b/drivers/staging/lustre/lustre/lmv/lmv_intent.c index b1071cf..aa42066 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_intent.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_intent.c @@ -220,21 +220,7 @@ int lmv_revalidate_slaves(struct obd_export *exp, /* refresh slave from server */ body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY); - LASSERT(body); - - if (unlikely(body->mbo_nlink < 2)) { - /* - * If this is bad stripe, most likely due - * to the race between close(unlink) and - * getattr, let's return -EONENT, so llite - * will revalidate the dentry see - * ll_inode_revalidate_fini() - */ - CDEBUG(D_INODE, "%s: nlink %d < 2 corrupt stripe %d "DFID":" DFID"\n", - obd->obd_name, body->mbo_nlink, i, - PFID(&lsm->lsm_md_oinfo[i].lmo_fid), - PFID(&lsm->lsm_md_oinfo[0].lmo_fid)); - + if (!body) { if (it.it_lock_mode && lockh) { ldlm_lock_decref(lockh, it.it_lock_mode); it.it_lock_mode = 0; -- 1.8.3.1