From owner-freebsd-fs@FreeBSD.ORG Tue Aug 1 07:46:39 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2FF516A4DA for ; Tue, 1 Aug 2006 07:46:39 +0000 (UTC) (envelope-from rebehn@ant.uni-bremen.de) Received: from antsrv1.ant.uni-bremen.de (antsrv1.ant.uni-bremen.de [134.102.176.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C26543D45 for ; Tue, 1 Aug 2006 07:46:38 +0000 (GMT) (envelope-from rebehn@ant.uni-bremen.de) Received: from bremerhaven.ant.uni-bremen.de ([134.102.176.10]) by antsrv1.ant.uni-bremen.de with esmtp (Exim 4.62 (FreeBSD)) (envelope-from ) id 1G7oxZ-000Nxv-5z; Tue, 01 Aug 2006 09:46:37 +0200 Message-ID: <44CF06DD.3040304@ant.uni-bremen.de> Date: Tue, 01 Aug 2006 09:46:37 +0200 From: Heinrich Rebehn User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060516 SeaMonkey/1.0.2 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Any way to NFS export a unionfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2006 07:46:40 -0000 Hi list, trying to NFS export a unionfs yields: Jul 31 14:46:22 antsrv1 mountd[438]: can't export /root/union/lower Jul 31 14:46:22 antsrv1 mountd[438]: bad exports list line /root/union/lower Is there any workaround to achieve this? Heinrich Rebehn University of Bremen Physics / Electrical and Electronics Engineering - Department of Telecommunications - Phone : +49/421/218-4664 Fax : -3341 From owner-freebsd-fs@FreeBSD.ORG Tue Aug 1 20:54:34 2006 Return-Path: X-Original-To: freebsd-fs@FreeBSD.ORG Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0793616A4DF for ; Tue, 1 Aug 2006 20:54:34 +0000 (UTC) (envelope-from adamsch1@yahoo.com) Received: from web31812.mail.mud.yahoo.com (web31812.mail.mud.yahoo.com [68.142.207.75]) by mx1.FreeBSD.org (Postfix) with SMTP id 5DF3443D70 for ; Tue, 1 Aug 2006 20:54:33 +0000 (GMT) (envelope-from adamsch1@yahoo.com) Received: (qmail 54068 invoked by uid 60001); 1 Aug 2006 20:54:32 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=AY4J3RLomtfVxDe9a3UkQTZ76NDKlssj0yj+1qUmKToNnmXmELsTaMyZ7+YMiVA+AoaRjMMuPaVCkV9XgDcg/kRGWejOSzbmh8nra+82AX6wP+hvkWw1HwjmhLbIzGrW8CFLtaIQKywxeoIWHX0AR5p7qimeUmp15oKCDKWsBxc= ; Message-ID: <20060801205432.54066.qmail@web31812.mail.mud.yahoo.com> Received: from [207.126.230.225] by web31812.mail.mud.yahoo.com via HTTP; Tue, 01 Aug 2006 13:54:32 PDT Date: Tue, 1 Aug 2006 13:54:32 -0700 (PDT) From: Shane Adams To: freebsd-fs@FreeBSD.ORG In-Reply-To: <200607280927.k6S9RG2B072245@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Subject: Re: Advice for hacking on ufs/ffs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Shane Adams List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2006 20:54:34 -0000 I think I found a bug in the ffs code, specifically in ffs_uninit and the uma_zcreates in ffs_vfsops.c You need to explicitly call zdestroy on uma_inode1, uma_ufs1 and uma_ufs2 in ffs_uninit otherwise if UFS/FFS (as a kernel module) is unloaded, you get a panic if you call sysctl -a after the kldunload. Now I'm new to freebsd, and on my system UFS/FFS is statically compiled, but I was screwing around and discovered this. Not sure how to report this or the patch (that fixed the problem on my system). Shane From owner-freebsd-fs@FreeBSD.ORG Wed Aug 2 03:44:42 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3135416A4E7 for ; Wed, 2 Aug 2006 03:44:42 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEA0B43D68 for ; Wed, 2 Aug 2006 03:44:39 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [192.168.42.24] (andersonbox4.centtech.com [192.168.42.24]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k723icSW036088; Tue, 1 Aug 2006 22:44:38 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44D01FB7.1020105@centtech.com> Date: Tue, 01 Aug 2006 22:44:55 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.4 (X11/20060612) MIME-Version: 1.0 To: Shane Adams References: <20060801205432.54066.qmail@web31812.mail.mud.yahoo.com> In-Reply-To: <20060801205432.54066.qmail@web31812.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1630/Tue Aug 1 10:38:56 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org Subject: Re: Advice for hacking on ufs/ffs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2006 03:44:42 -0000 On 08/01/06 15:54, Shane Adams wrote: > I think I found a bug in the ffs code, specifically in ffs_uninit and the uma_zcreates in ffs_vfsops.c > > You need to explicitly call zdestroy on uma_inode1, uma_ufs1 and uma_ufs2 in ffs_uninit otherwise if UFS/FFS (as a kernel module) is unloaded, you get a panic if you call sysctl -a after the kldunload. > > Now I'm new to freebsd, and on my system UFS/FFS is statically compiled, but I was screwing around and discovered this. Not sure how to report this or the patch (that fixed the problem on my system). Usually, people will post a patch somewhere for review, and/or submit a PR. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-fs@FreeBSD.ORG Wed Aug 2 10:10:14 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D6C0816A4E0 for ; Wed, 2 Aug 2006 10:10:14 +0000 (UTC) (envelope-from qdolan@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3ED743D5C for ; Wed, 2 Aug 2006 10:10:12 +0000 (GMT) (envelope-from qdolan@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so1849013uge for ; Wed, 02 Aug 2006 03:10:11 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:to:message-id:content-type:from:subject:date:x-mailer; b=WyWGYllJppvVzxbid3HN79sKEMNx6lJpgtH1AUpWYACO2rawPXUPl8zHWX5OeNYY88JkcydYZMDywteB7Cb0jq4N1OOhtvM0x63IUfUCbuDB4nI7FIaPfXgBv43PMWkv6UoBqDGpxYLEZrjztlqoN/ojE4in61tqjz2JvxKszX0= Received: by 10.65.59.20 with SMTP id m20mr1050828qbk; Wed, 02 Aug 2006 03:10:11 -0700 (PDT) Received: from ?192.168.100.148? ( [203.144.21.67]) by mx.gmail.com with ESMTP id c12sm2662178nzc.2006.08.02.03.10.08; Wed, 02 Aug 2006 03:10:11 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.2) To: freebsd-fs@freebsd.org Message-Id: From: Q Date: Wed, 2 Aug 2006 20:10:05 +1000 X-Mailer: Apple Mail (2.752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Problem with ufs not releasing vm_pages on busy volume. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2006 10:10:14 -0000 Hi, I have a problem that seems to be related to something ufs related not releasing some vm_pages on busy filesystems. I have two servers running PostgreSQL, one running 6.0-RELEASE, the other 6.1-RELEASE. Both are under the same (fairly heavy) load, performing the same operations in bursts every five minutes. The filesystems in question are 450-500Gig, each server using a different brand of RAID card, they both have soft-updates enabled. The problem is that both servers are seeing an accumulation of about 100Mb of active pages per day (looking at vm.stats.vm.v_active_count) that never get released. The only way to release these pages is to unmount the filesystem and remount it. Failing to do this results in the server eventually locking up. If someone could provide me with some direction on how to go about tracking down what might be causing this to happen it would be much appreciated. -- Seeya...Q -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- _____ / Quinton Dolan - qdolan@gmail.com __ __/ / / __/ / / / __ / _/ / / Gold Coast, QLD, Australia __/ __/ __/ ____/ / - / Ph: +61 419 729 806 _______ / _\ From owner-freebsd-fs@FreeBSD.ORG Wed Aug 2 19:02:48 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0950416A4DE for ; Wed, 2 Aug 2006 19:02:48 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 833D443D58 for ; Wed, 2 Aug 2006 19:02:43 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id k72J2gLo098280 for ; Wed, 2 Aug 2006 14:02:42 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44D0F6E3.7080908@centtech.com> Date: Wed, 02 Aug 2006 14:02:59 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.5 (X11/20060802) MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1632/Wed Aug 2 09:46:05 2006 on mh1.centtech.com X-Virus-Status: Clean Subject: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2006 19:02:48 -0000 Hello everyone, (resend from a post to the -geom list, which I received no replies) I'm writing a file system (read-only), and I need to do some GEOM related locking. I can mount/unmount the filesystem on a vnode backed md disk, but I can't re-mount on that device nor can I get rid (mdconfig -d) of it. It appears to be wedged in some kind of locking. Here's basically what I do: in the mount function for the FS, I do something like this: DROP_GIANT(); g_topology_lock(); error = g_vfs_open(devvp, &cp, "fsname", 0); g_topology_unlock(); PICKUP_GIANT(); What is needed in my unmount function to release those locks? I've tried some combinations of things, like: DROP_GIANT(); g_topology_lock(); # wedges here g_vfs_close(cp, td); g_topology_unlock(); PICKUP_GIANT(); vrele(devvp); How can I debug this and find out what is blocking it? Any help would be greatly appreciated! Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ _______________________________________________ freebsd-geom@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-geom To unsubscribe, send any mail to "freebsd-geom-unsubscribe@freebsd.org" -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-fs@FreeBSD.ORG Wed Aug 2 19:34:10 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A80C616A4EC for ; Wed, 2 Aug 2006 19:34:10 +0000 (UTC) (envelope-from arne_woerner@yahoo.com) Received: from web30301.mail.mud.yahoo.com (web30301.mail.mud.yahoo.com [68.142.200.94]) by mx1.FreeBSD.org (Postfix) with SMTP id 007E443D4C for ; Wed, 2 Aug 2006 19:34:08 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Received: (qmail 47762 invoked by uid 60001); 2 Aug 2006 19:34:08 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=mGI+XwmwNAIwSVsEqOjDRus/ijB6uftRtYkyAtpmPeuWnOBZl1489vEt5d4N7FHuWVzdYVGHtnzOF/wGpG0LzugCUFOQUF9eGyYiUfyKFvSR5bMdYdN2e+AgyrNf/zkKgbWOWgcwZXUjSGb3h6rVaBxGRYJcAU7WKmWVvbDNA6Y= ; Message-ID: <20060802193408.47760.qmail@web30301.mail.mud.yahoo.com> Received: from [213.54.80.200] by web30301.mail.mud.yahoo.com via HTTP; Wed, 02 Aug 2006 12:34:08 PDT Date: Wed, 2 Aug 2006 12:34:08 -0700 (PDT) From: "R. B. Riddick" To: Eric Anderson , freebsd-fs@freebsd.org In-Reply-To: <44D0F6E3.7080908@centtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2006 19:34:10 -0000 --- Eric Anderson wrote: > Here's basically what I do: > in the mount function for the FS, I do something like this: > > DROP_GIANT(); > g_topology_lock(); > error = g_vfs_open(devvp, &cp, "fsname", 0); > g_topology_unlock(); > PICKUP_GIANT(); > > What is needed in my unmount function to release those locks? I've > tried some combinations of things, like: > > DROP_GIANT(); > g_topology_lock(); > # wedges here > g_vfs_close(cp, td); > g_topology_unlock(); > PICKUP_GIANT(); > vrele(devvp); > So the first un-mount works fine? And the second un-mount wedges _before_ g_vfs_close? I cannot find anything really suspicious in ur code... Just 2 thoughts: 1. Do we really hold GIANT, when we mount and un-mount something? 2. R u sure, that we need vrele()? I mean: Why doesn't g_vfs_close() call vrele(), if g_vfs_open() increases that use-count variable? Can u print the use-count variable in the beginning and the end of the mount/un-mount functions? -Arne __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-fs@FreeBSD.ORG Wed Aug 2 19:39:53 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50B0516A4DA for ; Wed, 2 Aug 2006 19:39:53 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCF4D43D53 for ; Wed, 2 Aug 2006 19:39:52 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id k72JdppG004454; Wed, 2 Aug 2006 14:39:52 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44D0FF98.3040701@centtech.com> Date: Wed, 02 Aug 2006 14:40:08 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.5 (X11/20060802) MIME-Version: 1.0 To: "R. B. Riddick" References: <20060802193408.47760.qmail@web30301.mail.mud.yahoo.com> In-Reply-To: <20060802193408.47760.qmail@web30301.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1632/Wed Aug 2 09:46:05 2006 on mh1.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2006 19:39:53 -0000 On 08/02/06 14:34, R. B. Riddick wrote: > --- Eric Anderson wrote: >> Here's basically what I do: >> in the mount function for the FS, I do something like this: >> >> DROP_GIANT(); >> g_topology_lock(); >> error = g_vfs_open(devvp, &cp, "fsname", 0); >> g_topology_unlock(); >> PICKUP_GIANT(); >> >> What is needed in my unmount function to release those locks? I've >> tried some combinations of things, like: >> >> DROP_GIANT(); >> g_topology_lock(); >> # wedges here >> g_vfs_close(cp, td); >> g_topology_unlock(); >> PICKUP_GIANT(); >> vrele(devvp); >> > > So the first un-mount works fine? > And the second un-mount wedges _before_ g_vfs_close? I never get to a second unmount, because I can't mount or mdconfig -d the device after the first mount. > I cannot find anything really suspicious in ur code... > > Just 2 thoughts: > > 1. Do we really hold GIANT, when we mount and un-mount something? I don't know - how can I check? > 2. R u sure, that we need vrele()? I mean: Why doesn't g_vfs_close() call > vrele(), if g_vfs_open() increases that use-count variable? Can u print the > use-count variable in the beginning and the end of the mount/un-mount > functions? Good idea - I'll look into that.. Thanks!! Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-fs@FreeBSD.ORG Wed Aug 2 19:54:49 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BAF316A4DF for ; Wed, 2 Aug 2006 19:54:49 +0000 (UTC) (envelope-from adamsch1@yahoo.com) Received: from web31808.mail.mud.yahoo.com (web31808.mail.mud.yahoo.com [68.142.207.71]) by mx1.FreeBSD.org (Postfix) with SMTP id DCD9143D45 for ; Wed, 2 Aug 2006 19:54:48 +0000 (GMT) (envelope-from adamsch1@yahoo.com) Received: (qmail 52413 invoked by uid 60001); 2 Aug 2006 19:54:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=yIQ9m4ah5w3pr+IW8ANJl7HZ+K1WW/NyaC/WXb6Ugz9KQHPjl892sn9c1l2mI3lj/SmqpKuMSlS7tN4A/A017OmAVaZC1oh8+np8VdmclNWQbkWcoMC7qUvyRtsCXB6QfdYHol0WZMMBAsWZUC21So8kMn9hK6Qz1GBpHnINsMI= ; Message-ID: <20060802195448.52411.qmail@web31808.mail.mud.yahoo.com> Received: from [207.126.230.225] by web31808.mail.mud.yahoo.com via HTTP; Wed, 02 Aug 2006 12:54:48 PDT Date: Wed, 2 Aug 2006 12:54:48 -0700 (PDT) From: Shane Adams To: Eric Anderson , "R. B. Riddick" In-Reply-To: <44D0FF98.3040701@centtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Shane Adams List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2006 19:54:49 -0000 I just look around in the sources for other filesystems for similar patterns and try to infer whats going on. Thats how (in my case) I figured out how to create a file on the filesystem from within the kernel. Shane ----- Original Message ---- From: Eric Anderson To: R. B. Riddick Cc: freebsd-fs@freebsd.org Sent: Wednesday, August 2, 2006 12:40:08 PM Subject: Re: locking questions (regarding file systems) On 08/02/06 14:34, R. B. Riddick wrote: > --- Eric Anderson wrote: >> Here's basically what I do: >> in the mount function for the FS, I do something like this: >> >> DROP_GIANT(); >> g_topology_lock(); >> error = g_vfs_open(devvp, &cp, "fsname", 0); >> g_topology_unlock(); >> PICKUP_GIANT(); >> >> What is needed in my unmount function to release those locks? I've >> tried some combinations of things, like: >> >> DROP_GIANT(); >> g_topology_lock(); >> # wedges here >> g_vfs_close(cp, td); >> g_topology_unlock(); >> PICKUP_GIANT(); >> vrele(devvp); >> > > So the first un-mount works fine? > And the second un-mount wedges _before_ g_vfs_close? I never get to a second unmount, because I can't mount or mdconfig -d the device after the first mount. > I cannot find anything really suspicious in ur code... > > Just 2 thoughts: > > 1. Do we really hold GIANT, when we mount and un-mount something? I don't know - how can I check? > 2. R u sure, that we need vrele()? I mean: Why doesn't g_vfs_close() call > vrele(), if g_vfs_open() increases that use-count variable? Can u print the > use-count variable in the beginning and the end of the mount/un-mount > functions? Good idea - I'll look into that.. Thanks!! Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ _______________________________________________ freebsd-fs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-fs To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" From owner-freebsd-fs@FreeBSD.ORG Wed Aug 2 20:03:42 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6278616A4DD for ; Wed, 2 Aug 2006 20:03:42 +0000 (UTC) (envelope-from ssedov@mbsd.msk.ru) Received: from com1.ht-systems.ru (com1.ht-systems.ru [83.97.104.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FF0043D53 for ; Wed, 2 Aug 2006 20:03:41 +0000 (GMT) (envelope-from ssedov@mbsd.msk.ru) Received: from [217.118.83.1] (helo=fonon.realnet) by com1.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1G8N4C-0002mC-3v for freebsd-fs@freebsd.org; Thu, 03 Aug 2006 00:11:47 +0400 Received: from localhost (localhost [127.0.0.1]) by fonon.realnet (Postfix) with ESMTP id A9857121EA for ; Thu, 3 Aug 2006 00:03:16 +0400 (MSD) Date: Thu, 3 Aug 2006 00:03:16 +0400 From: Stanislav Sedov To: freebsd-fs@freebsd.org Message-ID: <20060803000316.6b371691@localhost> In-Reply-To: <44D0F6E3.7080908@centtech.com> References: <44D0F6E3.7080908@centtech.com> Organization: MBSD labs, Inc. X-Operating-System: FreeBSD X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_SzOaIALrqLZ=.o3vbyqg8Q7"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona 1.6.0 Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2006 20:03:42 -0000 --Sig_SzOaIALrqLZ=.o3vbyqg8Q7 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On Wed, 02 Aug 2006 14:02:59 -0500 Eric Anderson mentioned: > Hello everyone, > (resend from a post to the -geom list, which I received no replies) >=20 > I'm writing a file system (read-only), and I need to do some GEOM > related locking. I can mount/unmount the filesystem on a vnode backed > md disk, but I can't re-mount on that device nor can I get rid (mdconfig > -d) of it. It appears to be wedged in some kind of locking. >=20 > Here's basically what I do: > in the mount function for the FS, I do something like this: >=20 > DROP_GIANT(); > g_topology_lock(); > error =3D g_vfs_open(devvp, &cp, "fsname", 0); > g_topology_unlock(); > PICKUP_GIANT(); >=20 >=20 > What is needed in my unmount function to release those locks? I've > tried some combinations of things, like: >=20 >=20 > DROP_GIANT(); > g_topology_lock(); > # wedges here > g_vfs_close(cp, td); > g_topology_unlock(); > PICKUP_GIANT(); > vrele(devvp); >=20 > How can I debug this and find out what is blocking it? >=20 > Any help would be greatly appreciated! >=20 > Eric >=20 >=20 >=20 It seems that device or geom isn't unlocked. Do you call VOP_UNLOCK(devvp) after g_vfs_open()? You can enable geom locks debugging by manipulation sys.kern.geom.debug values.=20 --=20 Stanislav Sedov MBSD labs, Inc. =F2=CF=D3=D3=C9=D1, =ED=CF=D3=CB=D7=C1 http://mbsd.msk.ru -------------------------------------------------------------------- If the facts don't fit the theory, change the facts. -- A. Einstein -------------------------------------------------------------------- PGP fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 --Sig_SzOaIALrqLZ=.o3vbyqg8Q7 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFE0QUEK/VZk+smlYERAv6kAJ4vzUb05NFGyTlEEs7JtHh6EnlYjgCfbEfE P/zcNuQqiufsSAnqNcTmGHI= =ks8l -----END PGP SIGNATURE----- --Sig_SzOaIALrqLZ=.o3vbyqg8Q7-- From owner-freebsd-fs@FreeBSD.ORG Thu Aug 3 04:08:00 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B9CD16A4DD for ; Thu, 3 Aug 2006 04:08:00 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DCF243D46 for ; Thu, 3 Aug 2006 04:07:59 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [192.168.42.24] (andersonbox4.centtech.com [192.168.42.24]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k7347wQo070084; Wed, 2 Aug 2006 23:07:59 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44D176AF.8020300@centtech.com> Date: Wed, 02 Aug 2006 23:08:15 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.5 (X11/20060802) MIME-Version: 1.0 To: "R. B. Riddick" References: <20060802193408.47760.qmail@web30301.mail.mud.yahoo.com> In-Reply-To: <20060802193408.47760.qmail@web30301.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1634/Wed Aug 2 17:32:49 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 04:08:00 -0000 On 08/02/06 14:34, R. B. Riddick wrote: > --- Eric Anderson wrote: >> Here's basically what I do: >> in the mount function for the FS, I do something like this: >> >> DROP_GIANT(); >> g_topology_lock(); >> error = g_vfs_open(devvp, &cp, "fsname", 0); >> g_topology_unlock(); >> PICKUP_GIANT(); >> >> What is needed in my unmount function to release those locks? I've >> tried some combinations of things, like: >> >> DROP_GIANT(); >> g_topology_lock(); >> # wedges here >> g_vfs_close(cp, td); >> g_topology_unlock(); >> PICKUP_GIANT(); >> vrele(devvp); >> > > So the first un-mount works fine? > And the second un-mount wedges _before_ g_vfs_close? > > I cannot find anything really suspicious in ur code... > > Just 2 thoughts: > > 1. Do we really hold GIANT, when we mount and un-mount something? > > 2. R u sure, that we need vrele()? I mean: Why doesn't g_vfs_close() call > vrele(), if g_vfs_open() increases that use-count variable? Can u print the > use-count variable in the beginning and the end of the mount/un-mount Looks like after mounting it, the use_count is 1. When unmounting, it starts at 1, and moves to 0 after doing a vflush, a g_topology_lock, but before the g_vfs_close. Here's the unmount code snippet: # here use_count is 1 error = vflush(mp, 1, flags, td); if (error) return (error); DROP_GIANT(); g_topology_lock(); # this is where the use_count is now zero, and it blocks g_vfs_close(cp, td); g_topology_unlock(); PICKUP_GIANT(); vrele(devvp); Is it blocking because the use_count is already 0? Is the vflush breaking things? Thanks! Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-fs@FreeBSD.ORG Thu Aug 3 04:35:56 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C48D116A4DE for ; Thu, 3 Aug 2006 04:35:56 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 288C743D5A for ; Thu, 3 Aug 2006 04:35:56 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [192.168.42.24] (andersonbox4.centtech.com [192.168.42.24]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id k734Zt3F090709 for ; Wed, 2 Aug 2006 23:35:55 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44D17D3C.80406@centtech.com> Date: Wed, 02 Aug 2006 23:36:12 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.5 (X11/20060802) MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1634/Wed Aug 2 17:32:49 2006 on mh1.centtech.com X-Virus-Status: Clean Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 04:35:56 -0000 > On Wed, 02 Aug 2006 14:02:59 -0500 > Eric Anderson mentioned: > >> Hello everyone, >> (resend from a post to the -geom list, which I received no replies) >> >> I'm writing a file system (read-only), and I need to do some GEOM >> related locking. I can mount/unmount the filesystem on a vnode backed >> md disk, but I can't re-mount on that device nor can I get rid (mdconfig >> -d) of it. It appears to be wedged in some kind of locking. >> >> Here's basically what I do: >> in the mount function for the FS, I do something like this: >> >> DROP_GIANT(); >> g_topology_lock(); >> error = g_vfs_open(devvp, &cp, "fsname", 0); >> g_topology_unlock(); >> PICKUP_GIANT(); >> >> >> What is needed in my unmount function to release those locks? I've >> tried some combinations of things, like: >> >> >> DROP_GIANT(); >> g_topology_lock(); >> # wedges here >> g_vfs_close(cp, td); >> g_topology_unlock(); >> PICKUP_GIANT(); >> vrele(devvp); >> >> How can I debug this and find out what is blocking it? >> >> Any help would be greatly appreciated! >> >> Eric >> >> >> > > It seems that device or geom isn't unlocked. Do you call VOP_UNLOCK(devvp) > after g_vfs_open()? I was not calling VOP_UNLOCK, but have added it, and it makes no difference. > You can enable geom locks debugging by manipulation sys.kern.geom.debug > values. That didn't seem to print anything. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-fs@FreeBSD.ORG Thu Aug 3 04:52:13 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9C7316A4DA for ; Thu, 3 Aug 2006 04:52:13 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DB5243D53 for ; Thu, 3 Aug 2006 04:52:13 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [192.168.42.24] (andersonbox4.centtech.com [192.168.42.24]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id k734qCXq093358; Wed, 2 Aug 2006 23:52:12 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44D1810D.9070808@centtech.com> Date: Wed, 02 Aug 2006 23:52:29 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.5 (X11/20060802) MIME-Version: 1.0 To: Eric Anderson References: <20060802193408.47760.qmail@web30301.mail.mud.yahoo.com> <44D176AF.8020300@centtech.com> In-Reply-To: <44D176AF.8020300@centtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1634/Wed Aug 2 17:32:49 2006 on mh1.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 04:52:13 -0000 On 08/02/06 23:08, Eric Anderson wrote: > On 08/02/06 14:34, R. B. Riddick wrote: >> --- Eric Anderson wrote: >>> Here's basically what I do: >>> in the mount function for the FS, I do something like this: >>> >>> DROP_GIANT(); >>> g_topology_lock(); >>> error = g_vfs_open(devvp, &cp, "fsname", 0); >>> g_topology_unlock(); >>> PICKUP_GIANT(); >>> >>> What is needed in my unmount function to release those locks? I've >>> tried some combinations of things, like: >>> >>> DROP_GIANT(); >>> g_topology_lock(); >>> # wedges here >>> g_vfs_close(cp, td); >>> g_topology_unlock(); >>> PICKUP_GIANT(); >>> vrele(devvp); >>> >> So the first un-mount works fine? >> And the second un-mount wedges _before_ g_vfs_close? >> >> I cannot find anything really suspicious in ur code... >> >> Just 2 thoughts: >> >> 1. Do we really hold GIANT, when we mount and un-mount something? >> >> 2. R u sure, that we need vrele()? I mean: Why doesn't g_vfs_close() call >> vrele(), if g_vfs_open() increases that use-count variable? Can u print the >> use-count variable in the beginning and the end of the mount/un-mount > > Looks like after mounting it, the use_count is 1. When unmounting, it > starts at 1, and moves to 0 after doing a vflush, a g_topology_lock, but > before the g_vfs_close. > > Here's the unmount code snippet: > > # here use_count is 1 > error = vflush(mp, 1, flags, td); > if (error) > return (error); > > DROP_GIANT(); > g_topology_lock(); > # this is where the use_count is now zero, and it blocks > g_vfs_close(cp, td); > g_topology_unlock(); > PICKUP_GIANT(); > vrele(devvp); > > Is it blocking because the use_count is already 0? Is the vflush > breaking things? Actually, I misinformed you earlier - I can't actually unmount, because it hangs during the first unmount. It will only unmount successfully if I remove the block above (the DROP_GIANT down to PICKUP_GIANT). Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-fs@FreeBSD.ORG Thu Aug 3 06:14:32 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 547DC16A4DE for ; Thu, 3 Aug 2006 06:14:32 +0000 (UTC) (envelope-from arne_woerner@yahoo.com) Received: from web30307.mail.mud.yahoo.com (web30307.mail.mud.yahoo.com [68.142.200.100]) by mx1.FreeBSD.org (Postfix) with SMTP id 52FF543D5D for ; Thu, 3 Aug 2006 06:14:30 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Received: (qmail 33045 invoked by uid 60001); 3 Aug 2006 06:14:29 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ZAOxtndBllr1NmmMJnBHzPEtg9FTO3WQZVW6MrkzSwZL9mvcFbPZEjVkBT6XOgSxeYcIIjJPetJa00NK+7jKjWbm2IHSS+wyLIjtklqNg/1sarmMVpbnNOl5PJc6FSd8WlLnWHgJJmx2lFimR6pI1HrmTsTdeWC68X1PlzmjmuA= ; Message-ID: <20060803061429.33043.qmail@web30307.mail.mud.yahoo.com> Received: from [213.54.80.200] by web30307.mail.mud.yahoo.com via HTTP; Wed, 02 Aug 2006 23:14:29 PDT Date: Wed, 2 Aug 2006 23:14:29 -0700 (PDT) From: "R. B. Riddick" To: Eric Anderson In-Reply-To: <44D176AF.8020300@centtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 06:14:32 -0000 --- Eric Anderson wrote: > # here use_count is 1 > error = vflush(mp, 1, flags, td); > if (error) > return (error); > > DROP_GIANT(); > g_topology_lock(); > # this is where the use_count is now zero, and it blocks > g_vfs_close(cp, td); > g_topology_unlock(); > PICKUP_GIANT(); > vrele(devvp); > > Is it blocking because the use_count is already 0? Is the vflush > breaking things? > >From the man page of vflush() I would guess, that u call it too early or unnecessarily... My feeling says: Open & Close it... ;-) Or did u read a tutorial, that said u should do vflush() and vrele()? I personally find that both calls should be done in the close() function... > Actually, I misinformed you earlier - I can't actually unmount, because > it hangs during the first unmount. It will only unmount successfully if > I remove the block above (the DROP_GIANT down to PICKUP_GIANT). > Hmm... Did u try to run without vflush() and vrele()? :-) -Arne __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-fs@FreeBSD.ORG Thu Aug 3 16:15:29 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C852016A4DA; Thu, 3 Aug 2006 16:15:29 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F3F043D45; Thu, 3 Aug 2006 16:15:29 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 8627E1A3C23; Thu, 3 Aug 2006 09:15:29 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id B04595125B; Thu, 3 Aug 2006 12:15:27 -0400 (EDT) Date: Thu, 3 Aug 2006 12:15:26 -0400 From: Kris Kennaway To: etalk etalk Message-ID: <20060803161525.GA42517@xor.obsecurity.org> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Cc: freebsd-fs@freebsd.org, freebsd-performance@freebsd.org Subject: Re: about the performance comparsion of 6.1 vs 5.3 on amd64 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 16:15:29 -0000 --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 14, 2006 at 05:20:00PM +0800, etalk etalk wrote: > I did some test about io performance of bsd6.1 and bsd5.3 on amd64=20 > machine , and i didn't see any obvious performance's improvement . > Is there anybody know how about the performance improvement of bsd6.1= =20 > when comparing to bsd5.3 on amd64 machine, and is there any tools that ca= n=20 > let me see the improvement. The difference is that in 6.x it is no longer locked by Giant, meaning that concurrent operations can be performed concurrently instead of being explicitly serialized. This is particularly noticeable if there are other tasks also competing for the Giant lock, such as your disk driver. See http://www.bsdcan.org/2006/papers/FilesystemPerformance.pdf for more details. Kris --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFE0iEdWry0BWjoQKURApASAKD24kQK64bgMkjyvXhprrbYgDRSEACgrgLV 3cix/YCZraeYdBqcG6f8cgg= =vaDW -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv-- From owner-freebsd-fs@FreeBSD.ORG Thu Aug 3 18:13:17 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B748616A4DD for ; Thu, 3 Aug 2006 18:13:17 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id C458143E18 for ; Thu, 3 Aug 2006 18:12:42 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id k73ICfV5004831; Thu, 3 Aug 2006 13:12:41 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44D23CAA.10907@centtech.com> Date: Thu, 03 Aug 2006 13:12:58 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.5 (X11/20060802) MIME-Version: 1.0 To: "R. B. Riddick" References: <20060803061429.33043.qmail@web30307.mail.mud.yahoo.com> In-Reply-To: <20060803061429.33043.qmail@web30307.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1634/Wed Aug 2 17:32:49 2006 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 18:13:17 -0000 On 08/03/06 01:14, R. B. Riddick wrote: > --- Eric Anderson wrote: >> # here use_count is 1 >> error = vflush(mp, 1, flags, td); >> if (error) >> return (error); >> >> DROP_GIANT(); >> g_topology_lock(); >> # this is where the use_count is now zero, and it blocks >> g_vfs_close(cp, td); >> g_topology_unlock(); >> PICKUP_GIANT(); >> vrele(devvp); >> >> Is it blocking because the use_count is already 0? Is the vflush >> breaking things? >> >>From the man page of vflush() I would guess, that u call it too early or > unnecessarily... > > My feeling says: Open & Close it... ;-) > > Or did u read a tutorial, that said u should do vflush() and vrele()? > I personally find that both calls should be done in the close() function... Hahahah! A tutorial! :) I'd *love* to read a tutorial on this, but I can't find one! >> Actually, I misinformed you earlier - I can't actually unmount, because >> it hangs during the first unmount. It will only unmount successfully if >> I remove the block above (the DROP_GIANT down to PICKUP_GIANT). >> > Hmm... Did u try to run without vflush() and vrele()? :-) I've tried getting rid of the vrele and vflush, and that doesn't help. Any other ideas? I have to be missing something very simple here.. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-fs@FreeBSD.ORG Thu Aug 3 19:36:49 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C406116A4DF for ; Thu, 3 Aug 2006 19:36:49 +0000 (UTC) (envelope-from arne_woerner@yahoo.com) Received: from web30308.mail.mud.yahoo.com (web30308.mail.mud.yahoo.com [68.142.200.101]) by mx1.FreeBSD.org (Postfix) with SMTP id 42BB443D80 for ; Thu, 3 Aug 2006 19:36:34 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Received: (qmail 91251 invoked by uid 60001); 3 Aug 2006 19:36:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=BJnF6fPqnEfV4Ji5FDTI1QaiISXFMiAM7+1yDlVMPG0a2TuynMPSuW9DisJLi3h6TwGUu0GO0T7n2MXjwCOOGySY7+o/MrUONdSnz9VwJmLKz/KxyF6wQ3dtIuJ7uo3UFlgvZKfpEv5iPnCdu658c9mNUA2g2rs7N9gxh5dCyOs= ; Message-ID: <20060803193633.91249.qmail@web30308.mail.mud.yahoo.com> Received: from [213.54.80.200] by web30308.mail.mud.yahoo.com via HTTP; Thu, 03 Aug 2006 12:36:33 PDT Date: Thu, 3 Aug 2006 12:36:33 -0700 (PDT) From: "R. B. Riddick" To: Eric Anderson In-Reply-To: <44D23CAA.10907@centtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 19:36:49 -0000 --- Eric Anderson wrote: > On 08/03/06 01:14, R. B. Riddick wrote: > > --- Eric Anderson wrote: > >> # here use_count is 1 > >> error = vflush(mp, 1, flags, td); > >> if (error) > >> return (error); > >> > >> DROP_GIANT(); > >> g_topology_lock(); > >> # this is where the use_count is now zero, and it blocks > >> g_vfs_close(cp, td); > >> g_topology_unlock(); > >> PICKUP_GIANT(); > >> vrele(devvp); > >> > >> Is it blocking because the use_count is already 0? Is the vflush > >> breaking things? > >> > >>From the man page of vflush() I would guess, that u call it too early or > > unnecessarily... > > > > My feeling says: Open & Close it... ;-) > > > > Hmm... Did u try to run without vflush() and vrele()? :-) > > I've tried getting rid of the vrele and vflush, and that doesn't help. > Hmm... So the g_vfs_close() always deadlocks with and without vflush()? That is strange... I mean: When I open a regular file, I can close it... Did u try to call g_vfs_close() immediately after the g_vfs_open()? > Any other ideas? I have to be missing something very simple here.. > Yes. Most likely it is something simple and orthogonal, because: Humans often have similar ideas of "simple"... ;-) -Arne __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-fs@FreeBSD.ORG Thu Aug 3 19:51:20 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8330D16A4DD for ; Thu, 3 Aug 2006 19:51:20 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id DAB5043D6A for ; Thu, 3 Aug 2006 19:51:19 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id k73JpHfi036879; Thu, 3 Aug 2006 14:51:18 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44D253C7.6030108@centtech.com> Date: Thu, 03 Aug 2006 14:51:35 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.5 (X11/20060802) MIME-Version: 1.0 To: "R. B. Riddick" References: <20060803193633.91249.qmail@web30308.mail.mud.yahoo.com> In-Reply-To: <20060803193633.91249.qmail@web30308.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1634/Wed Aug 2 17:32:49 2006 on mh1.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 19:51:20 -0000 On 08/03/06 14:36, R. B. Riddick wrote: > --- Eric Anderson wrote: >> On 08/03/06 01:14, R. B. Riddick wrote: >>> --- Eric Anderson wrote: >>>> # here use_count is 1 >>>> error = vflush(mp, 1, flags, td); >>>> if (error) >>>> return (error); >>>> >>>> DROP_GIANT(); >>>> g_topology_lock(); >>>> # this is where the use_count is now zero, and it blocks >>>> g_vfs_close(cp, td); >>>> g_topology_unlock(); >>>> PICKUP_GIANT(); >>>> vrele(devvp); >>>> >>>> Is it blocking because the use_count is already 0? Is the vflush >>>> breaking things? >>>> >>> >From the man page of vflush() I would guess, that u call it too early or >>> unnecessarily... >>> >>> My feeling says: Open & Close it... ;-) >>> >>> Hmm... Did u try to run without vflush() and vrele()? :-) >> I've tried getting rid of the vrele and vflush, and that doesn't help. >> > Hmm... So the g_vfs_close() always deadlocks with and without vflush()? > That is strange... I mean: When I open a regular file, I can close it... Correct.. > Did u try to call g_vfs_close() immediately after the g_vfs_open()? I just did, and looks like the g_vfs_close directly after the g_vfs_open block (I copy-pasted) works ok. When unmounting, it then panics on g_vfs_close, probably because it's already closed from before. >> Any other ideas? I have to be missing something very simple here.. >> > Yes. Most likely it is something simple and orthogonal, because: Humans often > have similar ideas of "simple"... ;-) > > -Arne > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-fs@FreeBSD.ORG Thu Aug 3 20:02:07 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3D3A16A4DE for ; Thu, 3 Aug 2006 20:02:07 +0000 (UTC) (envelope-from arne_woerner@yahoo.com) Received: from web30315.mail.mud.yahoo.com (web30315.mail.mud.yahoo.com [68.142.201.233]) by mx1.FreeBSD.org (Postfix) with SMTP id 264A843D72 for ; Thu, 3 Aug 2006 20:02:00 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Received: (qmail 61100 invoked by uid 60001); 3 Aug 2006 20:01:58 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=adI6jR0rh/jJ/ZVgir8ZPKHPiLMyxejUp8w5zp2/4u99dyGQkNp/q7gXXA6G3rnT2VsW8n8fr/LdvHghfkzdSeKuL/twZGG0ip6s9lrXBJDZL3rahVLG3auEDeFmz6wCFiBNhf4stOzdz58ua0/xmtTCEa8gY3UDL+9no566rjo= ; Message-ID: <20060803200158.61098.qmail@web30315.mail.mud.yahoo.com> Received: from [213.54.80.200] by web30315.mail.mud.yahoo.com via HTTP; Thu, 03 Aug 2006 13:01:58 PDT Date: Thu, 3 Aug 2006 13:01:58 -0700 (PDT) From: "R. B. Riddick" To: Eric Anderson In-Reply-To: <44D253C7.6030108@centtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 20:02:07 -0000 --- Eric Anderson wrote: > I just did, and looks like the g_vfs_close directly after the g_vfs_open > block (I copy-pasted) works ok. When unmounting, it then panics on > g_vfs_close, probably because it's already closed from before. > So the sequence: ... g_vfs_open(...); g_vfs_close(...); ... works fine. What r u doing between the mount and the unmount calls? Maybe something changes, so that ...close() deadlocks? Did u try to put debug printf's in the g_vfs_close() function? :-) Or is there a program somewhere, that uses g_vfs_open/close? Maybe u could learn/copy&paste from hpfs? http://fxr.watson.org/fxr/ident?i=g_vfs_close -Arne __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-fs@FreeBSD.ORG Fri Aug 4 10:55:23 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BAB316A4EB for ; Fri, 4 Aug 2006 10:55:23 +0000 (UTC) (envelope-from pspirovxzp@tpnet.pl) Received: from due74.internetdsl.tpnet.pl (due74.internetdsl.tpnet.pl [83.19.216.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFC1B43D4C for ; Fri, 4 Aug 2006 10:54:55 +0000 (GMT) (envelope-from pspirovxzp@tpnet.pl) From: "promoting" To: freebsd-fs@freebsd.org Date: Fri, 4 Aug 2006 12:54:15 -0200 MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_NextPart_000_0005_01C6B7C5.17143B40" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: Aca3xRcYMZNPTcwnRNqw4UP8aS0q1Q== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Message-Id: <03821AFFADDC5D6.4B90555C8F@tpnet.pl> X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Heinlein X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2006 10:55:23 -0000 ------=_NextPart_000_0005_01C6B7C5.17143B40 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit strength. years lobbied no. There describe comments property logos Code derived PHPNuke Corporate Websites during school. Know Too Know Too Much Woah Hey koala bear crapped rainbow Animal Friendly Boycott RIAA bf Variation F: .exe Pie Board post. Were not just smoking blow up ass. Trixie blowing smoke Trixies User ForWhen driving youve road.Same goes lookout early practice NOWFeel topServer Media Remoting Flextrade JRuntrade Designer Try Info LiveCycle products RoboHelp topMobile Elements plus Album Camera Raw DNG topVideo Encorereg DVD stepsBuy Volume purchase Customer Updates Exchanges Security Privacy License Feedback Copyright Systems rights signifies agreement Terms updated .Search powered Stuff Hot stereo multi aux inputs Andrew Jones Desktop Digital cameras Hifi separates cinema Palmtops Portable Give sale Jul Bedroom gear more: Nextgen gaming bikes Gaming HiFi Cinema Networked Robots SatNav Wear Transport UK Broadband Links Map Abandonia DOS Sanyos midget shooters foe fret debut effort penchant MiniDV tapes Cameras Nokia Corporate Websites Content win: iecached: August PDT education OW Wow Identify address eschew culprits whether owies PDT education OW Wow Identify address eschew culprits whether owies also symptoms. rates Chances why because male partners STI havent arent Id like remind them that trusted TV could helpful rounding others pickup lines often theseare also symptoms. Thursday Quimby polls nifty features Potholes Dead Ends: world. When band nobody hurt. Phil Harman Playing Frank Sinatra Sumos pink Why sore mouth fatigue. Important Safety Beware people who dislike cats. Irish Proverb infants Has Gone Before few moments billion black holes smush together beautiful eternal quantum Planet Express Ship Not Tagline glory walks doom. Who made Judge Judy Uh oh comes Gospel according puke. inner Divas enough stage. Loose egos involved Proof Marti likes Monkeys she screwing grades again Because shes sharpest apple barrel. Cassies Dad Vamiper girl dealing giving long sloppy wordkiss. funding Find aboutour vital Want aims whos talking meet helping globe since Donate Search Sound Blaster emulation drivers note Drivers category. done program notice: NTFS mountain spanking Thai scooter drink Liebe mein Dieter KarlHeinz named Joe.... said allowing expense likely buy copying case fancy machine. St. Louis Jan. BartCop blinding brilliant from heaven. Will Ferrell James Lipton SNL parody Inside Actors Studio From kitchen piehole. Maya Rudolph D. Versace nearly werethe widely ------=_NextPart_000_0005_01C6B7C5.17143B40-- From owner-freebsd-fs@FreeBSD.ORG Fri Aug 4 20:02:09 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85ADC16A4DA for ; Fri, 4 Aug 2006 20:02:09 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id D368643D45 for ; Fri, 4 Aug 2006 20:02:08 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id k74K27T8067830; Fri, 4 Aug 2006 15:02:07 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <44D3A7D1.1070406@centtech.com> Date: Fri, 04 Aug 2006 15:02:25 -0500 From: Eric Anderson User-Agent: Thunderbird 1.5.0.5 (X11/20060802) MIME-Version: 1.0 To: "R. B. Riddick" References: <20060803200158.61098.qmail@web30315.mail.mud.yahoo.com> In-Reply-To: <20060803200158.61098.qmail@web30315.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1635/Fri Aug 4 08:00:11 2006 on mh1.centtech.com X-Virus-Status: Clean Cc: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2006 20:02:09 -0000 On 08/03/06 15:01, R. B. Riddick wrote: > --- Eric Anderson wrote: >> I just did, and looks like the g_vfs_close directly after the g_vfs_open >> block (I copy-pasted) works ok. When unmounting, it then panics on >> g_vfs_close, probably because it's already closed from before. >> > So the sequence: > ... > g_vfs_open(...); > g_vfs_close(...); > ... > works fine. > > What r u doing between the mount and the unmount calls? > Maybe something changes, so that ...close() deadlocks? > > Did u try to put debug printf's in the g_vfs_close() function? :-) No, I've been trying to avoid that :) > Or is there a program somewhere, that uses g_vfs_open/close? > Maybe u could learn/copy&paste from hpfs? > http://fxr.watson.org/fxr/ident?i=g_vfs_close I've looked at other fs's, and it's helpful, but it's a bug in my code that is the problem. :) I think I know the block of code the problem is in, now I just have to hunt it down. If I move the g_vfs_close around, I can get a panic like: panic: lockmgr: locking against myself Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-fs@FreeBSD.ORG Sat Aug 5 12:03:20 2006 Return-Path: X-Original-To: fs@freebsd.org Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7992F16A4DD for ; Sat, 5 Aug 2006 12:03:20 +0000 (UTC) (envelope-from lnxitvcsqx@bts-internet.com) Received: from [88.106.111.125] (88-106-111-125.dynamic.dsl.as9105.com [88.106.111.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 692D443D4C for ; Sat, 5 Aug 2006 12:03:16 +0000 (GMT) (envelope-from lnxitvcsqx@bts-internet.com) From: "general operating" To: fs@freebsd.org Date: Sat, 5 Aug 2006 13:03:12 -0100 MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_NextPart_000_0004_01C6B88F.8219F090" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: Aca4j4IZmFKII5bfStilD/dsBqKqQQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Message-Id: <18C9339C8F45831.156DBC60F7@bts-internet.com> X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: barcode X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2006 12:03:20 -0000 ------=_NextPart_000_0004_01C6B88F.8219F090 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit How usISO lumiflex usLeuze GmbH usdetect identify protect code KBSafety general operating Hardware reasons soiling proceed folder Overview and Light Laser DPSafety Devices Operating Data FAQSafety RSsoft V. folder PROFIBUS KBSafety general operating Hardware manual RS/ASi to MB ea sheet KBData Test pieces Cleaning Set Analysis box Bridging plug the optical window KBSee for changing window. Here you will find detailed with diagrams showing correct procedure cleaning KBIn order luso MBData Casetta danalisi Caixa eacutes uuml ecd Deutsch reserve rightto make changes last Update: print site bookmark top page The Leuze Owen How usISO lumiflex usLeuze GmbH usdetect identify protect code vision cleaning KBIn order carry out windows scattered light plates most effective way here obtain reasons soiling proceed when KBDCAD model MBTUumlV KBTUumlV RS/profi SAFE KBEC Declarati seguridad Caja sicurezza direttive carry out windows scattered light plates most effective way here obtain reasons soiling proceed when KBDCAD model MBTUumlV KBTUumlV RS/profi SAFE KBEC Declarati seguridad Caja sicurezza direttive luso MBData sicurezza direttive luso MBData Casetta danalisi Caixa eacutes uuml ecd Deutsch reserve rightto make changes FAQSafety RSsoft V. folder PROFIBUS KBSafety general operating Hardware manual RS/ASi to MB ea sheet KBData Test pieces Cleaning Set Analysis box Bridging plug KBDCAD model MBTUumlV KBTUumlV RS/profi SAFE KBEC Declarati seguridad V. folder PROFIBUS KBSafety general operating Hardware manual RS/ASi to SAFE KBEC Declarati seguridad Caja sicurezza direttive luso MBData Casetta danalisi Caixa eacutes Interface Sheet readersD write barcode Trade Actual scattered light plates most effective way here obtain eacutes uuml ecd Deutsch reserve rightto make changes last Update: print with diagrams showing correct procedure cleaning KBIn order carry out windows scattered light pieces Cleaning Set Analysis box Bridging plug the optical window KBSee for changing window. Here KBData Test pieces Cleaning Set Analysis box Bridging plug the Casetta detailed with diagrams showing correct procedure cleaning KBIn order carry out windows scattered light correct procedure cleaning KBIn order carry out windows scattered light plates most effective way here obtain reasons Here you will find detailed for changing window. Here you will find model MBTUumlV KBTUumlV RS/profi SAFE KBEC Declarati seguridad Caja sicurezza direttive luso MBTUumlV KBTUumlV RS/profi SAFE KBEC Declarati seguridad Caja sicurezza direttive luso MBData RS/ASi to MB ea sheet procedure cleaning KBIn order carry RS/ASi to MB ea sheet KBData Test pieces Leuze Owen windows scattered light plates most effective way here obtain reasons soiling proceed when KBDCAD model MBTUumlV KBTUumlV RS/profi SAFE KBEC Declarati seguridad window. Here you will find detailed with diagrams showing ------=_NextPart_000_0004_01C6B88F.8219F090-- From owner-freebsd-fs@FreeBSD.ORG Sat Aug 5 15:17:53 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D9E316A4DD for ; Sat, 5 Aug 2006 15:17:53 +0000 (UTC) (envelope-from pelt22@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id 511B443D46 for ; Sat, 5 Aug 2006 15:17:52 +0000 (GMT) (envelope-from pelt22@gmail.com) Received: by wx-out-0506.google.com with SMTP id i27so233087wxd for ; Sat, 05 Aug 2006 08:17:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=c3AP91apU3SgWutZVr3I5OyhDwIb4pzirrTOUogSaJ/9QSA4vgBAGTprWSFAei959Un6koJi78pKZIreQrJNOhI3UdJSRcbB/Xva8TtIEUH33XPHdqSi+MVL+xZDLrz3j60yOx+HA5h2XmUKsQf5ZpTj208v0wK//FRFXaVp5as= Received: by 10.70.100.1 with SMTP id x1mr6120403wxb; Sat, 05 Aug 2006 08:17:51 -0700 (PDT) Received: by 10.70.99.1 with HTTP; Sat, 5 Aug 2006 08:17:51 -0700 (PDT) Message-ID: Date: Sat, 5 Aug 2006 17:17:51 +0200 From: "Michiel Pelt" To: freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: VOP_LOOKUP of .. in msdosfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2006 15:17:53 -0000 Hi, I am developing a filesystem which doesn't have a . and .. in the root. So I emulate them, just like msdosfs does. I looked at the msdosfs code. Correct me if I am wrong, but I think there is something wrong with it. The msdosfs_lookup function in msdosfs_lookup.c has code dealing with the rootdirectory at the label foundroot:. At line 523 (release 6.1 code) of the release code is this piece of code: pdp = vdp; if (flags & ISDOTDOT) { VOP_UNLOCK(pdp, 0, td); error = deget(pmp, cluster, blkoff, &tdp); vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, td); if (error) return (error); *vpp = DETOV(tdp); } This code has been copied from ffs code, but fails for msdosfs. For starters the introduction of the 'pdp' pointer has no function whatsoever. Consider a lookup for .. in the root. In msdosfs the /. and /.. directories are represented by one and the same vnode (see deget() in msdosfs_denode.c). The deget gets and locks the vnode that was unlocked by VOP_UNLOCK. The vn_lock that follows fails with a panic because the vnode is already locked. So why does this not happen in practice? Because the ISDOTDOT case is handled by vfs_lookup and never reaches VOP_LOOKUP. I did get the error because I forgot to set the VV_ROOT flag in the vnode returned by VFS_ROOT ;-(. Best Regards Michiel From owner-freebsd-fs@FreeBSD.ORG Sat Aug 5 23:59:30 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16F4A16A4EC for ; Sat, 5 Aug 2006 23:59:30 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A364A43D70 for ; Sat, 5 Aug 2006 23:59:25 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id BE70210992A; Sun, 6 Aug 2006 09:59:24 +1000 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k75NxMuF029348; Sun, 6 Aug 2006 09:59:23 +1000 Date: Sun, 6 Aug 2006 09:59:22 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Michiel Pelt In-Reply-To: Message-ID: <20060806094905.V2709@delplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-fs@freebsd.org Subject: Re: VOP_LOOKUP of .. in msdosfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2006 23:59:30 -0000 On Sat, 5 Aug 2006, Michiel Pelt wrote: > ... > The msdosfs_lookup function in msdosfs_lookup.c has code dealing with the > rootdirectory at the label foundroot:. At line 523 (release 6.1 code) of the > release code is this piece of code: > > pdp = vdp; > if (flags & ISDOTDOT) { > VOP_UNLOCK(pdp, 0, td); > error = deget(pmp, cluster, blkoff, &tdp); > vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, td); > if (error) > return (error); > *vpp = DETOV(tdp); > } > > This code has been copied from ffs code, but fails for msdosfs. > For starters the introduction of the 'pdp' pointer has no function > whatsoever. > > Consider a lookup for .. in the root. In msdosfs the /. and /.. directories > are represented by one and the same vnode (see deget() in msdosfs_denode.c). > The deget gets and locks the vnode that was unlocked by VOP_UNLOCK. The > vn_lock that follows fails with a panic because the vnode is already locked. It seems to have been correct in 5.2: % pdp = vdp; % if (flags & ISDOTDOT) { % VOP_UNLOCK(pdp, 0, td); % cnp->cn_flags |= PDIRUNLOCK; % error = deget(pmp, cluster, blkoff, &tdp); % if (error) { % vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, td); % cnp->cn_flags &= ~PDIRUNLOCK; % return (error); % } Apparently, deget() didn't lock, and we only needed to lock in the error case. Or maybe the problem went unnoticed because the error case is even rarer than the ISDOTDOT case. > So why does this not happen in practice? Because the ISDOTDOT case is > handled by vfs_lookup and never reaches VOP_LOOKUP. > > I did get the error because I forgot to set the VV_ROOT flag in the vnode > returned by VFS_ROOT ;-(. I think the whole ISDOTDOT case is unreachable for the root of an msdosfs file system, at least in 5.2, since msdosfs can't be mounted on "/" so ".." at the root is never in the current file system and so it must be handled by vfs_lookup() and VFS_ROOT must be set so that it is handled there. Bruce