Steven McDonald wrote:
> Hi there,
> 
> ext2fs currently has #if 0 around the size check for lengthening a
> file. This allows ftruncate(2) calls for very large files to succeed,
> but result in a smaller file than was requested. I noticed the problem
> while trying to create vmd(8) images on an ext2fs filesystem.
> 
> Below is a patch that fixes the problem, followed by a program that
> demonstrates the problem.
> 
> I am not certain this patch is correct. A bit further down in
> ext2fs_inode.c, we find:

The code has been like this since prehistory, so we don't know why the check
was disabled. But obviously there's a problem without the check.

If any other ext2fs users would like to test and verify, I'll give them some
time to do so, but otherwise I guess we take the patch and see what happens.
Thanks.

Reply via email to