[nSLUG] cifs on Redhat Linux, and getting a full Redhat kernel for RHEL 5

George N. White III gnwiii at gmail.com
Wed May 14 10:03:57 ADT 2008


On Tue, May 13, 2008 at 5:13 PM, D G Teed <donald.teed at gmail.com> wrote:

> I've determined that going back to RH kernel from January resolves a problem
>  I saw where the directory path contains false echos.
>
>  For example a mount to the Users which would normally show
>  my index.htm at /home/wwwusers/donald/index.htm
>  is actually showing at /home/wwwusers/donald/donald/donald/index.htm
>
>  The older kernel (or smbfs) doesn't do that.
>
>  The problem with truncated files from apache with cifs mounts is
>  mentioned here on an apache bug report:
>
>  https://issues.apache.org/bugzilla/show_bug.cgi?id=42751
>
>  The solution is to add the directive :
>  EnableSendfile Off
>
>  within each <Directory> set up with a cifs mount.
>
>  This resolved my problem.  Apache does not consider it an apache bug
>  it seems!  The developer's idea of where their responsibility ends
>  and the users idea of what they need to make the software fly
>  have always been a gap apart, and this bug report is an excellent
>  example of that.

I suppose <http://www.time-travellers.org/shane/papers/NFS_considered_harmful.html>
should have a companion CIFS_considered_harmful.

The problem is that network filesystems (and fuse has similar issues) are much
trickier than the marketing people let on.

man sendfile on Fedora 8 says:

       Presently  (Linux  2.6.9):  in_fd, must correspond to a file which sup-
       ports mmap(2)-like operations (i.e., it cannot be a socket); and out_fd
       must refer to a socket.

Apache just gets a file descriptor -- it doesn't have any way to know whether
sendfile (normally implemented using mmap) is supported.  About all you can
expect is that you get an error when you try to use sendfile with a descriptor
that doesn't support it, so that makes it a kernel bug.   With NFS, mmap may
be supported, but unless caching is disabled you can still get stale
data if you
actually use mmap.   I gather than NFS4 is supposed to have real support for
caching, but I haven't encountered NFS4 yet.

I did see mention in the XFS forums that there are plans to support mmap
in fuse on some future kernel.  Maybe there are some ideas there that will
help with networked filesystems.

-- 
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia



More information about the nSLUG mailing list