linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Simmons <jsimmons@infradead.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>,
	Oleg Drokin <oleg.drokin@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>,
	Bobi Jam <bobijam.xu@intel.com>,
	James Simmons <jsimmons@infradead.org>
Subject: [PATCH 1/9] staging: lustre: nfs: don't panic NFS server if MDS fails to find FID
Date: Wed,  4 May 2016 10:28:52 -0400	[thread overview]
Message-ID: <1462372140-27880-2-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1462372140-27880-1-git-send-email-jsimmons@infradead.org>

From: Bobi Jam <bobijam.xu@intel.com>

When MDS fails to retrive the parent's fid, we'd handle it without
crashing the NFS server.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3952
Reviewed-on: http://review.whamcloud.com/8459
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/llite/llite_nfs.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_nfs.c b/drivers/staging/lustre/lustre/llite/llite_nfs.c
index 61cb5ff..c1eef61 100644
--- a/drivers/staging/lustre/lustre/llite/llite_nfs.c
+++ b/drivers/staging/lustre/lustre/llite/llite_nfs.c
@@ -322,11 +322,14 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
 		return ERR_PTR(rc);
 	}
 	body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
-	LASSERT(body->valid & OBD_MD_FLID);
-
-	CDEBUG(D_INFO, "parent for " DFID " is " DFID "\n",
-	       PFID(ll_inode2fid(dir)), PFID(&body->fid1));
-
+	/*
+	 * LU-3952: MDT may lost the FID of its parent, we should not crash
+	 * the NFS server, ll_iget_for_nfs() will handle the error.
+	 */
+	if (body->valid & OBD_MD_FLID) {
+		CDEBUG(D_INFO, "parent for " DFID " is " DFID "\n",
+		       PFID(ll_inode2fid(dir)), PFID(&body->fid1));
+	}
 	result = ll_iget_for_nfs(dir->i_sb, &body->fid1, NULL);
 
 	ptlrpc_req_finished(req);
-- 
2.7.4

  reply	other threads:[~2016-05-04 14:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 14:28 [PATCH 0/9] staging: lustre: bug fixes from the lustre 2.5.[54-55] release James Simmons
2016-05-04 14:28 ` James Simmons [this message]
2016-05-04 14:28 ` [PATCH 2/9] staging: lustre: osc: Allow lock to be canceled at ENQ time James Simmons
2016-05-04 14:28 ` [PATCH 3/9] staging: lustre: lov: remove lov and lod stuff from obd.h James Simmons
2016-05-04 14:28 ` [PATCH 4/9] staging: lustre: mdt: extra checking for getattr RPC James Simmons
2016-05-04 14:28 ` [PATCH 5/9] staging: lustre: fid: packing ost_idx in IDIF James Simmons
2016-05-10 13:20   ` Dan Carpenter
2016-05-04 14:28 ` [PATCH 6/9] staging: lustre: debug: clean up console messages James Simmons
2016-05-04 14:28 ` [PATCH 7/9] staging: lustre: ptlrpc: fix nrs cleanup James Simmons
2016-05-04 14:28 ` [PATCH 8/9] staging: lustre: fid: init FID client for OSP on MDT James Simmons
2016-05-04 14:29 ` [PATCH 9/9] staging: lustre: lov: remove unused lov obd functions James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462372140-27880-2-git-send-email-jsimmons@infradead.org \
    --to=jsimmons@infradead.org \
    --cc=andreas.dilger@intel.com \
    --cc=bobijam.xu@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).