Bug 127073 - unionfs 1.1.3 doesn't work with kernel 2.6.16
Bug#: 127073 Product:  Gentoo Linux Version: 2006.0 Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: satya@gentoo.org Reported By: diegob80@yahoo.it
Component: Unspecified
URL: 
Summary: unionfs 1.1.3 doesn't work with kernel 2.6.16
Keywords:  Inclusion
Status Whiteboard: 
Opened: 2006-03-21 04:44 0000
Description:   Opened: 2006-03-21 04:44 0000
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.

------- Comment #1 From Diego Busacca 2006-03-21 04:46:32 0000 -------
Created an attachment (id=82766) [details]
semaphore to mutex patch for linux-2.6.16

------- Comment #2 From Christian Andreetta (RETIRED) 2006-03-21 05:44:54 0000 -------
I've post a mail regarding this to the upstream dev mailing list.

------- Comment #3 From Daniel Drake 2006-03-25 05:50:21 0000 -------
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.

------- Comment #4 From Christian Andreetta (RETIRED) 2006-04-03 02:08:15 0000 -------
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.

------- Comment #5 From Norberto Bensa 2006-04-03 04:39:31 0000 -------
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

------- Comment #6 From Norberto Bensa 2006-04-03 19:55:21 0000 -------
Created an attachment (id=83856) [details]
patch for 2.6.16 and below

Patch compiles with 2.6.16 _AND_ 2.6.15. Not tested.

------- Comment #7 From Diego Busacca 2006-04-04 00:49:11 0000 -------
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 :( )

------- Comment #8 From Christian Andreetta (RETIRED) 2006-04-04 01:53:46 0000 -------
@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