From owner-freebsd-arch@FreeBSD.ORG Fri Apr 15 12:36:40 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23AED106566B; Fri, 15 Apr 2011 12:36:40 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id B5E008FC17; Fri, 15 Apr 2011 12:36:39 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 7D32C1DD9D8; Fri, 15 Apr 2011 14:36:38 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 6F01F17376; Fri, 15 Apr 2011 14:36:38 +0200 (CEST) Date: Fri, 15 Apr 2011 14:36:38 +0200 From: Jilles Tjoelker To: Kostik Belousov Message-ID: <20110415123638.GA79988@stack.nl> References: <20110414213610.GB92382@tops> <20110415093057.GJ48734@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110415093057.GJ48734@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: mdf@freebsd.org, Gleb Kurtsou , FreeBSD Arch Subject: Re: posix_fallocate(2) 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: Fri, 15 Apr 2011 12:36:40 -0000 On Fri, Apr 15, 2011 at 12:30:57PM +0300, Kostik Belousov wrote: > You might find vn_rdwr easier to use then the bare vops. In particular, > it would not omit the mac calls for read/write. I think omitting the MAC call for read is how it should be. The application does not read any data, the read is just the only way to force allocation without destroying existing data. posix_fallocate() should work for write-only files. -- Jilles Tjoelker