Demonstration that using fallocate() to attempt to allocate more space than the size of the partition does not immediately fail, but instead allocates all free space then fails. $ ddpt if=/dev/zero of=testimage.ext4 bs=1048576 count=128 128+0 records in 128+0 records out time to transfer data: 1.885648 secs at 71.18 MB/sec $ mkfs.ext4 testimage.ext4 mke2fs 1.41.14 (22-Dec-2010) testimage.ext4 is not a block special device. Proceed anyway? (y,n) y Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=0 blocks, Stripe width=0 blocks 32768 inodes, 131072 blocks 6553 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 16 block groups 8192 blocks per group, 8192 fragments per group 2048 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 36 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. $ sudo mount -o noatime,loop -t ext4 testimage.ext4 /media/test $ cd /media/test ls -l total 12 drwx------ 2 root root 12288 2012-05-14 12:52 lost+found $ df | grep test /dev/loop0 126931 5646 114732 5% /media/test $ time fallocate -o0 -l999999999 testfile fallocate: testfile: fallocate failed: No space left on device real 0m0.002s user 0m0.000s sys 0m0.000s $ df | grep test /dev/loop0 126931 120378 0 100% /media/test $ du -B 1 testfile 117485568 testfile $ ls -l total 114744 drwx------ 2 root root 12288 2012-05-14 12:52 lost+found -rw-r--r-- 1 mark mark 117484544 2012-05-14 12:54 testfile