Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3340133ybc; Thu, 14 Nov 2019 07:40:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwNw4dgpd9iudk5BFEsDS9yfEQ4Zry6KjQtxq9YLFPkVtKwC7mWE5YbcUp3F4qUBZbbC5UV X-Received: by 2002:a50:f05c:: with SMTP id u28mr1906914edl.265.1573746012015; Thu, 14 Nov 2019 07:40:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573746012; cv=none; d=google.com; s=arc-20160816; b=fq7kYgI0zwpcj9Ro4U9yxFuzBycYlpiSO7AWT3kOpfzRda9JotA+SUMdlcnwx3mFod 5HDjkUhuxyAsMkhVB0ncfvitk7CD8aDhzNU8vElVILeDXp5m+eOdFxA4dSdHlSx+E3br dZaOWAaJMp/+rDlJZ55ExtE+W+4MdTSbslciBmjDAySjrFj9GEGSzApBiJbJNK3iH2ph NSqYR2m97oy8n/vBDEH02zT0x1m1p2tGX68fafLo5xda5V8vs9LZKW4YM10nFU9HcX63 rn9lM50StHLLhgPoWMQu1EeEESUuFPocgFMcURmUsKV366tBaoMJqCDnEEPeW0Fvg2Py hNrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Ik2QPcY3BYCfa0MQAyReN6/fOyeG4H8aydWoIfeiFRY=; b=cnp0hwbDT4tXzyjVAr6w419eYJKfrp7Wk0qgekTzSY4d0PlSdaDaU+Aqw0US6DXNcc eN/s+0kh6UoJJeaJSyJ2ZWYx8KL0Lr9eMcaKjPnE9buRGVK4qcOPXFcbVNxmjwSnuL4a orWAhMjci261B0oCf7dQnolmCu/gCneifFhgPa6BKC2h3AHKeOxOcqvVV1fEYu9trOG7 qRUyUo2lKhlWuCrjHKbnXgR2FYueO7Apn6gGwDnsGleFqvmyq295nORmkfY5qW0WrSpB jqCEzwY8+bzndGdZvqPby1c8nftM9s3ErELa45wjfigeonrEt+pmufmFHugRmAQOy54W T7Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=fTvqlHWs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f10si3226087ejr.129.2019.11.14.07.39.46; Thu, 14 Nov 2019 07:40:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=fTvqlHWs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726818AbfKNPha (ORCPT + 99 others); Thu, 14 Nov 2019 10:37:30 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:32907 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726339AbfKNPh3 (ORCPT ); Thu, 14 Nov 2019 10:37:29 -0500 Received: by mail-io1-f65.google.com with SMTP id j13so7301035ioe.0 for ; Thu, 14 Nov 2019 07:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ik2QPcY3BYCfa0MQAyReN6/fOyeG4H8aydWoIfeiFRY=; b=fTvqlHWsZQDIK2GyerKHBwgtfpQAKh/wtLVJoadFkpdZrIpkSrhlvd86vYCm18vs0z NpYjz+YByzIaXLXhpormeBpxb3hNbCirGsiKENMbJFYngesxR5NrA6tFcbrrOCpbkIwA 1EEGVEgz+VUtog7y2BocnNUr0FAbrkzSiGbdQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ik2QPcY3BYCfa0MQAyReN6/fOyeG4H8aydWoIfeiFRY=; b=El96Gus7a+uTOIAwFkVS2Ksw4TQcPrL4tfT/EZEOGLNbkKw8s3LxQHF2m77lkbB7os qqGBRYPw10er8lqD5iB34rUom6UrE23XVAATJhJH6eWzXONtbarD9c3tVbL8HFHF0gDQ UMyk0vE8Q2U7mlt/ECqCThlKdHUZIb21ctfgu/kul+xsiELxpOkONn0va0NC2iJ5GdwU twoVDUyLVH028mwXZtl/JoVMlrg2MszP6Wf+QK7vDAc89uKt0XtD7H799ocKwcDUk/q0 F/qNTNT4DN5jgLfXs12dHVdemhGG56PdsKeVrc5R5+Kta7kR+iaT88piW1q22UZhIFY7 sSkQ== X-Gm-Message-State: APjAAAUKOM7C7LJMlVxU4BEjWhRkCYRS2XOeJ4iT7zD4866DoVIowpbO avS8PA1zq8yf/Cjq3m4SgzoTz3DmB5f6ZD+o2nDG+Q== X-Received: by 2002:a6b:3bca:: with SMTP id i193mr7568923ioa.285.1573745849024; Thu, 14 Nov 2019 07:37:29 -0800 (PST) MIME-Version: 1.0 References: <20191113200651.114606-1-colin.king@canonical.com> In-Reply-To: From: Miklos Szeredi Date: Thu, 14 Nov 2019 16:37:17 +0100 Message-ID: Subject: Re: [PATCH][V4] ovl: fix lookup failure on multi lower squashfs To: Amir Goldstein Cc: Colin King , Miklos Szeredi , overlayfs , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 14, 2019 at 3:43 PM Amir Goldstein wrote: > > On Thu, Nov 14, 2019 at 12:30 PM Miklos Szeredi wrote: > > > > On Wed, Nov 13, 2019 at 9:06 PM Colin King wrote: > > > > > > From: Amir Goldstein > > > > > > In the past, overlayfs required that lower fs have non null > > > uuid in order to support nfs export and decode copy up origin file handles. > > > > > > Commit 9df085f3c9a2 ("ovl: relax requirement for non null uuid of > > > lower fs") relaxed this requirement for nfs export support, as long > > > as uuid (even if null) is unique among all lower fs. > > > > I see another corner case: > > > > n- two filesystems, A and B, both have null uuid > > - upper layer is on A > > - lower layer 1 is also on A > > - lower layer 2 is on B > > > > In this case bad_uuid won't be set for B, because the check only > > involves the list of lower fs. Hence we'll try to decode a layer 2 > > origin on layer 1 and fail. > > Right. > > > > > Can we fix this without special casing lower layer fsid == 0 in > > various places? I guess that involves using lower_fs[0] for the > > fsid=0 case (i.e. index lower_fs by fsid, rather than (fsid -1)). > > Probably warrants a separate patch. > > > > I guess we should. > I do hate that special casing. > I can work of that, but would you like to hold back this patch now? > Or just fix that corner case later? Okay, let's fix the main case first, then the corner case... Thanks, Miklos