From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 18 19:46:56 2008 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 106C716A417 for ; Fri, 18 Jan 2008 19:46:56 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.239]) by mx1.freebsd.org (Postfix) with ESMTP id 9BA8F13C458 for ; Fri, 18 Jan 2008 19:46:55 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by wr-out-0506.google.com with SMTP id 68so508498wra.13 for ; Fri, 18 Jan 2008 11:46:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=45NWJRAP5iG64av2X8TUlS57tm4f+mFw7r0D0PSjCRM=; b=ClhRa92JXZ5xLAm91WogOTYkj2hyTU/U9gRQtHkK4VqGTzc69/YekjgbEGIUY57GBUJmjXfqUGAvnzKKXtfpZFLHPse1LOpPwKUyBCsbbpchvQ/DQ5rI7JQmTfi6wZ1saqPPn+KttENnzasK2hr3OaqIJy19SDiZWXsFqyVLvlE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=M3xdDvtB4XcJD2u7N6DkH8Qffcz1h0Ey6f/EGwuteIRbzwh49+1uIBZJyR5dvbLfM3AEzNHaHz/Ni1LG/Pm5CEQybOzJvBEk4lLpp+5p0Fikm7sREB7uzYwCBPW+qUlq2DM93RBrtysUSwQ4y6hToIHJ7P3GV2CqxIGtIbzJn4U= Received: by 10.150.58.5 with SMTP id g5mr1289912yba.158.1200685614901; Fri, 18 Jan 2008 11:46:54 -0800 (PST) Received: by 10.150.152.8 with HTTP; Fri, 18 Jan 2008 11:46:54 -0800 (PST) Message-ID: <1bd550a00801181146s1ee3fd44x309d7ee9e8db92f9@mail.gmail.com> Date: Fri, 18 Jan 2008 20:46:54 +0100 From: "=?ISO-8859-1?Q?Fernando_Apestegu=EDa?=" To: "Ed Schouten" In-Reply-To: <20080113194954.GG80300@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1bd550a00801131034o2999b85eu589cd8ee18a114ea@mail.gmail.com> <20080113194954.GG80300@hoeg.nl> Cc: FreeBSD Hackers Subject: Re: mutex lock for filesystem list. 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: Fri, 18 Jan 2008 19:46:56 -0000 On 1/13/08, Ed Schouten wrote: > * Fernando Apestegu=EDa wrote: > > I'm trying to write a patch to add a file to the linprocfs. This file > > provides the list of filesystems present in the kernel. > > > > Though I was able to create the file and traverse the list, it's > > clearly unsafe. I would like to know wich semaphore I should lock > > cause I can't find it in the kernel code. > > > > In addition I'd like to know if there is a book similar to the > > Understanding the Linux kernel, but for freebsd. What is the best > > information source to get introduced in the freebsd kernel programming > > (apart of the code itself)? > > You're probably looking through the mountlist? Then you need to make > sure you lock the mountlist_mtx. See src/sys/kern/vfs_mount.c. Hi, My apologies for the delay with the reply by due to a failure in my DSL line, I had no internet connection for several days :( Actually I'm using vfsconf list. What's the difference between mountlist and the one I'm using? Best Regards > > -- > Ed Schouten > WWW: http://g-rave.nl/ > >