[pnfs] [PATCH] fix more umount problems
Marc Eshel
eshel at almaden.ibm.com
Wed Jul 25 15:55:19 EDT 2007
From: Marc Eshel <eshel at almaden.ibm.com>
When MDS is also DS make sure device_destroy don't destroy the
MDS session that is common.
Zero cl_rpcclient after rpc_shutdown_client().
Turn off KERN_EMERG for normal mount.
---
fs/nfs/nfs4filelayoutdev.c | 8 +++++++-
fs/nfs/super.c | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
index 97e927b..643261d 100644
--- a/fs/nfs/nfs4filelayoutdev.c
+++ b/fs/nfs/nfs4filelayoutdev.c
@@ -153,8 +153,13 @@ device_destroy(struct nfs4_pnfs_dev_item
if (!dev)
return;
+ dprintk("device_destroy: did=%u, ip=%x, port=%hu, rpcclient %p flags %x\n",
+ dev->dev_id, ntohl(dev->ip_addr), ntohs(dev->port),
+ dev->clp->cl_rpcclient, dev->clp->cl_exchange_flags);
+
/* if not created for DS just return */
- if (dev->clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_DS) {
+ if (dev->clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_DS &&
+ !(dev->clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_MDS)) {
if ((status = _nfs4_proc_destroy_session(&dev->clp->cl_session, dev->clp->cl_rpcclient)))
printk(KERN_WARNING "destroy session on data server failed with status %d...\
@@ -162,6 +167,7 @@ device_destroy(struct nfs4_pnfs_dev_item
/* BUG_ON(!atomic_sub_and_test(0, &dev->count)); */
rpc_shutdown_client(dev->clp->cl_rpcclient);
+ dev->clp->cl_rpcclient = NULL;
}
kfree(dev);
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 8194038..91e3b91 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1327,7 +1327,7 @@ static int nfs4_fill_super(struct super_
printk(KERN_EMERG "failed to start callback!\n");
goto out_fail;
} else {
- printk(KERN_EMERG "started cb service!\n");
+ printk("%s: started cb service!\n", __FUNCTION__);
}
if (server->rpc_ops->setup_session) {
More information about the pNFS
mailing list