xfs
[Top] [All Lists]

Re: XFS problem

To: Kelbel Junior <jymmyjr@xxxxxxxxx>
Subject: Re: XFS problem
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 31 Jan 2012 04:27:48 -0500
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <CAAA8XhPTnj+d1CzmpDvrYLRuZ3=p6A0sN1z-=yswezxA+MkF+A@xxxxxxxxxxxxxx>
References: <CAAA8XhOXuszcyCaMOcVWb-erGAJQdhBHCX-gsJ4KpH+Td7+bPQ@xxxxxxxxxxxxxx> <20120124213936.GA1505@xxxxxxxxxxxxx> <CAAA8XhMf9BhZP5csLfGVVbQxN7Uqh-+R6aqCLfezdiTECaRRjg@xxxxxxxxxxxxxx> <20120127105859.GC23335@xxxxxxxxxxxxx> <CAAA8XhOoF_AN_-1PsYQ+hp7adc08YuYqvA_3Bv9nqtuOzO1kOg@xxxxxxxxxxxxxx> <20120127191532.GA25529@xxxxxxxxxxxxx> <CAAA8XhMJeoUSMmcCizHqoFLrymbs7Hz216+7d445u6tV+ZC=fg@xxxxxxxxxxxxxx> <CAAA8XhPTnj+d1CzmpDvrYLRuZ3=p6A0sN1z-=yswezxA+MkF+A@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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.

<Prev in Thread] Current Thread [Next in Thread>