Received: by 10.192.165.156 with SMTP id m28csp578709imm; Fri, 13 Apr 2018 04:25:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx49wGQTRvJpjuhyZJEUD17siGbHdC0XijuVbr1WnwbJgIU1pzDvZC4JX6ltSPODWu37AbQQV X-Received: by 2002:a17:902:758d:: with SMTP id j13-v6mr4916541pll.334.1523618741505; Fri, 13 Apr 2018 04:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523618741; cv=none; d=google.com; s=arc-20160816; b=eWBwQ9C1Ue9dXDIMf+bQVWHe0Ll/rcDzhCy4S1QYtH9KA2TcRag+5Pc3g/fc95WARb eScpFamrP3sDMsMnobC1vrjzdn0KdIblk01JaYT2dXzanJCSqDx1QPdHWgXDP4ebslue 6sOnsSqG43owRWn0vZTaQxyuUB03Uaw0A+7qV3joys9hFIIfK/Xf0bXzGVHhQwHvAdT9 rWfaQvbgInxgpE6Ft1oRx0GMKyGbJ2j6IhX2Ut+bLcGs+KPOnoW1JevX3yRP8ai1r5TS PpEmK3cJn5FgKUS4B1cYkmPdETMq1TNnZyr0Rc11nuYW+c2+H/Cl8qGlGxAICMvREQXg I+1g== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=MVdd97E6oXgBZQalEtCf781SdSuhvVlTj+Dy+kMRhfg=; b=sfwItovr+dvtPOp4IhvQQa9uo1SCJ+zIyxXYi0yI66NqmZRrCH2NElsZztMxE3OExR nCsnu/EROVZ4l8dVaLW+i/GziN3yMu/1WyaKrjhvsp3ln9o4B1jZCNO8Syscm9TVeanU bLFUXMT9KIUKFBDcjIYhJSeHfD/CJaYn3ZkWLnjmCa5gehTKfBxeCc0i4kqTMm8wkkQt fM+IYViOvgE/nPcAUMPVLb1RaOpqM14jaMYjg/7laGGoDrNQinyjGxrYiNGXKqxXcXkw BAZ7JRwj749Hl33Dpa2zmMcl1/ZOpDAhbZK+mPbBaZVYS+8IZmo6yxRVJSEe8XYIkvzM AZ7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YzlJIcfn; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si4005397pfn.214.2018.04.13.04.25.27; Fri, 13 Apr 2018 04:25:41 -0700 (PDT) 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=pass header.i=@gmail.com header.s=20161025 header.b=YzlJIcfn; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754612AbeDMLYG (ORCPT + 99 others); Fri, 13 Apr 2018 07:24:06 -0400 Received: from mail-yb0-f195.google.com ([209.85.213.195]:35679 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754567AbeDMLYB (ORCPT ); Fri, 13 Apr 2018 07:24:01 -0400 Received: by mail-yb0-f195.google.com with SMTP id c1-v6so4286468ybm.2; Fri, 13 Apr 2018 04:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MVdd97E6oXgBZQalEtCf781SdSuhvVlTj+Dy+kMRhfg=; b=YzlJIcfnjfcHrXJHxWLLdu3C2zFXFud7ShAWFTSbYSBlJ0te+2YiWarpWw0nwkOTIj IdHsUWdKW/lXugCavBJ6oC4TxZzyuP9kPqAtusy6mvXityYgrij+740SG8b5Gw5Qxc1G yaABeSG1nXea/VvhGVwnbeta/AQVFKyRGyGXZE9n10QBixoPyt18NgvaHTts0Gyoypwj 9eXl27/vCyffthyXjD2CAsn3DHCv5m2G8C7pwKNEmYxPL04DXSrw+MVzrtnk2Xj50sOi mRaZk+5GIWjMfhJjIO4rxJmWWsHAjqL3XrEqamguDUPNMr74aQ4QBxpDK3LfZ7aZYM/T zvyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=MVdd97E6oXgBZQalEtCf781SdSuhvVlTj+Dy+kMRhfg=; b=ngRv3FHCwgvyrBw5Wy1z5HtsKs/Wll4SGyhCNuAjdNQkdUstPReb5e+sFVK/v9PPU/ p4tBOLSYiHj90Q9zC3EDI1krEtItcy8Uy+QN/taOds39DD+Lw9pcSxwO+0usKTr4ZlqH 3/SJ5W5T1mSKGkarHnHJsUSdTe7FRKYN5DQ1zR808zZ287pQHPXQ2A8mGnlhZuWAnVxy 0il/uUYhXTIBOy7NuX3zkkFAcb02yGbPEzDw6k9qDqF8Guz1re7rc3NvhK7XgyuL0IlP 33XNGWgH/Mejl34SfSLS4nUFx9Gasm3HLBE7XkSr4AeGu4+g+0Jfjgd+HwLlYIyIdY3W 4IKw== X-Gm-Message-State: ALQs6tBk18BHQG90zNZQJpp/OWj+3xy8ESyQzu385aVCH6/rN3c0S6ai 3t9Vo1uYgfeJTkNuxrAdexV67iOdqyPT5brECnU= X-Received: by 2002:a25:3d44:: with SMTP id k65-v6mr1461687yba.377.1523618640092; Fri, 13 Apr 2018 04:24:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.183.12 with HTTP; Fri, 13 Apr 2018 04:23:59 -0700 (PDT) In-Reply-To: <20180412150826.20988-36-mszeredi@redhat.com> References: <20180412150826.20988-1-mszeredi@redhat.com> <20180412150826.20988-36-mszeredi@redhat.com> From: Amir Goldstein Date: Fri, 13 Apr 2018 14:23:59 +0300 Message-ID: Subject: Re: [RFC PATCH 35/35] ovl: fix documentation of non-standard behavior To: Miklos Szeredi Cc: overlayfs , linux-fsdevel , 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, Apr 12, 2018 at 6:08 PM, Miklos Szeredi wrote: > We can now drop description of the ro/rw inconsistency from the > documentation. > > Also clarify, that now fully standard compliant behavior can be enabled > with kernel/module/mount options. > Very nice! Is it maybe a good time to tone down this expectation-lowering phrase from the introduction: "The result will inevitably fail to look exactly like a normal filesystem for various technical reasons. The expectation is that many use cases will be able to ignore these differences." > Signed-off-by: Miklos Szeredi > --- > Documentation/filesystems/overlayfs.txt | 64 ++++++++++++++++++++++----------- > 1 file changed, 43 insertions(+), 21 deletions(-) > > diff --git a/Documentation/filesystems/overlayfs.txt b/Documentation/filesystems/overlayfs.txt > index 961b287ef323..095186080d23 100644 > --- a/Documentation/filesystems/overlayfs.txt > +++ b/Documentation/filesystems/overlayfs.txt > @@ -306,27 +306,49 @@ the copied layers will fail the verification of the lower root file handle. > Non-standard behavior > --------------------- > > -The copy_up operation essentially creates a new, identical file and > -moves it over to the old name. Any open files referring to this inode > -will access the old data. > - > -The new file may be on a different filesystem, so both st_dev and st_ino > -of the real file may change. The values of st_dev and st_ino returned by > -stat(2) on an overlay object are often not the same as the real file > -stat(2) values to prevent the values from changing on copy_up. > - > -Unless "xino" feature is enabled, when overlay layers are not all on the > -same underlying filesystem, the value of st_dev may be different for two > -non-directory objects in the same overlay filesystem and the value of > -st_ino for directory objects may be non persistent and could change even > -while the overlay filesystem is still mounted. > - > -Unless "inode index" feature is enabled, if a file with multiple hard > -links is copied up, then this will "break" the link. Changes will not be > -propagated to other names referring to the same inode. > - > -Unless "redirect_dir" feature is enabled, rename(2) on a lower or merged > -directory will fail with EXDEV. > +Overlayfs can now act as a POSIX compliant filesystem with the following > +features turned on: > + > +1) "redirect_dir" > + > +Enabled with the mount option or module option: "redirect_dir=on" or with > +the kernel config option CONFIG_OVERLAY_FS_REDIRECT_DIR=y. > + > +If this feature is disabled, then rename(2) on a lower or merged directory > +will fail with EXDEV ("Invalid cross-device link"). > + > +2) "inode index" > + > +Enabled with the mount option or module option "index=on" or with the > +kernel config option CONFIG_OVERLAY_FS_INDEX=y. > + > +If this feature is disabled and a file with multiple hard links is copied > +up, then this will "break" the link. Changes will not be propagated to > +other names referring to the same inode. > + > +3) "xino" > + > +Enabled with the mount option "xino=auto" or "xino=on", with the module > +option "xino_auto=on" or with the kernel config option > +CONFIG_OVERLAY_FS_XINO_AUTO=y. Also implicitly enabled by using the same > +underlying filesystem for all layers making up the overlay. > + > +If this feature is disabled or the underlying filesystem doesn't have > +enough free bits in the inode number, then overlayfs will not be able to > +guarantee that the values of st_ino and st_dev returned by stat(2) and the > +value of d_ino returned by readdir(3) will act like on a normal filesystem. > +E.g. the value of st_dev may be different for two objects in the same > +overlay filesystem and the value of st_ino for directory objects may not be > +persistent and could change even while the overlay filesystem is mounted. > + > +4) "copy_up_shared" > + > +Enabled with the mount option or module option "copy_up_shared=on" or with > +the kernel config option CONFIG_OVERLAY_FS_COPY_UP_SHARED=y. > + > +If this feature is disabled, then a memory mapping created with MAP_SHARED > +might contain stale data if the file has been copied up and modified in the > +meantime. > > > Changes to underlying filesystems > -- > 2.14.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html