Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1394393
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/9] staging: lustre: nfs: don't panic NFS server if MDS fails to find FID |
| Date | 2016-05-04 16:50 +0200 |
| Message-ID | <rv6hI-5S0-29@gated-at.bofh.it> (permalink) |
| References | <rv5Ym-5ES-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/9] staging: lustre: bug fixes from the lustre 2.5.[54-55] release James Simmons <jsimmons@infradead.org> - 2016-05-04 16:50 +0200 [PATCH 1/9] staging: lustre: nfs: don't panic NFS server if MDS fails to find FID James Simmons <jsimmons@infradead.org> - 2016-05-04 16:50 +0200 [PATCH 2/9] staging: lustre: osc: Allow lock to be canceled at ENQ time James Simmons <jsimmons@infradead.org> - 2016-05-04 16:50 +0200 [PATCH 6/9] staging: lustre: debug: clean up console messages James Simmons <jsimmons@infradead.org> - 2016-05-04 16:50 +0200 [PATCH 4/9] staging: lustre: mdt: extra checking for getattr RPC. James Simmons <jsimmons@infradead.org> - 2016-05-04 16:50 +0200
csiph-web