The attached patch enables sendfile when UNIONFS_MMAP is defined. It simply calls generic_file_sendfile(), which seems to be sufficient to loopback-mount a file residing in a unionfs. I have not tried other sendfile applications like Apache.
--Ed
diff -BurN unionfs-20060423-1600.orig/file.c unionfs-20060423-1600/file.c --- unionfs-20060423-1600.orig/file.c 2006-04-23 20:00:53.000000000 +0000 +++ unionfs-20060423-1600/file.c 2006-05-02 21:31:20.000000000 +0000 @@ -370,9 +370,13 @@ .fsync = unionfs_fsync, #endif .fasync = unionfs_fasync, +#ifdef UNIONFS_MMAP + .sendfile = generic_file_sendfile, +#else #ifdef SUPPORT_BROKEN_LOSETUP .sendfile = unionfs_sendfile, #endif +#endif }; /*
_______________________________________________ unionfs mailing list [email protected] http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs
