From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753020Ab2AaJ1w (ORCPT ); Tue, 31 Jan 2012 04:27:52 -0500 Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:53052 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752292Ab2AaJ1t (ORCPT ); Tue, 31 Jan 2012 04:27:49 -0500 Date: Tue, 31 Jan 2012 04:27:48 -0500 From: Christoph Hellwig To: Kelbel Junior Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, xfs@oss.sgi.com Subject: Re: XFS problem Message-ID: <20120131092748.GA22999@infradead.org> References: <20120124213936.GA1505@infradead.org> <20120127105859.GC23335@infradead.org> <20120127191532.GA25529@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 30, 2012 at 06:34:52PM -0200, Kelbel Junior wrote: > How you prefer to pre allocate space? > xfs I/O or by 'dd' to do it? > > What other information you would like to better understand and manage > to solve this problem? Do you expect to fill most of the file with data? In that case preallocating the file before starting I/O is the best way to do it. >>From the shell you can do it using the xfs_io 'resvsp' command, and from C code using the fallocate system call, or if it's not present the xfs RESVSP ioctl, as documented by the xfsctl manpage when you have the xfsprogs development libraries installed. If you actually want to keep the file sparse it's much harder. You could try larger I/O sized, or trying using the xfs extent size hint which is set using the XFS_IOC_FSSETXATTR ioctl, again documented in the xfsctl man page.