From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josef Bacik Subject: Re: [PATCH 2/2] fallocate should be a file operation Date: Fri, 14 Jan 2011 08:12:19 -0500 Message-ID: <20110114131219.GB2558@localhost.localdomain> References: <20110114120743.GB13936@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: viro@zeniv.linux.org.uk, josef@redhat.com, linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from mx1.redhat.com ([209.132.183.28]:29515 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752571Ab1ANNM0 (ORCPT ); Fri, 14 Jan 2011 08:12:26 -0500 Content-Disposition: inline In-Reply-To: <20110114120743.GB13936@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jan 14, 2011 at 01:07:43PM +0100, Christoph Hellwig wrote: > Currently all filesystems except XFS implement fallocate asynchronously, > while XFS forced a commit. Both of these are suboptimal - in case of O_SYNC > I/O we really want our allocation on disk, especially for the !KEEP_SIZE > case where we actually grow the file with user-visible zeroes. On the > other hand always commiting the transaction is a bad idea for fast-path > uses of fallocate like for example in recent Samba versions. Given > that block allocation is a data plane operation anyway change it from > an inode operation to a file operation so that we have the file structure > available that lets us check for O_SYNC. > > This also includes moving the code around for a few of the filesystems, > and remove the already unnedded S_ISDIR checks given that we only wire > up fallocate for regular files. > > Signed-off-by: Christoph Hellwig > Everything looks right, Reviewed-by: Josef Bacik Thanks, Josef