[Devel] [PATCH] coreutils/cp: handle EOF extents correctly

2015-10-30 Thread Dmitry Monakhov
fallocate can allocate extens beyond EOF via FALLOC_FL_KEEP_SIZE. Currenly sparse engine tries to copy such extents which is wrong and result in silent data corruption (leave file with incorrect size). ##TESTCASE echo blabla > sparse_falloc.in truncate -s 2M sparse_falloc.in fallocate -n -o 4M -l

Re: [Devel] bug#21790: [PATCH] coreutils/cp: handle EOF extents correctly

2015-10-30 Thread Pádraig Brady
On 30/10/15 09:02, Dmitry Monakhov wrote: > fallocate can allocate extens beyond EOF via FALLOC_FL_KEEP_SIZE. > Currenly sparse engine tries to copy such extents which is wrong and > result in silent data corruption (leave file with incorrect size). > > ##TESTCASE > echo blabla > sparse_falloc.in

Re: [Devel] bug#21790: [PATCH] coreutils/cp: handle EOF extents correctly

2015-10-30 Thread Pádraig Brady
On 30/10/15 16:57, Pádraig Brady wrote: > On 30/10/15 09:02, Dmitry Monakhov wrote: >> fallocate can allocate extens beyond EOF via FALLOC_FL_KEEP_SIZE. >> Currenly sparse engine tries to copy such extents which is wrong and >> result in silent data corruption (leave file with incorrect size). >> >