linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Kelbel Junior <jymmyjr@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: XFS problem
Date: Tue, 31 Jan 2012 04:27:48 -0500	[thread overview]
Message-ID: <20120131092748.GA22999@infradead.org> (raw)
In-Reply-To: <CAAA8XhPTnj+d1CzmpDvrYLRuZ3=p6A0sN1z-=yswezxA+MkF+A@mail.gmail.com>

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.


      reply	other threads:[~2012-01-31  9:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-20 17:55 XFS problem Kelbel Junior
2012-01-24 14:05 ` Jan Kara
2012-01-24 21:39 ` Christoph Hellwig
2012-01-26 15:57   ` Kelbel Junior
2012-01-27 10:58     ` Christoph Hellwig
     [not found]       ` <CAAA8XhOoF_AN_-1PsYQ+hp7adc08YuYqvA_3Bv9nqtuOzO1kOg@mail.gmail.com>
     [not found]         ` <20120127191532.GA25529@infradead.org>
2012-01-30 14:31           ` Kelbel Junior
2012-01-30 20:34             ` Kelbel Junior
2012-01-31  9:27               ` Christoph Hellwig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120131092748.GA22999@infradead.org \
    --to=hch@infradead.org \
    --cc=jymmyjr@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).