From owner-freebsd-arch@FreeBSD.ORG Thu Mar 1 14:10:14 2012 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38250106564A; Thu, 1 Mar 2012 14:10:14 +0000 (UTC) (envelope-from BATV+c43791b1943af153f85b+3112+infradead.org+hch@bombadil.srs.infradead.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:4830:2446:ff00:4687:fcff:fea6:5117]) by mx1.freebsd.org (Postfix) with ESMTP id D66448FC12; Thu, 1 Mar 2012 14:10:12 +0000 (UTC) Received: from hch by bombadil.infradead.org with local (Exim 4.76 #1 (Red Hat Linux)) id 1S36hu-0004G6-VV; Thu, 01 Mar 2012 14:10:11 +0000 Date: Thu, 1 Mar 2012 09:10:10 -0500 From: Christoph Hellwig To: Gleb Kurtsou Message-ID: <20120301141010.GA7079@infradead.org> References: <20120203193719.GB3283@deviant.kiev.zoral.com.ua> <20120225151334.GH1344@garage.freebsd.pl> <20120225194630.GI1344@garage.freebsd.pl> <20120301111624.GB30991@reks> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120301111624.GB30991@reks> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Cc: Attilio Rao , Konstantin Belousov , Pawel Jakub Dawidek , arch@freebsd.org Subject: Re: Prefaulting for i/o buffers X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2012 14:10:14 -0000 On Thu, Mar 01, 2012 at 01:16:24PM +0200, Gleb Kurtsou wrote: > Are you aware of a real "libraries for file systems" VFS example? It > sounds very interesting but I'm afraid it's going to look good only in > theory. E.g. locking at file system level (Darwin, Dragonfly BSD) looks > rather messy (IMHO) and more likely to be bug prone. On the other side > Linux has optional per file system rename lock making VOP_RENAME > implementation much easier, while ours is tremendously difficult to do > right. All namespace locking in Linux is in the VFS, and it mandatory. A filesystem wide lock is only used for cross-directory renames. A more detailed description is here: http://git.kernel.dk/?p=linux.git;a=blob;f=Documentation/filesystems/directory-locking