ext4: Automatically allocate delay allocated blocks on close
commitd491e88e141c9fa224d83ea4ee2874fb5dce39c2
authorTheodore Ts'o <tytso@mit.edu>
Tue, 24 Feb 2009 18:21:14 +0000 (24 13:21 -0500)
committerZhang Le <r0bertz@gentoo.org>
Fri, 20 Mar 2009 11:34:06 +0000 (20 19:34 +0800)
treeb99cbc70a2b64b5819cc2429d101690f1ad62a57
parentc90567322fbdc509411d75b908ed8257a1b938ed
ext4: Automatically allocate delay allocated blocks on close

ext4: Automatically allocate delay allocated blocks on close

When closing a file that had been previously truncated, force any
delay allocated blocks that to be allocated so that if the filesystem
is mounted with data=ordered, the data blocks will be pushed out to
disk along with the journal commit.  Many application programs expect
this, so we do this to avoid zero length files if the system crashes
unexpectedly.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/file.c
fs/ext4/inode.c