GNU bug report logs - #26311
dd: add support for POSIX_FADV_NOREUSE etc.

Previous Next

Package: coreutils;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Thu, 30 Mar 2017 15:44:01 UTC

Severity: wishlist

Full log


Message #11 received at 26311 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Pádraig Brady <P <at> draigBrady.com>, 26311 <at> debbugs.gnu.org
Subject: Re: bug#26311: dd support for POSIX_FADV_NOREUSE etc.
Date: Thu, 30 Mar 2017 10:55:20 -0700
On 03/30/2017 09:30 AM, Pádraig Brady wrote:
> Yes maybe, though the low level meanings of these flags are
> a bit confusing and I'm not sure how consistent they are over kernel versions

Nor I. Still, 'dd' to some extent is supposed to be a low-level program 
that lets one directly access syscall flags, so following that design 
philosophy we should just pass the flags through and let users 
experiment with them.

>
>> Dumb question: why does dd iflag=nocache check the return value of
>> posix_fadvise? The fadvise function ignores the return value and says
>> why; do these reasons not apply to 'dd'?
> Well for dd it's a request, which for other utils it's a performance advisement.
> As stated in the info docs, for dd it's only significant in the special case
> of dropping cache for the whole file:
>
>    $ : | dd iflag=nocache count=0 status=none
>    dd: failed to discard cache for: 'standard input': Illegal seek

Yes, and that was what I was asking about. iflag=nocache is just advice 
which the kernel is not obliged to follow even when the syscall succeeds 
(and conversely, it's advice which the kernel might decided to follow 
even when the syscall fails!). So why bother to report the syscall 
failure in this particular case?

It's no big deal. More of a philosophical question, really.





This bug report was last modified 6 years and 234 days ago.

Previous Next


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