GNU bug report logs - #17470
[PATCH] sort: rotate on ENOSPC while creating tmp files

Previous Next

Package: coreutils;

Reported by: Azat Khuzhin <a3at.mail <at> gmail.com>

Date: Sun, 11 May 2014 20:45:02 UTC

Severity: normal

Tags: patch, wontfix

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Azat Khuzhin <a3at.mail <at> gmail.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 17470 <at> debbugs.gnu.org, Pádraig Brady <P <at> draigBrady.com>
Subject: bug#17470: [PATCH] sort: rotate on ENOSPC while creating tmp files
Date: Tue, 27 May 2014 00:56:11 +0400
On Mon, May 26, 2014 at 01:44:14PM -0700, Paul Eggert wrote:
> Azat Khuzhin wrote:
> >The current patch only look while files is created, but this is not
> >enough `I agree with you, it must check write(2) and fallback to creating
> >when write(2) will fail with ENOSPC.
> >This is what you mean?
> 
> Yes.
> 
> >when we have ENOSPC it
> >means that we already won't create any more files there, and one file
> >with relatively small size is not a big deal.
> 
> OK.  The point is that 'sort' shouldn't lose the data (including the
> possibly-incomplete trailing line) that's already in the temporary file when
> a write to that file fails.

Thanks for the explanation, I see what you mean.

> 
> Also, the code could treat EIO like ENOSPC, I suppose, to be more robust in
> the presence of bad temporary devices.
> 
> But beware file systems that report ENOSPC and EIO in a delayed fashion,
> i.e., not immediately upon the failing write, but somewhat later, typically
> when closing the output file.

Yeah, that's a good catch, I will keep this in mind when I will start
working on this.

Thanks,
Azat.




This bug report was last modified 11 years and 56 days ago.

Previous Next


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