From mboxrd@z Thu Jan 1 00:00:00 1970 From: Valerie Aurora Subject: Need i_mutex on lookup in a really really read-only fs? Date: Sat, 10 Oct 2009 21:06:54 -0400 Message-ID: <20091011010654.GA12667@shell> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, Jan Blunck , Christoph Hellwig To: Alexander Viro Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47001 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754978AbZJKBHa (ORCPT ); Sat, 10 Oct 2009 21:07:30 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hey all, Given a file system that is mounted really really read-only[1], do we still need the directory i_mutex when doing a lookup through a writable overlay/union mount? If not, we can probably union together several read-only file systems underneath a writable layer without any lock ordering problems. Even with only one read-only layer, getting rid of the i_mutex during lookup would simplify the locking strategy significantly. Writable overlay/union mounts doc here: http://lkml.org/lkml/2009/10/1/291 -VAL [1] VFS: Add read-only users count to superblock http://lwn.net/Articles/341129/