Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39796 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21073 invoked from network); 9 Aug 2008 14:22:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Aug 2008 14:22:28 -0000 Authentication-Results: pb1.pair.com header.from=arnaud.lb@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=arnaud.lb@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.134.188 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: arnaud.lb@gmail.com X-Host-Fingerprint: 209.85.134.188 mu-out-0910.google.com Received: from [209.85.134.188] ([209.85.134.188:40217] helo=mu-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/90-17923-228AD984 for ; Sat, 09 Aug 2008 10:22:27 -0400 Received: by mu-out-0910.google.com with SMTP id i2so1209435mue.3 for ; Sat, 09 Aug 2008 07:22:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=OTBd724p4a0MDcE+qW5JdZy5zLYsgldSItaw8bZ6Jv8=; b=nnizM9DFTiUcYHRrGRumH6cVDnhKpbu+XnKGFFK/G2Yb8JpvqkadlCYYgo695LkwTl 3OYGtjTUZU87GPQXiwEtUEuFRedjU4UWGvdezPhAuGqbWQhdKukZfXP6SANPb34h9pFd QOaM4PQsBag4OPsog8y++o+pihE4xBFVgBO60= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:message-id; b=Je4FzN+5bCeBapTLCB40fMN5ZQ2qn7Emr3BngbUZyYU4j0QQRQqaRu2N/Q8lyhsTc2 Be8mLJ8RuH1ZYYE2urjdcAw+SEUG8Eu9e8TqcJ6Vg43clpnIVM4vme3zYr7rm4e89IrF QtNRL3qnnHazpOYjiYNjH9+0lXVAMQiA33HRg= Received: by 10.103.217.5 with SMTP id u5mr3448157muq.3.1218291744119; Sat, 09 Aug 2008 07:22:24 -0700 (PDT) Received: from 207-177-41-213.getmyip.com ( [213.41.177.207]) by mx.google.com with ESMTPS id s10sm265974muh.10.2008.08.09.07.22.21 (version=SSLv3 cipher=RC4-MD5); Sat, 09 Aug 2008 07:22:22 -0700 (PDT) To: Johannes =?iso-8859-15?q?Schl=FCter?= Date: Sat, 9 Aug 2008 16:20:31 +0200 User-Agent: KMail/1.10.0 (Linux/2.6.26-noch; KDE/4.1.0; i686; ; ) Cc: internals@lists.php.net, jani.taskinen@iki.fi, Rasmus Lerdorf , Hannes Magnusson References: <48997CC5.60709@lerdorf.com> <1218066607.11642.6.camel@goldfinger.johannes.nop> <200808071133.03539.arnaud.lb@gmail.com> In-Reply-To: <200808071133.03539.arnaud.lb@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-ID: <200808091620.31844.arnaud.lb@gmail.com> Subject: Re: [PHP-DEV] clearstatcache change From: arnaud.lb@gmail.com (Arnaud Le Blanc) On Thursday 07 August 2008 11:33:02 Arnaud Le Blanc wrote: > On Thursday 07 August 2008 01:50:06 Johannes Schl=FCter wrote: > > On Wed, 2008-08-06 at 21:00 +0200, Arnaud Le Blanc wrote: > > > > > btw. I just noticed chroot() calls this > > > > > realpath_cache_clean()..intentional? > > > > I'd assume that, as /foo inside a chroot is different from /foo > > outside... > > > > > Also some streams stuff uses the > > > > > > > > php_clear_stat_cache() func but those should propably use the > > > > > realpatch_cache_del() instead and not blow away whole cache? > > > > > > > > Yes, I think too. > > > > I added that to your patch: > > > > http://arnaud.lb.s3.amazonaws.com/clearstatcache_optional_params.pa= tc > > > >h > > > > > > > > :) > > > > > > > > It also adds the "filename" argument to > > > > clearstatcache([bool clear_realpath_cache[, filename]]) > > > > > > I reply to myself, actually this may cause troubles to not clear the > > > full cache in plain_wrapper.c :/ I updated the patch, just left the > > > filename argument to clearstatcache(). > > > > If you fix the arginfo like Hannes it's, good. If the name of the second > > parameter in the proto ("filename") is the same as in the implementation > > ("pathname") it might even be a bit better :-) > > > > johanes > > Commited :) Hi, I have noticed that there is no function to know the realpath cache usage=20 (e.g. is the realpath cache full ? what files are in the cache ?) I have written two functions: realpath_cache_get_entries() which returns an array of entries in the cache= ,=20 and realpath_cache_get_usage() which returns the cache size. The first one = may=20 also help in writing tests for the realpath cache. http://arnaud.lb.s3.amazonaws.com/realpath_cache_funcs.patch Can I add them ? Regards, Arnaud