Hi all, I dont know how useful this patch is... While using Paulo's ppc64 machine and my Opteron machine, I noticed that if the kernel module was compiled as a 64 bit object, and user-space as 32 bit binaries (which actually was the default for the gcc target on ppc64), using the kernel module to mount the file system was not possible as things stand right now for the following reasons, a) ioctl wrappers needed for compatibility because arguments for the DEV_MAP ioctl needed to be laid out differently on 64 bit. b) the device/vfs/client interfaces (upcall/downcall structures) were not sanitized for clean 32 and 64 bit uses. Consequently, communication between a 64 bit kmod and a 32 bit client-core gets messed up...
Attached patch fixes both the above issues a) is fixed by introducing the compat_ioctl member function in file_operations structure (if available) (newer than 2.6.15 kernels have this member I think) or by using the deprecated register_ioctl32_conversion() function on older 2.6 kernels for converting between a 32 bit ioctl argument to a 64 bit argument prior to re-issuing the ioctl. b) is fixed by a sanity sweep of many of the user-space pvfs2 headers and changing all of them to have fixed size types so that sizes of structures don't change if target changes from 32 to 64 bit. (This may be the more intrusive patch of the above) All this said, again I am not sure how useful this would be.. If there are cases where a 64 bit client build is not possible, this may be useful though I doubt if such cases exist unless the distribution is really weird ...? Anyways, I would love to hear comments or suggestions on the patch. Thanks, Murali
pvfs2_compat_ioctl.patch.gz
Description: Compatibility patches
_______________________________________________ Pvfs2-developers mailing list [email protected] http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers
