0.34.6 solaris 8 and mmap still

Andrew Cohen cohen at andy.bu.edu
Tue Nov 14 14:49:47 CET 2000


I haven't been following the list, so I apologize if this has already been 
covered, or I have the details wrong.

Mmap on solaris has had a problem since I started using arla long ago.
Arla has a test to prevent mmap'ing memory larger than the filesize, but from 
the Solaris mmap manpage, this behavior is allowed. The loader on Solaris does 
this, and so arla can't use shared objects from an afs filesystems.

The fix I use 
is to remove two lines in xfs_vnodeops.c (this is against 0.33.1). This has 
worked perfectly for me since way back...


*** xfs_vnodeops.c.orig Sun Apr  2 19:09:24 2000
--- xfs_vnodeops.c      Sun Jul 16 08:50:40 2000
***************
*** 967,974 ****
--- 967,976 ----
  
    if (error != 0)
      /* Can't map today */;
+ #if 0
    else if (off + len > VNODE_TO_XNODE(vp)->attr.va_size)
      error = EINVAL;
+ #endif
  #if 0
    else if ((prot & PROT_WRITE) && (flags & MAP_SHARED))
      error = EROFS;            /* XXX This is currently not supported */


-- 
Andrew Cohen		Office:	(617) 353-6051
Physics Department	Fax:	(617) 353-9393
Boston University	Email:	cohen at bu.edu
Boston, MA 02215








More information about the Arla-drinkers mailing list