Hello Junjiro, I remember you wrote that email but I thought Jan took necessary steps to apply your suggestion to posixovl. He didn't. So I did :)
I've replaced fstatvfs() call in posixovl by fstatfs() as you suggest in aufs man page. And it works now, thank you very much! I have to reread aufs man page. Because I see there is a lot of new features since the time I last checked it. Tomas M [EMAIL PROTECTED] wrote: > Tomas M: >> These processes are blocked: >> 1 (init) >> 2190 (posixovl) >> 3236 (udevd) >> 5291 (klogd) >> 5352 (dbus-daemon) > > Your log shows two processes, dbus-daemon and posixovl are in deadlock. > And I am afraid there may be other locked process. > > It seems a known problem which I have reported to you. > See the attached my old mail. That says a problem is in fuse branch and > aufs create=mfs mode. But the same problem may happen regardless the mfs > mode actually. > Please try the patch first. > > > Junjiro R. Okajima > > ---------------------------------------------------------------------- > > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED], [EMAIL PROTECTED] > Subject: posixovl and aufs most-free-space mode > Date: Mon, 05 May 2008 17:48:29 +0900 > > ------- =_aaaaaaaaaa0 > Content-Type: text/plain; charset="us-ascii" > Content-ID: <[EMAIL PROTECTED]> > > Hello Tomas and Jan, > I hope you are doing well. > > In last month, I received a question from one of aufs user, saying he > wanted to use vfat as an aufs branch. I answered him to try posixovl, > while my recommendation is loopback-mount of ext2 or something. :-) > He tried it and found a trouble in aufs most-free-space mode (create=mfs > option). > > I dived into posixovl and found it is very hard to solve this problem in > aufs. Finally, I made a patch against posixovl. I know SLAX doesn't use > mfs mode, but I think it is better to let you know this issue. > Here is a note in the aufs manual I will add in next Monday release, and > a patch against the latest posixovl.c which I got today by, > $ git clone git://dev.computergmbh.de/posixovl posixovl.git > > > Junjiro Okajima > > ---------------------------------------------------------------------- > > diff -x CVS -x RCS -x .pdiff -rup ../../sf.anon/aufs/util/aufs.in.5 > ./util/aufs.in.5 > --- ../../sf.anon/aufs/util/aufs.in.5 2008-04-28 12:30:53.000000000 +0900 > +++ ./util/aufs.in.5 2008-05-05 17:16:51.000000000 +0900 > @@ -1064,9 +1064,61 @@ the performance, you can specify the dur > aufs hold the index of last selected writable branch until the > specified seconds expires. The first time you create something in aufs > after the specified seconds expired, aufs checks the amount of free > -space of all writable branches and the held branch index will be > -updated. > +space of all writable branches by internal statfs call > +and the held branch index will be updated. > The default value is \*[AUFS_MFS_SECOND_DEF] seconds. > + > +In this mode, a FUSE branch needs special attention. > +The struct fuse_operations has a statfs operation. It is OK, but the > +parameter is struct statvfs* instead of struct statfs*. So the almost > +all user\-space implementaion will call statvfs(3) insead of statfs(2). > +In glibc, statvfs(3) issues statfs(2), open(2)/read(2) for /proc/mounts, > +and stat(2) for the mountpoint. With this situation, a FUSE branch will > +cause a deadlock in creating something in aufs. Here is a sample > +scenario, > +.\" .RS > +.\" .IN -10 > +.Bu > +create a file just under the aufs root dir. > +.Bu > +aufs will aquire a write-lock for the parent directory. > +.Bu > +aufs may call statfs internally for each writable branches to decide the > +branch which has most free space. > +.Bu > +FUSE in kernel\-space converts and redirects the statfs request to the > +user\-space. > +.Bu > +the user-space statfs handler will call statvfs(3). > +.Bu > +the statvfs(3) in glibc will access /proc/mounts and issue stat(2) for the > +mountpoint. But those require a read-lock for the aufs root directory. > +.Bu > +Then a deadlock occurs. > +.\" .RE 1 > +.\" .IN > + > +In order to avoid this deadlock, I would suggest not to call > +statvfs(3). Here is a sample code to do this. > +.nf > +struct statvfs stvfs; > + > +main() > +{ > + statvfs("...", &stvfs) > +} > + > +statfs_handler(const char *path, struct statvfs *arg) > +{ > + struct statfs stfs; > + statfs("...", &stfs); > + memcpy(arg, &stvfs, sizeof(stvfs)); > + arg->f_bfree = stfs.f_bfree; > + arg->f_bavail = stfs.f_bavail; > + arg->f_ffree = stfs.f_ffree; > + sb->f_favail = /* any value */; > +} > +.fi > . > .TP > .B create=mfsrr:low[:second] > > > ------- =_aaaaaaaaaa0 > Content-Type: application/x-bzip2; name="a.patch.bz2" > Content-ID: <[EMAIL PROTECTED]> > Content-Transfer-Encoding: base64 > > QlpoOTFBWSZTWT8wDacAAWbfgAQwc3///+9n1nS/79/6QALZdV1igAaEJT9TU3pJ4FPUek2SNHqD > QGhkZA0PKDTQip+SmPVMIAGIAAA0MTIAAABpopGgAABNGTAAACYmIyYhgSSEaMpgUwSeTSep6IAB > o0yAGTIYhkggQ1VA4hJDFWLEMQFUMRBosUieFDIQ4C4fAKSC6XSSSms1XzrCe8ZxYHVVEVACBEEP > 2Kbk6fRgjoqCyrLisrCIfnqiFnsJIEVpFePHdEbqtkhTuobECYdS/xNFttFtmV4XUmmmp4UQdNNr > KmBnFKooTVxjDSr9Re5FU1mQW/ZuIYWFwrL+wDVgZhtVsKf/Ap0XwYVRca2SzJBwDDk2mudxa/Te > Q1WRIbceTj5N1wbhsEryBqLaxU4hCYOEBBNt8c9rgZmZ5IBCkscqMLhM4w+iAyZpARS1cSKKy4Tn > WAOOZJrJqkpFIxUqBClQRJpiNVAiyby7jW6Wb8JEJiF/mBUksrmceSYbc7gLWj5YDDAnp72jooyF > LRqMnWdNHU/rf1MTOupYQ59RKwvx5Q30wwMHg287L58Q7ODlzB/fkP5kqPg08i7AYCbIfys3kygR > DhD3C7AOyCXmTHeTY4dqidz8/xvDmg55jo9CwVURcTlBadZG16+sBZz69H69IJRkaLtQQhec2CYp > CSfXQZtazhtucgwVJjHZIamTDDAzMmGoImI11eKuHPiH4SYRgWLBUP7yNmrPCbrLWk5wq5J1aqSK > sisV4mYLNmeojqka4xfd0UZr0dL7TcxY5xNilSnaKAhzWrLiTliKSUmL+FIryJQ9O9xCN09DRr/I > sgY7ND78yV2uQ4zpiPhKwriZUVldmREl2l3ApQKdAiqa02XvcgO4nKdyLcIm/TkENlLcaBQjFwhl > L/PFNv0+DQhg0d/RvKY+kTi5ilgpVlo+hKlANe+hQQwZanAZYIzPrQyHodxkFKFrnRRvatkgnQIi > IdNPwEMWSfNGK/4u5IpwoSB+YBtO > > ------- =_aaaaaaaaaa0-- > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/