Skip to contentSkip to conversation

NFS mountned directory and apache2 (2.5.47)

DISCUSSION Richard Bouska 2 participants 2 messages Nov 15, 2002 NFS client

lore
Share & tools
lore
#0 lore raw

Hello
In 2.45.47 and 2.5.46 (at least) did not try any other am I not able to serve files bigger than 255 bytes by apache2 from nfs mounted directory. The local files are served correctly. The server is on 2.4.18. When I use the 2.4 also on client everything works. When the content of the page is CGI generated then the size is not limited like this. Both client and server are x86 (athlon)
kernel compiled with: gcc version 2.95.4 20011002 (Debian prerelease)

sendfile() bug ??

Any ideas
Richard Bouska

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

" " == Richard Bouska <[email protected]> writes:

> Hello In 2.45.47 and 2.5.46 (at least) did not try any other am > I not able to serve files bigger than 255 bytes by apache2 from > nfs mounted directory. The local files are served correctly.

> The server is on 2.4.18. When I use the 2.4 also on client > everything works. When the content of the page is CGI generated > then the size is not limited like this.

> Both client and server are x86 (athlon) kernel compiled with:
> gcc version 2.95.4 20011002 (Debian prerelease)

> sendfile() bug ??

Looks like whoever it was that changed the 'sendfile' API forgot to update NFS. Try the following patch.

Cheers,
Trond

fs/nfs/file.c renamed from fs/nfs/file.c.orig +1 -0
@@ -175,6 +175,7 @@
 #ifdef CONFIG_NFS_DIRECTIO
 	.direct_IO = nfs_direct_IO,
 #endif
+	.sendfile = generic_file_sendfile,
 };
 
 /*