You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ruediger Pluem <rp...@apache.org> on 2006/11/01 13:51:05 UTC

Re: svn commit: r468373 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c modules/cache/mod_cache.h modules/cache/mod_disk_cache.c modules/cache/mod_disk_cache.h modules/cache/mod_mem_cache.c


On 10/27/2006 03:28 PM, minfrin@apache.org wrote:
> Author: minfrin
> Date: Fri Oct 27 06:28:56 2006
> New Revision: 468373
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=468373
> Log:
> mod_cache: Pass the output filter stack through the store_body()
> hook, giving each cache backend the ability to make a better
> decision as to how it will allocate the tasks of writing to the
> cache and writing to the network. Previously the write to the
> cache task needed to be complete before the same brigade was
> written to the network, and this caused timing and memory issues
> on large cached files. This fix replaces the previous fix for
> PR39380.
> 

> 
> Modified: httpd/httpd/trunk/modules/cache/mod_disk_cache.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_disk_cache.c?view=diff&rev=468373&r1=468372&r2=468373
> ==============================================================================
> --- httpd/httpd/trunk/modules/cache/mod_disk_cache.c (original)
> +++ httpd/httpd/trunk/modules/cache/mod_disk_cache.c Fri Oct 27 06:28:56 2006


> @@ -1286,9 +1292,15 @@
>  static apr_status_t open_new_file(request_rec *r, const char *filename,
>                                    apr_file_t **fd, disk_cache_conf *conf)
>  {
> -    int flags = APR_CREATE | APR_WRITE | APR_BINARY | APR_BUFFERED | APR_EXCL;
> +    int flags;
>      apr_status_t rv;
>  
> +    flags = APR_CREATE | APR_WRITE | APR_READ | APR_BINARY | APR_BUFFERED | APR_EXCL | APR_TRUNCATE;
> +#if APR_HAS_SENDFILE
> +    flags |= ((pdconf->enable_sendfile == ENABLE_SENDFILE_OFF)
> +             ? 0 : APR_SENDFILE_ENABLED);
> +#endif  
> +

This breaks compilation of mod_disk_cache on systems that have APR_HAS_SENDFILE set.

Regards

Rüdiger


Re: svn commit: r468373 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c modules/cache/mod_cache.h modules/cache/mod_disk_cache.c modules/cache/mod_disk_cache.h modules/cache/mod_mem_cache.c

Posted by Ruediger Pluem <rp...@apache.org>.

On 11/01/2006 06:02 PM, Graham Leggett wrote:
> On Wed, November 1, 2006 5:48 pm, Ruediger Pluem wrote:
> 
> 
>>I have svn up to the latest revision and it is not fixed.
>>If you still think that it is fixed please point me to the revision
>>that should have fixed it and I will have a look if something is wrong
>>on my side.
> 
> 
> If you do an svn log on that file it should give you the revision.
> 
> The problem came about when the line that initialises pconf was deleted to
> remove a compiler warning - it needed to be there in the APR_HAS_SENDFILE
> case  but wasn't surrounded in an #if. It was put back, and surrounded
> with an #if.

The problem is that pconf is not declared.

> 
> Can you post the compile error?

Sure:

make[3]: Verlassen des Verzeichnisses »/usr/src/apache/httpd-trunk/modules/aaa«
make[2]: Verlassen des Verzeichnisses »/usr/src/apache/httpd-trunk/modules/aaa«
Making install in cache
make[2]: Wechsel in das Verzeichnis »/usr/src/apache/httpd-trunk/modules/cache«
make[3]: Wechsel in das Verzeichnis »/usr/src/apache/httpd-trunk/modules/cache«
/usr/src/apache/httpd-trunk/srclib/apr/libtool --silent --mode=compile gcc -pthread  -O2 -g -Wall  -DLINUX=2
-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE    -I/usr/src/apache/httpd-trunk/srclib/pcre -I.
-I/usr/src/apache/httpd-trunk/os/unix -I/usr/src/apache/httpd-trunk/server/mpm/worker
-I/usr/src/apache/httpd-trunk/modules/http -I/usr/src/apache/httpd-trunk/modules/filters
-I/usr/src/apache/httpd-trunk/modules/proxy -I/usr/src/apache/httpd-trunk/include
-I/usr/src/apache/httpd-trunk/modules/generators -I/usr/src/apache/httpd-trunk/modules/mappers
-I/usr/src/apache/httpd-trunk/modules/database -I/usr/src/apache/httpd-trunk/srclib/apr/include
-I/usr/src/apache/httpd-trunk/srclib/apr-util/include -I/usr/src/apache/httpd-trunk/server
-I/usr/src/apache/httpd-trunk/modules/proxy/../generators -I/usr/src/apache/httpd-trunk/modules/ssl
-I/usr/src/apache/httpd-trunk/modules/dav/main -prefer-pic -c mod_disk_cache.c && touch mod_disk_cache.slo
mod_disk_cache.c: In function `open_new_file':
mod_disk_cache.c:1304: `pdconf' undeclared (first use in this function)
mod_disk_cache.c:1304: (Each undeclared identifier is reported only once
mod_disk_cache.c:1304: for each function it appears in.)
make[3]: *** [mod_disk_cache.slo] Fehler 1
make[3]: Verlassen des Verzeichnisses »/usr/src/apache/httpd-trunk/modules/cache«
make[2]: *** [install-recursive] Fehler 1
make[2]: Verlassen des Verzeichnisses »/usr/src/apache/httpd-trunk/modules/cache«
make[1]: *** [install-recursive] Fehler 1
make[1]: Verlassen des Verzeichnisses »/usr/src/apache/httpd-trunk/modules«
make: *** [install-recursive] Fehler 1



svn info modules/cache/mod_disk_cache.c
Path: modules/cache/mod_disk_cache.c
Name: mod_disk_cache.c
URL: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/cache/mod_disk_cache.c
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 469941
Node Kind: file
Schedule: normal
Last Changed Author: minfrin
Last Changed Rev: 468409
Last Changed Date: 2006-10-27 17:15:24 +0200 (Fri, 27 Oct 2006)
Text Last Updated: 2006-11-01 20:32:46 +0100 (Wed, 01 Nov 2006)
Properties Last Updated: 2006-11-01 13:29:15 +0100 (Wed, 01 Nov 2006)
Checksum: f64b1dba6692fbd4978ff7709a0bd67c

Regards

Rüdiger



Re: svn commit: r468373 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c modules/cache/mod_cache.h modules/cache/mod_disk_cache.c modules/cache/mod_disk_cache.h modules/cache/mod_mem_cache.c

Posted by Graham Leggett <mi...@sharp.fm>.
On Wed, November 1, 2006 5:48 pm, Ruediger Pluem wrote:

> I have svn up to the latest revision and it is not fixed.
> If you still think that it is fixed please point me to the revision
> that should have fixed it and I will have a look if something is wrong
> on my side.

If you do an svn log on that file it should give you the revision.

The problem came about when the line that initialises pconf was deleted to
remove a compiler warning - it needed to be there in the APR_HAS_SENDFILE
case  but wasn't surrounded in an #if. It was put back, and surrounded
with an #if.

Can you post the compile error?

Regards,
Graham
--



Re: svn commit: r468373 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c modules/cache/mod_cache.h modules/cache/mod_disk_cache.c modules/cache/mod_disk_cache.h modules/cache/mod_mem_cache.c

Posted by Ruediger Pluem <rp...@apache.org>.

On 11/01/2006 02:30 PM, Graham Leggett wrote:
> On Wed, November 1, 2006 2:51 pm, Ruediger Pluem wrote:
> 
> 
>>This breaks compilation of mod_disk_cache on systems that have
>>APR_HAS_SENDFILE set.
> 
> 
> This was fixed in a commit shortly after.

I have svn up to the latest revision and it is not fixed.
If you still think that it is fixed please point me to the revision
that should have fixed it and I will have a look if something is wrong
on my side.

Regards

Rüdiger


Re: svn commit: r468373 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c modules/cache/mod_cache.h modules/cache/mod_disk_cache.c modules/cache/mod_disk_cache.h modules/cache/mod_mem_cache.c

Posted by Graham Leggett <mi...@sharp.fm>.
On Wed, November 1, 2006 2:51 pm, Ruediger Pluem wrote:

> This breaks compilation of mod_disk_cache on systems that have
> APR_HAS_SENDFILE set.

This was fixed in a commit shortly after.

Regards,
Graham
--