bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] [PATCH] Re: Detection of sparse files is broken on btrfs


From: Pavel Raiskup
Subject: [Bug-tar] [PATCH] Re: Detection of sparse files is broken on btrfs
Date: Tue, 09 Jan 2018 08:46:36 +0100

On Monday, January 8, 2018 3:29:17 AM CET Mark H Weaver wrote:
> I propose that we revisit this bug and fix it.  We clearly cannot assume that
> st_blocks == 0 implies that the file contains only zeroes.

. only on btrfs, as far as we know, because of some race condition.  So
what about special casing that filesystem, where we can lseek() for holes
anyway?  Since I would prefer fixing btrfs, I'm CC'ing devels again.

I'm attaching tar patch (public domain, use as you wish) mostly for
discussion about the idea (I can or anybody finalize the ifdef-hell,
etc.).  Note this fixes the failing sparse03.at for me (Fedora 27 x86_64 +
btrfs).

references for btrfs guys:
https://www.mail-archive.com/address@hidden/msg05453.html
https://www.spinics.net/lists/linux-btrfs/msg56768.html

Pavel

Attachment: btrfs-wholesparse.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]