From: Jordi Pujol Subject: Re: overlayfs v8 problems with whiteout links Date: Wed, 27 Apr 2011 09:57:19 +0200 Message-ID: <201104270957.19356.jordipujolp@gmail.com> References: <201104221043.43380.jordipujolp@gmail.com> <201104242008.53293.jordipujolp@gmail.com> <87k4ehm2ox.fsf@tucsk.pomaz.szeredi.hu> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_fx8tNg7kVM7QwKN" Cc: linux-fsdevel@vger.kernel.org To: Miklos Szeredi Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:40459 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753500Ab1D0H5X (ORCPT ); Wed, 27 Apr 2011 03:57:23 -0400 Received: by wwa36 with SMTP id 36so1591700wwa.1 for ; Wed, 27 Apr 2011 00:57:22 -0700 (PDT) In-Reply-To: <87k4ehm2ox.fsf@tucsk.pomaz.szeredi.hu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --Boundary-00=_fx8tNg7kVM7QwKN Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit A Dimarts 26 Abril 2011 17:50:54, Miklos Szeredi va escriure: > It doesn't look like the correct fix, however. Even though > ovl_dentry_lower() returns NULL, the lower file should normally exist. it solves the problem, but we should investigate why, > > Please look a the ovl_do_lookup() logic: if oe->opaque is set to true, > then oe->lowerdentry will be set to NULL, even when the lower dentry > does actually exist. > > So your patch might cover up the problem that you've been observing > (because it won't create the whiteouts in some cases), but it will > introduce another bug. > Agree, the working line in this patch is checking for ovl_dentry_lower in ovl_do_remove, the other lines are part of the test; should not be used. another patch is attached, Thanks, Jordi Pujol Live never ending Tale GNU/Linux Live forever! http://livenet.selfip.com --Boundary-00=_fx8tNg7kVM7QwKN Content-Type: text/x-patch; charset="UTF-8"; name="09-bug-remove-lower-dentry.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="09-bug-remove-lower-dentry.patch" --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -376,7 +383,8 @@ static int ovl_do_remove(struct dentry * ovl_dentry_version_inc(dentry->d_parent); } - if (type != OVL_PATH_UPPER || ovl_dentry_is_opaque(dentry)) + if ((type != OVL_PATH_UPPER || ovl_dentry_is_opaque(dentry)) + && ovl_dentry_lower(dentry)) err = ovl_whiteout(upperdir, dentry); /* --Boundary-00=_fx8tNg7kVM7QwKN--