ext4: Automatically allocate delay allocated blocks on rename
authorTheodore Ts'o <tytso@mit.edu>
Tue, 2 Jun 2009 12:09:24 +0000 (08:09 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Jun 2009 03:01:48 +0000 (20:01 -0700)
commit663d2c001cad1e268371dcda82de46815189e2f2
treeeb32a3799d2d4f813efec4b08c5aa3fb57529aa8
parent10d984daec00917893707a443add0a7a0f190da2
ext4: Automatically allocate delay allocated blocks on rename

(cherry picked from commit 8750c6d5fcbd3342b3d908d157f81d345c5325a7)

When renaming a file such that a link to another inode is overwritten,
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/namei.c