From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vivek Goyal Subject: Re: [PATCH 7/9] ovl: Introduce read/write barriers around metacopy flag update Date: Mon, 16 Oct 2017 09:24:53 -0400 Message-ID: <20171016132453.GB31318@redhat.com> References: <1507649544-4539-1-git-send-email-vgoyal@redhat.com> <1507649544-4539-8-git-send-email-vgoyal@redhat.com> <20171011202713.GF8086@redhat.com> <20171013182706.GA23232@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mx1.redhat.com ([209.132.183.28]:52452 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753032AbdJPNYy (ORCPT ); Mon, 16 Oct 2017 09:24:54 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-unionfs-owner@vger.kernel.org List-Id: linux-unionfs@vger.kernel.org To: Amir Goldstein Cc: overlayfs , Miklos Szeredi , "Eric W. Biederman" On Sat, Oct 14, 2017 at 09:05:17AM +0300, Amir Goldstein wrote: [..] > > When I read memory-barrier.txt, it seems to suggest that RELEASE can let > > instructions outside critical region sneak into critical region. If that's > > the case, actually clearing of metaflag can happen before xattr actually > > got removed. Though I can't think what will go wrong in that case. > > clear_bit takes a spinlock so I *think* clearing of flag cannot sneak > before removing xattr. Which spinlock does clear_bit take? Are you referring to ovl_inode->lock mutex? Vivek