From owner-freebsd-arch@FreeBSD.ORG Thu Mar 1 16:45:12 2012 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9866106564A; Thu, 1 Mar 2012 16:45:12 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 974E58FC1A; Thu, 1 Mar 2012 16:45:11 +0000 (UTC) Received: by eekd17 with SMTP id d17so314788eek.13 for ; Thu, 01 Mar 2012 08:45:10 -0800 (PST) Received-SPF: pass (google.com: domain of gleb.kurtsou@gmail.com designates 10.112.84.1 as permitted sender) client-ip=10.112.84.1; Authentication-Results: mr.google.com; spf=pass (google.com: domain of gleb.kurtsou@gmail.com designates 10.112.84.1 as permitted sender) smtp.mail=gleb.kurtsou@gmail.com; dkim=pass header.i=gleb.kurtsou@gmail.com Received: from mr.google.com ([10.112.84.1]) by 10.112.84.1 with SMTP id u1mr2739670lby.35.1330620310745 (num_hops = 1); Thu, 01 Mar 2012 08:45:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=7S898NWJKgzv2C1Ylz/B72zxBZnpVCk2CQ3ZJMPYCJY=; b=cR6WU+teca3cDe8EeyS4nc9Xkk7XAH2XX09zhYQate7WojlLzWZmU6aM1kLV2EPkm+ JUbhxmBHvJ3Il9sYRRs1Uq3DuzbsoqEcq54noXuvoUPevQGY5BQQzkF1KIOrPUQAYNmH AqWfdvrQYLokuUAwrLN+CDZYPaKAqN5ksZpsQ= Received: by 10.112.84.1 with SMTP id u1mr2248604lby.35.1330620310553; Thu, 01 Mar 2012 08:45:10 -0800 (PST) Received: from localhost ([78.157.92.5]) by mx.google.com with ESMTPS id f2sm3661105lbw.5.2012.03.01.08.45.09 (version=SSLv3 cipher=OTHER); Thu, 01 Mar 2012 08:45:09 -0800 (PST) Date: Thu, 1 Mar 2012 18:45:11 +0200 From: Gleb Kurtsou To: Christoph Hellwig Message-ID: <20120301164511.GA1501@reks> References: <20120203193719.GB3283@deviant.kiev.zoral.com.ua> <20120225151334.GH1344@garage.freebsd.pl> <20120225194630.GI1344@garage.freebsd.pl> <20120301111624.GB30991@reks> <20120301141010.GA7079@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20120301141010.GA7079@infradead.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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 16:45:12 -0000 On (01/03/2012 09:10), Christoph Hellwig wrote: > 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 > My bad. I thought s_vfs_rename_mutex can be optional. Quite unfortunate linux doesn't support concurrent cross-directory renames :) Thanks, Gleb.