Messages in this thread | | | Date | Mon, 21 Jun 2010 03:47:56 -0400 | From | Christoph Hellwig <> | Subject | Re: [PATCH 2/5] fsfreeze: emergency thaw will deadlock on s_umount |
| |
On Mon, Jun 21, 2010 at 11:57:31AM +1000, Dave Chinner wrote: > This patch doesn't try to deal with the bdev/super mismatches; all > it does is prevent an obvious deadlock. Calling freeze/thaw_super > directly will serialise on the s_umount lock, calling > freeze/thaw_bdev() will serialise on the bdev freeze mutex, and if > we mix the two they'll serialise on the s_umount lock. So I think > with this patch serialisation will still occur correctly but avoid > the current deadlock. > > I'll change the commit message to explain this better.
I don;t think the explanation alone is enough.
Right now thaw_super itself is only serialized by exclusive shared s_umount. thaw_bdev it also serialized by bd_fsfreeze_mutex, but there are callers of thaw_super that do not go through thaw_bdev, so our locking is not enough here.
| |