xfs
[Top] [All Lists]

Re: du vs. ls

To: pille <pille+xfs+mailinglist+sgi@xxxxxxxxxxxx>
Subject: Re: du vs. ls
From: Ben Myers <bpm@xxxxxxx>
Date: Fri, 4 Jan 2013 10:14:02 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <50E6F6D4.5090407@xxxxxxxxxxxx>
References: <50E6F6D4.5090407@xxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
Hey Pille,

On Fri, Jan 04, 2013 at 04:35:48PM +0100, pille wrote:
> since some weeks i've noticed that filesizes for new files differ in the
> outputs of ls and du.

Hmm...

> notice the different count of blocks.

I wouldn't worry too much about a difference in the block count...

> # sha1sum file copy
> 23071d0b4caeeb4aa9579283ca67c7c13e66b8ee  file
> 23071d0b4caeeb4aa9579283ca67c7c13e66b8ee  copy

...as long as the checksum is correct!

If you want to dig further to understand it better, check out xfs_bmap.  This
will print out the block map for each file and you can see the differences in
allocation.  You might be seeing some speculative allocation past eof in the
block count that has not yet been cleaned up.  Probably nothing to worry about.

Regards,
        Ben

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