[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?)
From: |
Andreas Dilger |
Subject: |
Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?) |
Date: |
Fri, 15 Apr 2011 16:28:37 -0600 |
On 2011-04-15, at 11:26 AM, Christoph Hellwig wrote:
> On Fri, Apr 15, 2011 at 11:24:19AM -0600, Eric Blake wrote:
>> Would it be worth borrowing from Solaris' semantics and adding SEEK_HOLE
>> and SEEK_DATA to lseek(2), as a higher level (less-detailed, but easier
>> to define and easier to use) interface for discovering the regions of a
>> file that only contain NUL bytes?
>
> Yes, I've already suggested that both in this thread and on IRC.
>
> For efficient copies it's the only usable interface.
I suspect that these bugs would have still existed whether the interface is
SEEK_HOLE/SEEK_DATA, or FIEMAP. The main problem is that the delalloc pages
were not accounted for correctly during layout traversal.
For ext4 I think it is sufficient to add another case to ext4_ext_fiemap_cb()
to check the pagecache for unmapped pages when it finds an uninitialized extent
on disk. This will be very similar to the fix for finding holes in the on-disk
mapping.
Cheers, Andreas
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), (continued)
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Dave Chinner, 2011/04/14
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Pádraig Brady, 2011/04/14
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Dave Chinner, 2011/04/14
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Jim Meyering, 2011/04/15
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Christoph Hellwig, 2011/04/15
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Eric Blake, 2011/04/15
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Christoph Hellwig, 2011/04/15
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?),
Andreas Dilger <=
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Dave Chinner, 2011/04/15
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Andreas Dilger, 2011/04/15
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Dave Chinner, 2011/04/15
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Andreas Dilger, 2011/04/16
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Theodore Tso, 2011/04/16
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Dave Chinner, 2011/04/17
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Andreas Dilger, 2011/04/17
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Yongqiang Yang, 2011/04/18
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Ted Ts'o, 2011/04/18
- Re: Files full of zeros with coreutils-8.11 and xfs (FIEMAP related?), Eric Sandeen, 2011/04/18