Re: [2.6.27-rc4] XFS i_lock vs i_iolock...

From: Christoph Hellwig
Date: Mon Aug 25 2008 - 17:55:58 EST


On Mon, Aug 25, 2008 at 08:59:33AM +0200, Peter Zijlstra wrote:
> How can you take two locks in one go? It seems to me you always need to
> take them one after another, and as soon as you do that, you have
> ordering constraints.

Yes, you would. Except that in all other places we only have a single
iolock involved, so the ordering of the second iolock and second ilock
don't matter.

Because of that I think declaring that xfs_lock_two_inodes can just
lock on lock type at a time might be the better solution.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/