svn commit: r268376 - head/bin/rm

Warner Losh imp at bsdimp.com
Tue Jul 8 14:58:54 UTC 2014


On Jul 8, 2014, at 1:09 AM, Julian Elischer <julian at freebsd.org> wrote:

> On 7/8/14, 7:21 AM, Warner Losh wrote:
>> Author: imp
>> Date: Mon Jul  7 23:21:20 2014
>> New Revision: 268376
>> URL: http://svnweb.freebsd.org/changeset/base/268376
>> 
>> Log:
>>   rm -rf can fail sometimes with an error from fts_read. Make it honor
>>   fflag to ignore fts_read errors, but stop deleting from that directory
>>   because no further progress can be made.
>>      When building a kernel with a high -j value on a high core count
>>   machine, during the cleanobj phase we can wind up doing multiple rm
>>   -rf at the same time for modules that have subdirectories. This
>>   exposed this race (sometimes) as fts_read can return an error if the
>>   directory is removed by another rm -rf. Since the intent of the -f
>>   flag was to ignore errors, even if this was a bug in fts_read, we
>>   should ignore the error like we've been instructed to do.
> One could make an argument that being unable to delete something because someone else deleted it first is a "non error".
> Even without -f

rm is supposed to return an error when you try to delete something that isn’t there. Do you have a standards quote handy?

Warner

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20140708/d7887581/attachment.sig>


More information about the svn-src-head mailing list