From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 11 20:22:40 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 7E18A16A475 for ; Tue, 11 Dec 2007 20:22:40 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with SMTP id 2C90D13C457 for ; Tue, 11 Dec 2007 20:22:39 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 5007 invoked by uid 399); 11 Dec 2007 20:22:37 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTP; 11 Dec 2007 20:22:37 -0000 X-Originating-IP: 127.0.0.1 Date: Tue, 11 Dec 2007 12:22:35 -0800 (PST) From: Doug Barton To: Alejandro Pulver In-Reply-To: <20071211120211.133bdc3f@deimos.mars.bsd> Message-ID: References: <20071211001828.54e1da6b@deimos.mars.bsd> <475E0F92.3040804@FreeBSD.org> <20071211120211.133bdc3f@deimos.mars.bsd> User-Agent: Alpine 0.999999 (BSF 847 2007-12-06) X-message-flag: Outlook -- Not just for spreading viruses anymore! X-OpenPGP-Key-ID: 0xD5B2F0FB Organization: http://www.FreeBSD.org/ MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII 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 20:22:40 -0000 On Tue, 11 Dec 2007, Alejandro Pulver wrote: > 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'. Yeah, I think that's better than using fstab anyway, since this way we get them all with limited processing. Wish I'd thought of it. :) > Also there should be a delay between the 'umount' and > 'kldunload' commands. What do you think about the following > (replacement for fusefs_stop function)? I suppose this is mostly a style difference, but I like to avoid all those subshells if we can. I also think it might be a good idea to wait a second between unmounts, just to be paranoid. How about: mount | while read dev d1 mountpoint d2; do case "$dev" in /dev/fuse[0-9]*) umount $mountpoint ; sleep 1 ;; esac done sleep 1 > kldunload $kmod hth, Doug -- This .signature sanitized for your protection