Avoid ext4 auto_da_alloc flush on close (v2).
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 23 Oct 2013 07:26:42 +0000 (08:26 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 23 Oct 2013 08:24:51 +0000 (09:24 +0100)
commit8b88d6a25dccb0e086f3d2b1d3cab99d722912aa
treebf3f00053a889deb7b98dd88e7f3ea55be8e98db
parent05f0de58de6cbcbdc40f5a661d406b3fbe5a9060
Avoid ext4 auto_da_alloc flush on close (v2).

This updates commit 68640d56b2ea96401a1355ab56603b0837058d21.

Don't unlink the file: As Florian Weimer pointed out, this would cause
problems if someone uses '-o /dev/null' (it could delete /dev/null).

Don't write a byte.  The exact condition which causes the
auto_da_alloc misbehaviour is truncating a file from a large size to 0
size.  So this write was not necessary.

Thanks: Florian Weimer, Eric Sandeen, Eric Blake.
pxzcat.c