Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754733Ab1CVTxk (ORCPT ); Tue, 22 Mar 2011 15:53:40 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:38767 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754526Ab1CVTxh (ORCPT ); Tue, 22 Mar 2011 15:53:37 -0400 Date: Tue, 22 Mar 2011 19:53:31 +0000 From: Al Viro To: Miklos Szeredi Cc: torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, apw@canonical.com, nbd@openwrt.org, neilb@suse.de Subject: Re: [PATCH 0/6 v7] overlay filesystem - request for inclusion Message-ID: <20110322195331.GY22723@ZenIV.linux.org.uk> References: <20110322152602.053930811@szeredi.hu> <20110322183919.GV22723@ZenIV.linux.org.uk> <20110322190002.GW22723@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1282 Lines: 35 On Tue, Mar 22, 2011 at 08:43:17PM +0100, Miklos Szeredi wrote: > In copy up it does: > > -> lock parent on upper > -> lock child on upper > > So a setattr with copy up would go like this: > > -> lock child on overlayfs > -> lock parent on upper > ->lock child on upper > -> lock child on upper > > > > Protection is exactly as for userspace callers. AFAICT. > > > > Pardon? You traverse the chain of ancestors; fine, but who says it stays > > anywhere near being relevant as you go? > > Not quite sure I understand. > > There are no assumptions about locks in overlayfs keeping anything > relevant in upper/lower fs. Everything is re-checked and re-locked on > the upper layer before proceeding with the rename. Proceeding with rename is not interesting; proceeding with copyup is. Who said that by the time we get to copy_up_locked you will still have dentry (and upper) match lowerpath? Or that ->d_parent on overlay and on upper will change in sync, for that matter - there are two d_move() calls involved... -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/