NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/698: mount uses mount_* for external fs types, umount should too.
The following reply was made to PR bin/698; it has been noted by GNATS.
From: "Simon J. Gerraty" <sjg%juniper.net@localhost>
To: <gnats-bugs%NetBSD.org@localhost>
Cc: <darcy%NetBSD.org@localhost>, <gnats-admin%NetBSD.org@localhost>, <netbsd-bugs%NetBSD.org@localhost>,
<sjg%juniper.net@localhost>
Subject: Re: bin/698: mount uses mount_* for external fs types, umount should too.
Date: Wed, 6 Jul 2016 11:45:11 -0700
David Holland <dholland-bugs%NetBSD.org@localhost> wrote:
> > That could help - should allow umount to find and
> > invoke an appropriate umount_* app.
>
> Can you point me at what this thing is and exactly what it does (and
> doesn't) do?
It was never open sourced and I've not looked at it since about '98 so a
bit rusty...
An external file is used to track the port (and pid) used for each mount
point - in fact the pid is all we really need, since the client was
designed to unmount itself atexit() so one way or another an unmount
request typically resulted in sending SIGTERM to shuffler process:
:
# NAME:
# umount_snfs - umount an snfs filesystem
#
# DESCRIPTION:
# This script simply looks for the appropriate process in
# 'sclnts' and kills it. The 'snfsc' process does the rest.
# This is only necessary on 4.4BSD and other systems which do
# not support umount_*.
#
# AUTHOR:
# Simon J. Gerraty <sjg%quick.com.au@localhost>
#
That arrangement was sufficiently simple (and main use was on
SunOS anyway), that the lack of umount_* wasn't a huge issue.
As noted the snfsc client process (the RPC shuffler)
can simply be killed to have it cleanup:
/* DESCRIPTION:
* This is an RPC shuffler for passing NFS RCP's via TCP or SSL.
* If we decide we need to exit - error or request (SIGTERM) we
* dag around until we manage to unmount the fs from the kernel.
*
one way or another we end up at
cleanup()
{
do_unmount(80); /* save us first */
if (!UnmountRPCdone) {
char res = 0;
/* do an umnt RPC so server will close down */
syslog(LOG_DEBUG, "sending MOUNTPROC_UMNT %s...",
SnfsMntedDir);
clnt_call(MntClp, MOUNTPROC_UMNT,
xdr_dirpath, &SnfsMntedDir,
xdr_void, &res, TIMEOUT);
}
syslog(LOG_DEBUG, "exiting...");
}
Home |
Main Index |
Thread Index |
Old Index