From: Toshiyuki Okajima Date: Tue, 27 Jul 2010 15:56:07 +0000 (-0400) Subject: ext4: fix EFBIG edge case when writing to large non-extent file X-Git-Tag: v2.6.36-rc1~501^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d889dc8382c4d71b6d538b7b13777bc1ec51df10;p=pandora-kernel.git 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 Signed-off-by: "Theodore Ts'o" Cc: Eric Sandeen --- Reading git-diff-tree failed