Before kernel 2.6.16 the i_node locking in VFS was semaphore based. Now mutex are used. I've attached a patch that substitute semaphore locking with mutex locking. Tested on x86 amd amd64, unionfs-1.1.3 only.
Created attachment 82766 [details, diff] semaphore to mutex patch for unionfs-1.1.3
I've post a mail regarding this to the upstream dev mailing list.
Thanks for the patch. It would be better if you could produce a patch which can be unconditionally applies and works on both 2.6.15 and 2.6.15. For more details, look at the patch in bug #119538 Removing block on bug 126972 as unionfs is not in the stable tree. Nevertheless, this is a bug that should be fixed.
I'd like to follow the upstream development: this is the only reason of your patch not being committed to portage tree. Upstream devs are already informed of your solution, but at now they are trying to release a 1.2.x version compatible with all kernels. I'm a bit overloaded at now: if a brave sould could modify this patch to the form of the one in comment #3, I could include it in portage tree.
You meant with: #if kernel_version > 2.6.15 use mutex #else use semaphore #endif ? It is not that hard. I'll do it when I get back home in about 10 hours. Regards, Norberto
Created attachment 83856 [details, diff] patch for 2.6.16 and below Patch compiles with 2.6.16 _AND_ 2.6.15. Not tested.
The new patch form Norberto is OK. Tested with gentoo-sources-2.6.15-r8 and 2.6.16-r1 (sorry for my lack of replies, the buzilla mails was marked as spam and I didn't see them :( )
@diegob80: (comment #7) Well, sometimes bugzilla _is_ spam, so your client may be right :-) @{diegob80,Norberto}: unionfs-1.1.3-r1 is in portage with your patch. Thanks