From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 11 15:02:22 2007 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A93AF16A41A for ; Tue, 11 Dec 2007 15:02:22 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: from relay00.pair.com (relay00.pair.com [209.68.5.9]) by mx1.freebsd.org (Postfix) with SMTP id 6DFE313C44B for ; Tue, 11 Dec 2007 15:02:22 +0000 (UTC) (envelope-from alepulver@FreeBSD.org) Received: (qmail 78824 invoked by uid 0); 11 Dec 2007 15:02:20 -0000 Received: from unknown (HELO deimos.mars.bsd) (unknown) by unknown with SMTP; 11 Dec 2007 15:02:20 -0000 X-pair-Authenticated: 200.127.53.54 Date: Tue, 11 Dec 2007 12:02:11 -0300 From: Alejandro Pulver To: Doug Barton Message-ID: <20071211120211.133bdc3f@deimos.mars.bsd> In-Reply-To: <475E0F92.3040804@FreeBSD.org> References: <20071211001828.54e1da6b@deimos.mars.bsd> <475E0F92.3040804@FreeBSD.org> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.1; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/RDbkrOUaxb_FvUHcEWLfNcC"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-hackers@FreeBSD.org Subject: Re: Disk sync at shutdown and fusefs filesystems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2007 15:02:22 -0000 --Sig_/RDbkrOUaxb_FvUHcEWLfNcC Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 10 Dec 2007 20:18:26 -0800 Doug Barton wrote: > Alejandro Pulver wrote: >=20 > > Then I have to look for some way to manually > > unmount FUSE filesystems at shutdown, because they are already mounted > > at startup. I thought about instructing the fusefs-kmod rc.d script to > > unmount FUSE filesystems before attempting to unload the kernel module > > (currently it only loads/unloads fuse.ko). >=20 > Yes, I think that given what we're working with here, that would be a > good idea regardless. It should be pretty easy to do, you can find a > sample of something like what you would want in /etc/rc.d/dumpon. Let > me know if you need help, I'm more than a little interested in getting > fuse-ntfs set up here. >=20 Thanks, here is what I've got so far: it seems /dev/fuse[0-9]* devices aren't removed after the corresponding filesystem is unmounted (I guess they are reused), so instead of listing /dev the list has to be taken from 'mount'. Also there should be a delay between the 'umount' and 'kldunload' commands. What do you think about the following (replacement for fusefs_stop function)? echo "Stopping ${name}." for fs in `mount | grep '^/dev/fuse[0-9]*' | cut -d ' ' -f 1`; do umount $fs done sleep 2 kldunload $kmod Unfortunately it doesn't have a status function to avoid loading when already loaded and the other way, but can easily be added. Best Regards, Ale --Sig_/RDbkrOUaxb_FvUHcEWLfNcC Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHXqZ0iV05EpRcP2ERAkryAJ0VqZTsJBvVaFsnYjyvuoTh1JF1NgCeOApn TEBm+B0N4uM1PEo7sNXy0bw= =Tjbu -----END PGP SIGNATURE----- --Sig_/RDbkrOUaxb_FvUHcEWLfNcC--