Skip to content

Commit 1cf96da

Browse files
wangdi1gregkh
authored andcommitted
staging: lustre: lmv: remove nlink check in lmv_revalidate_slaves
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 <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6984 Reviewed-on: http://review.whamcloud.com/16490 Reviewed-by: James Simmons <[email protected]> Reviewed-by: Jian Yu <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: James Simmons <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7775977 commit 1cf96da

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

drivers/staging/lustre/lustre/lmv/lmv_intent.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -220,21 +220,7 @@ int lmv_revalidate_slaves(struct obd_export *exp,
220220
/* refresh slave from server */
221221
body = req_capsule_server_get(&req->rq_pill,
222222
&RMF_MDT_BODY);
223-
LASSERT(body);
224-
225-
if (unlikely(body->mbo_nlink < 2)) {
226-
/*
227-
* If this is bad stripe, most likely due
228-
* to the race between close(unlink) and
229-
* getattr, let's return -EONENT, so llite
230-
* will revalidate the dentry see
231-
* ll_inode_revalidate_fini()
232-
*/
233-
CDEBUG(D_INODE, "%s: nlink %d < 2 corrupt stripe %d "DFID":" DFID"\n",
234-
obd->obd_name, body->mbo_nlink, i,
235-
PFID(&lsm->lsm_md_oinfo[i].lmo_fid),
236-
PFID(&lsm->lsm_md_oinfo[0].lmo_fid));
237-
223+
if (!body) {
238224
if (it.it_lock_mode && lockh) {
239225
ldlm_lock_decref(lockh, it.it_lock_mode);
240226
it.it_lock_mode = 0;

0 commit comments

Comments
 (0)