Re: fallocate: fix for --dig-holes at end of files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 10, 2020 at 10:16:09PM +0200, Gero Treuner wrote:
> I discovered that making a file sparse with "fallocate -d filename"
> fails on the last block of a file, because - usually being partial - the
> system call only zeroes that part instead of deallocating the block. See
> man fallocate(2) - section "Deallocating file space".
> 
> The expected call is punching the whole block beyond eof, which doesn't
> change the file length because of flag FALLOC_FL_KEEP_SIZE.

Good catch. Applied, thanks.

(Please, use Signed-off-by: line in your commit message next time.)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux