From 025ddef163fb7ce0878ae731e376943c8e16d771 Mon Sep 17 00:00:00 2001 From: bwzhou Date: Sat, 17 May 2008 05:46:52 +0000 Subject: [PATCH] Branch b1_6 b=13380 r=green, bwzhou Mountpoint references were being leaked during open reply reconstruction after an MDS restart. Drop mountpoint reference in reconstruct_open() and free dentry reference also. --- lustre/ChangeLog | 8 ++++++++ lustre/mds/mds_open.c | 12 ++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 5855879..761cf09 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -24,6 +24,14 @@ tbd Sun Microsystems, Inc. 'tunefs.lustre --param="mdt.quota_type=ug1" $MDTDEV'. For more information, please refer to bugzilla 13904. +Severity : minor +Frequency : very rare +Bugzilla : 13380 +Description: MDT cannot be unmounted, reporting "Mount still busy" +Details : Mountpoint references were being leaked during open reply + reconstruction after an MDS restart. Drop mountpoint reference + in reconstruct_open() and free dentry reference also. + Severity : normal Bugzilla : 15443 Description: wait until IO finished before start new when do lock cancel. diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 3750a0c..b8c771a 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -619,11 +619,15 @@ static void reconstruct_open(struct mds_update_record *rec, int offset, CERROR("Re-opened file \n"); mfd = mds_dentry_open(dchild, mds->mds_vfsmnt, rec->ur_flags & ~MDS_OPEN_TRUNC, req); - if (!mfd) { - CERROR("mds: out of memory\n"); - GOTO(out_dput, req->rq_status = -ENOMEM); + mntput(mds->mds_vfsmnt); + if (IS_ERR(mfd)) { + req->rq_status = PTR_ERR(mfd); + mfd = NULL; + CERROR("%s: opening inode "LPU64" failed: rc %d\n", + req->rq_export->exp_obd->obd_name, + (__u64)dchild->d_inode->i_ino, req->rq_status); + GOTO(out_dput, req->rq_status); } - put_child = 0; } else { body->handle.cookie = mfd->mfd_handle.h_cookie; CDEBUG(D_INODE, "resend mfd %p, cookie "LPX64"\n", mfd, -- 1.8.3.1