X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Sun, 12 Dec 2010 16:18:40 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: 1.7.7: rm -rf sometimes fails - race condition?
Message-ID: <20101212151840.GB8795@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <4D026815.4070606@gmx.de> <20101210182652.GA27615@ednor.casa.cgf.cx> <3D3D7FA2B44B477A8342F96F72AE1BE7@multiplay.co.uk> <20101212124248.GB11357@calimero.vinschen.de> <4D04DA7D.1020706@gmx.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <4D04DA7D.1020706@gmx.de>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Dec 12 15:21, Matthias Andree wrote:
> BTW, haven't read through all of
> <http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/syscalls.cc?annotate=1.570&cvsroot=src>
> 
> for lack of time, but check_dir_not_empty wastes CPU time on full directories -
> you don't need to count to 1000 -- see the while loop ll. 515 - 520, the if() {}

It only wastes marginally time since the size of the structure doesn't
hold a lot of files, 3 with a name length of 255 chars, 58 with a length
of 1 char.  But you're right, I'll move the test into the loop.


Thx,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

