Received: by 10.192.165.156 with SMTP id m28csp741699imm; Fri, 13 Apr 2018 07:05:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx48kK+5HamI8UcM36lY5j8W9NjriNhEWqpRM3pUfcLX8cX4b4sxVqYZolHNUG/YvmoSmHDgR X-Received: by 2002:a17:902:9349:: with SMTP id g9-v6mr33709plp.73.1523628356600; Fri, 13 Apr 2018 07:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523628356; cv=none; d=google.com; s=arc-20160816; b=mEohSFnZx5tvHHcK3Ky1HY0XjC82zvKwVZhY4ad9oKtYRWR8AiEy8plvgnV9U1PZc7 M0tpa62libNNTmF7pyM4zaE/3Rf7h/YztvmywfJAgXFVzYH4cz+tYP44nD/8Zx5zLMhn gw+teIESL1a2yc5P2TvmZX2hhCbLShx57+3xkQqclOW4tLMEBjXcOa605ors3Q9oc05s fBu1FtNi+hbhR2rHjWn2gTBdkO/WHZmEjM61Nz55lBOgo9vlK/DgtzC/f4jkvw/CANWk TUQTdpsTSG9uQ/6HeRwrQsYI0lsroZDSOnFhBjeZcFawjuzab8p6ydyeuYaP8wF/638B X0Ig== 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=AWt71p3NHWtMjT5roPo+TCSBCuA/VEw6W03VkIiksEA=; b=MAqAjp4/E+s0O1flfx+e/4n/q1Qix95dYlbad5tkYyTGGrjnkqfp3B1I0iQIUL8Hbx Lg1WoBzl9k7syimigUC4yu8ZZC719QGE2REg1aiyrJSoUfwpLvZabeBWWYby0a0FgM5H 7znN2lLswKXLvAdTPzyXR6IQsw/rwTWgajd2u5wCNLemkcWeqPXZmn0i62rP4aDSCI6w o+x3Zx5ov9nRTxOicKRGIiA52rIj9BcP1r64LeVH5e5zLRxxglKmpZjzlnnZpwIdu9nB fZlJ3a61j+8PffzFl8D4JgEkm+fOQ6p4vrV4F/83DO1qqbR38mpq107szxq6IO8lvNGq cK6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ewxTBrgm; 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 a64si3902045pgc.265.2018.04.13.07.05.40; Fri, 13 Apr 2018 07:05:56 -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=ewxTBrgm; 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 S1754839AbeDMOCF (ORCPT + 99 others); Fri, 13 Apr 2018 10:02:05 -0400 Received: from mail-yb0-f195.google.com ([209.85.213.195]:35779 "EHLO mail-yb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754818AbeDMOCC (ORCPT ); Fri, 13 Apr 2018 10:02:02 -0400 Received: by mail-yb0-f195.google.com with SMTP id c1-v6so4457975ybm.2; Fri, 13 Apr 2018 07:02:02 -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=AWt71p3NHWtMjT5roPo+TCSBCuA/VEw6W03VkIiksEA=; b=ewxTBrgm7XwmHqvB5TLICAxebs74KpxpZ7w69++OkHvEEzsuywGHDqGHKuTmz1MQca D/aYuWxUdO79caMnW9NCwnsFOYTY2pybYTIo2qniR7fiog64zTvneQEuPWI2t6dvroD9 q28J03qQRb+f++EMKGM+5h3qRM9Pvyl+cWH5v6qoCW0n30yqTC4wap/V/ONuEjCi4CDx XdrzHCtzGqu9I9tB+kq61hCGWRF38/hMNDC0oc+pogyOMpFwlqAVtdklEeSIGgFFLOQb 8q5SHTCPoXRcd/Lu71jNrMycuEiMY4SzKwg75Ht1szn7SkqzMnRa2A9vxLx+YthayjPA EQAw== 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=AWt71p3NHWtMjT5roPo+TCSBCuA/VEw6W03VkIiksEA=; b=uTKccXVVwNHQ8apXvd8shi2WpABQR2cr814EtllMLRXjq0JpkRzeqr8D1pYsTNP8hR a6kr9XsZPJ+RuBFvcM3qH9rI6JuBfeMvpggNTozg0r6I6zgxKNDjfxLxT9JHB5I7QTs4 j4x6Ws6NwZH/65ffbqJhCSuSmZsSkYTlpNS3NwtaYEWs1T6i5Xc19Aq0oFk8U4u1GnjE 3A1qt07mTYvPyPzS2ixsnU5b1eqo5f2WHUb41RdCE/qZo/5GNuLmRWvX4duPKxMmzCoL U1U7pkbOnxRcR2X+U2/4SUa1mGfR3hBWsDs6PbfulbE1Kr2LxYFjUckiV984DG/jtH4d Jq0A== X-Gm-Message-State: ALQs6tB6HRjgagVXgrkvKfoOhS4eVf1WnjGY2HJIj2gGLe9nVv/T1k5U otuusGKxNplxN+qA98lF4qXTxVy+asW3AdiHJLtsaA== X-Received: by 2002:a25:2d43:: with SMTP id s3-v6mr4793636ybe.475.1523628120790; Fri, 13 Apr 2018 07:02:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.183.12 with HTTP; Fri, 13 Apr 2018 07:02:00 -0700 (PDT) In-Reply-To: <20180412150826.20988-25-mszeredi@redhat.com> References: <20180412150826.20988-1-mszeredi@redhat.com> <20180412150826.20988-25-mszeredi@redhat.com> From: Amir Goldstein Date: Fri, 13 Apr 2018 17:02:00 +0300 Message-ID: Subject: Re: [RFC PATCH 24/35] Revert "ovl: fix relatime for directories" 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: > This reverts commit cd91304e7190b4c4802f8e413ab2214b233e0260. > > Overlayfs no longer relies on the vfs correct atime handling. > > Signed-off-by: Miklos Szeredi > --- > fs/inode.c | 21 ++++----------------- > fs/overlayfs/super.c | 3 --- > include/linux/dcache.h | 3 --- > 3 files changed, 4 insertions(+), 23 deletions(-) > > diff --git a/fs/inode.c b/fs/inode.c > index ef362364d396..163715de8cb2 100644 > --- a/fs/inode.c > +++ b/fs/inode.c > @@ -1570,24 +1570,11 @@ EXPORT_SYMBOL(bmap); > static void update_ovl_inode_times(struct dentry *dentry, struct inode *inode, > bool rcu) > { > - struct dentry *upperdentry; > + if (!rcu) { > + struct inode *realinode = d_real_inode(dentry); > > - /* > - * Nothing to do if in rcu or if non-overlayfs > - */ > - if (rcu || likely(!(dentry->d_flags & DCACHE_OP_REAL))) > - return; > - > - upperdentry = d_real(dentry, NULL, 0, D_REAL_UPPER); > - > - /* > - * If file is on lower then we can't update atime, so no worries about > - * stale mtime/ctime. > - */ > - if (upperdentry) { > - struct inode *realinode = d_inode(upperdentry); > - > - if ((!timespec_equal(&inode->i_mtime, &realinode->i_mtime) || > + if (unlikely(inode != realinode) && > + (!timespec_equal(&inode->i_mtime, &realinode->i_mtime) || > !timespec_equal(&inode->i_ctime, &realinode->i_ctime))) { > inode->i_mtime = realinode->i_mtime; > inode->i_ctime = realinode->i_ctime; > diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c > index c3d8c7ea180f..006dc70d7425 100644 > --- a/fs/overlayfs/super.c > +++ b/fs/overlayfs/super.c > @@ -107,9 +107,6 @@ static struct dentry *ovl_d_real(struct dentry *dentry, > if (inode && d_inode(dentry) == inode) > return dentry; > > - if (flags & D_REAL_UPPER) > - return ovl_dentry_upper(dentry); > - > if (!d_is_reg(dentry)) { > if (!inode || inode == d_inode(dentry)) > return dentry; > diff --git a/include/linux/dcache.h b/include/linux/dcache.h > index 82a99d366aec..4c7ab11c627a 100644 > --- a/include/linux/dcache.h > +++ b/include/linux/dcache.h > @@ -565,9 +565,6 @@ static inline struct dentry *d_backing_dentry(struct dentry *upper) > return upper; > } > > -/* d_real() flags */ > -#define D_REAL_UPPER 0x2 /* return upper dentry or NULL if non-upper */ > - Premature removal of constant. Still in use by may_write_real() at this point. Thanks, Amir.