public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* fallocate bug?
@ 2012-05-07 12:44 Zhu Han
  2012-05-07 23:59 ` Dave Chinner
  0 siblings, 1 reply; 9+ messages in thread
From: Zhu Han @ 2012-05-07 12:44 UTC (permalink / raw)
  To: xfs


[-- Attachment #1.1: Type: text/plain, Size: 948 bytes --]

Seems like xfs of CentOS 6.X occupies much more storage space than desired
if fallocate is used against the file. Here is the step to reproduce it:

By the way, is it normal when the file is moved around after the
preallocated region is filled with data?

$ uname -r
2.6.32-220.7.1.el6.x86_64

$fallocate -n --offset 0 -l 1G file    ---->Write a little more data than
the preallocated size

$ xfs_bmap -p -vv file
file:
 EXT: FILE-OFFSET      BLOCK-RANGE            AG AG-OFFSET
TOTAL FLAGS
   0: [0..2097151]:    2593408088..2595505239 21 (29420144..31517295)
2097152 10000

$ dd if=/dev/zero of=/tmp/file bs=1M count=1026 conv=fsync

$ xfs_bmap -p -vv file
file:
 EXT: FILE-OFFSET      BLOCK-RANGE            AG AG-OFFSET
TOTAL FLAGS
   0: [0..4194303]:    2709184016..2713378319 22 (23101408..27295711)
4194304 00000

$ du -h --apparent-size file
1.1G    file

$du -h file
2.0G

best regards,
韩竹(Zhu Han)

[-- Attachment #1.2: Type: text/html, Size: 1127 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-05-09  1:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-07 12:44 fallocate bug? Zhu Han
2012-05-07 23:59 ` Dave Chinner
2012-05-08  3:24   ` Zhu Han
2012-05-08  4:40     ` Dave Chinner
2012-05-08  5:10       ` Zhu Han
2012-05-08  5:47         ` Dave Chinner
2012-05-08 15:25           ` Zhu Han
2012-05-08 22:31             ` Dave Chinner
2012-05-09  1:43               ` Zhu Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox