GNU bug report logs - #51433
cp 9.0 sometimes fails with SEEK_DATA/SEEK_HOLE

Previous Next

Package: coreutils;

Reported by: Janne Heß <janne+coreutils <at> hess.ooo>

Date: Wed, 27 Oct 2021 11:56:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Janne Heß <janne+coreutils <at> hess.ooo>, 51433 <at> debbugs.gnu.org
Subject: bug#51433: cp 9.0 sometimes fails with SEEK_DATA/SEEK_HOLE
Date: Sun, 31 Oct 2021 16:23:45 +0000
On 30/10/2021 03:04, Paul Eggert wrote:
> On 10/28/21 13:59, Pádraig Brady wrote:
> 
>> I wonder after getting a SEEK_DATA ENXIO, might we correlate
>> we really are at end of file by checking SEEK_HOLE also returns ENXIO?
> 
> Wouldn't SEEK_HOLE return the current offset, instead of ENXIO? That is,
> if the underlying data structure is wrong and claims that the rest of
> the file is a hole, wouldn't SEEK_HOLE merely repeat that information?

What I was thinking is that SEEK_DATA returning ENXIO suggests end of file.
If we're not actually at EOF a SEEK_HOLE at SEEK_CUR+1 might not indicate ENXIO.
I which case we could do a fdatasync().
All wild speculation though depending on the ZFS bug.
If the bug is fixed and we have a good reproducer, we might
be able to do something like this to cater for existing buggy ZFS installations.

cheers,
Pádraig




This bug report was last modified 3 years and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.