From: Namjae Jeon <linkinjeon@gmail.com>
To: SteveD@redhat.com, bfields@fieldses.org, Trond.Myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Namjae Jeon <linkinjeon@gmail.com>,
Vivek Trivedi <vtrivedi018@gmail.com>
Subject: [PATCH] nfs-util: Add cache_flush in mountd UMNT procedure.
Date: Sat, 7 Jul 2012 23:17:39 -0400 [thread overview]
Message-ID: <1341717459-7297-1-git-send-email-linkinjeon@gmail.com> (raw)
For removing storage device - user needs to safely un-mount the device
and then eject. But if 'EBUSY' occurs in umount then it will create
confusion for the user as it will mean some I/O is in progress - and
won't allow user to safely ejecting device.
1. Without this patch:
On NFS Client:
$ mount.nfs <NFS_SERVER>:/mnt /mnt
$ umount.nfs /mnt
On NFS Server:
$ umount /mnt
umount: can't umount /mnt: Device or resource busy
2. With this patch:
On NFS Client:
$ mount.nfs <NFS_SERVER>:/mnt /mnt
$ umount.nfs /mnt
On NFS Server:
$ umount.nfs /mnt --> umount successful
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Vivek Trivedi <vtrivedi018@gmail.com>
---
utils/mountd/mountd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
index bcf5080..2b190fb 100644
--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -275,6 +275,7 @@ mount_umnt_1_svc(struct svc_req *rqstp, dirpath *argp, void *UNUSED(resp))
return 1;
mountlist_del(host_ntop(sap, buf, sizeof(buf)), p);
+ cache_flush(1);
return 1;
}
@@ -292,6 +293,7 @@ mount_umntall_1_svc(struct svc_req *rqstp, void *UNUSED(argp),
auth_reload();
mountlist_del_all(nfs_getrpccaller(rqstp->rq_xprt));
+ cache_flush(1);
return 1;
}
--
1.7.9.5
next reply other threads:[~2012-07-08 3:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-08 3:17 Namjae Jeon [this message]
2012-07-10 14:59 ` J. Bruce Fields
2012-07-11 4:10 ` Namjae Jeon
2012-07-11 14:09 ` J. Bruce Fields
2012-07-11 22:38 ` Namjae Jeon
2012-07-11 22:43 ` Namjae Jeon
2012-07-24 16:24 ` J. Bruce Fields
2012-07-28 4:52 ` Namjae Jeon
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=1341717459-7297-1-git-send-email-linkinjeon@gmail.com \
--to=linkinjeon@gmail.com \
--cc=SteveD@redhat.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=vtrivedi018@gmail.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
all inboxes | Powered by JetHome®