Re: Files appear too big in `du`

Matthias Schniedermeyer
2011-05-12T10:02:08Z

On 10.05.2011 17:33, Matthias Schniedermeyer wrote:
>
> > > Any idea how to debug this, or is this a known bug and waiting a few
> > > days for 2.6.39 should fix this?
> >
> > It doesn't appear to be doing anything wrong from your description.
> > Remember that XFS is optimised for high end storage and server
> > configurations and workloads, not typical desktop usage...
>
> I would call it a regression.
> I reguarly follow copying/downloading with `du`, the speculative
> preallocation makes that more or less useless. Especially downloading
> someting big from the internet which @ 231kb/s isn't exactly fast and
> shows identical `du`s for increasingly longer periods of time.
> (Or "--apparent-size" should be made default, but that falls short with
> sparse-files)
>
> IMHO `du`/`ls -l` should not be able to 'see' the speculative
> preallocation.

After digging into the log of v2.6.37..v2.6.38 i stumbled upon:

- snip -
The allocsize mount option turns off the dynamic behaviour and fixes
the prealloc size to whatever the mount option specifies. i.e. the
behaviour is unchanged.
- snip -

I think Documentation/filesystems/xfs.txt is in need of an update. All
that information in the commit-log is a little "out-of-reach" for most
people.