Toshiyuki Okajima d889dc8382 ext4: fix EFBIG edge case when writing to large non-extent file
By running the following reproducer, we can confirm that the write 
system call returns with 0 when it should return the error EFBIG.

#!/bin/sh

/bin/dd if=/dev/zero of=./img bs=1k count=1 seek=1024k > /dev/null 2>&1
/sbin/mkfs.ext3 -Fq ./img
/bin/mount -o loop -t ext4 ./img /mnt
/bin/touch /mnt/file
strace /bin/dd if=/dev/zero of=/mnt/file conv=notrunc bs=1k count=1 seek=$((2194719883264/1024)) 2>&1 | /bin/egrep "write.* 1024\) = "
/bin/umount /mnt
exit

Signed-off-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Eric Sandeen <sandeen@redhat.com>
2010-07-27 11:56:07 -04:00
..
2010-06-11 23:14:04 -04:00
2010-07-27 11:56:07 -04:00
2010-06-11 23:14:04 -04:00
2010-07-27 11:56:07 -04:00
2010-05-17 07:00:00 -04:00
2010-05-21 18:31:19 -04:00
2010-05-21 18:31:19 -04:00
2010-05-21 18:31:19 -04:00
2010-06-11 23:14:04 -04:00
2010-05-21 18:31:19 -04:00