Received: by 10.213.65.68 with SMTP id h4csp178796imn; Tue, 20 Mar 2018 00:09:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELsPdCOWv8pHe/EL9wqockOE4Ekt05aU7WQ3+Jgv2KQjY2w3t0079pYROLcuszikr0kJzKYZ X-Received: by 2002:a17:902:20eb:: with SMTP id v40-v6mr15443754plg.277.1521529752504; Tue, 20 Mar 2018 00:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521529752; cv=none; d=google.com; s=arc-20160816; b=fVhkqFqsStkq8wa0G8SuZZOW2DuL91tUZ0B/xymJsOHYD9ojQjQHBBnHr3nDlqFDM/ 3JIJYW3KzADlHqLrHgkajsTE+L6jsb3IlO077AcaaGcAhxSsm4e2NP4suezqOpsuN/+V XEqZZ7mKta/u3lcbn0EsdLTlCeD8fFUQ1mNsrGf0mxTvP0IuSzutfVLhN61BwOybV7+9 pcu6QfpNZP4vJ/hI0AbDnPCGdpfkXxXkLgKwTJmwBNwor2OLmBYwIy4jKCjJudQ8Uqth 1G4DL6LJNr5xzSVm0QJ9PWpUE1vdugKSAPwfz1M2G3LO1MzBQHsrXek63FETTfxStHKR K5CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:references :in-reply-to:sensitivity:importance:date:subject:cc:to:from :message-id:mime-version:arc-authentication-results; bh=y37hFvmtLUP+gF1oPEjODNRbzoXMjIpc0o5B/rw9Frk=; b=ZYBgnEje9sDSEsVlqPtz4LhDhby6oGpZBCfWHArCyZT+Ux2uKA9rRqhe26UEurZpRM ClK6WFdF1FrKzLmyqI1W+0EdfHDtiSMBMs8pvwcudyn7yE1FmI/aTUdnoAD5VjudiZ15 kMyO1JgpPqitckm+jol1DIWFDm9O5RIOCnPOCDHrjTy+vnGEFT2mFdkqhUKTTOS0xId8 muAVsF9qgnSUKs7i+FNR8JLs6Whzdsop6vaegCWiCLQrjWgxd7l8lvQ7eWEDv3ohTONf Wmzk3DGl7Uoe2smPkRHnCPXWByU8/MJnlMvRF2HFTyAVFpjPsQh1NArAB9Kyi9iiaNmn jaag== ARC-Authentication-Results: i=1; mx.google.com; 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 k8si773109pgs.555.2018.03.20.00.08.57; Tue, 20 Mar 2018 00:09:12 -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; 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 S1751501AbeCTHHo convert rfc822-to-8bit (ORCPT + 99 others); Tue, 20 Mar 2018 03:07:44 -0400 Received: from mout.gmx.net ([212.227.15.18]:53615 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751317AbeCTHHm (ORCPT ); Tue, 20 Mar 2018 03:07:42 -0400 Received: from [122.224.77.194] ([122.224.77.194]) by 3c-app-mailcom-bs12.server.lan (via HTTP); Tue, 20 Mar 2018 08:07:34 +0100 MIME-Version: 1.0 Message-ID: From: "Chengguang Xu" To: "Chengguang Xu" Cc: =?UTF-8?Q?=E7=8E=8B=E5=85=83=E8=89=AF?= , miklos@szeredi.hu, linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs/overlayfs: Drop dentry cache to prevent unknown file status Content-Type: text/plain; charset=UTF-8 Date: Tue, 20 Mar 2018 08:07:34 +0100 Importance: normal Sensitivity: Normal In-Reply-To: References: <1521525830-88382-1-git-send-email-yuanliang.wyl@alibaba-inc.com> Content-Transfer-Encoding: 8BIT X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:hCO17BgoAsECe0qbdA1lp6taTawx4wI6rrqIPquei/V 4RMOQCaCDE9tVO2TBeS0nJU4UMdjrOnv9YO+6HUzXt+o00Zg5g I8ZRnnQz+bysXnWVAWbdyaf2soVQYTs3z/R4VwgZ0LNZUfzEg2 mXoD68UCCoPSadNFICFDajk3doC8/aT9bqvVnIOP/Hj3/RBLHS 5F1p8JwW/oMDRnm8dc0S9MScTNmi/lMjPKMDsXId9U+Nkm7Xn9 WEjQfBbO0zr06a2D9vNN2XHS86F61mBWDOH7JIoJpbHtXbHsVd C5mQHM= X-UI-Out-Filterresults: notjunk:1;V01:K0:4w4SK8leZds=:nHOzr6uMGlcedV5Bnm0WGC 3lsNnVZdkCIJ3sLOGatXrtsUf6z7IP8aLu8VNbfqHKYE0hIi+8Gr5vs7Kt63Bf53GxOtnrOXK 0E8TkU9fmFfJwg7pCgXZ8JDt/XHXKVG33h0rdL2RiB2cBA+MWtpO1JGgsqEmz4N0kqdVPAVhX Ax7f/njhiJlX8rG6aHrnyk141WBvLrIyB/ukIpTZKpX69ulRADIFtw2GD0P7cS5is/ggDRdSz ZqcQUFyuDcEU5mBACCMKsX4FbzW6DWf2uxIC4LjDwgIw0GjNF17xjxo+ftz9jGlu/R9K/vuVX lEPHX88YYGMLEjEe5Arrgf/6DIzauHvtBSXYKGGaHzn1KRxfAbMooQpqTvJzkeb1OsuLSxGMd wuCbGkDHew88aZVu+PkpuwvrhBIa8FzbZZkydHWyUzGJS5fJi8TK6gTCxA/r0J29619blu2CU 9xfciBQYxGqoLeYDNDYo9n9lV4GY6VlxOGC4HRCJ/3Ov3PnY36A/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yuanliang, Can you try ext4 or xfs(with ftype=1) as underlying fs? It seems the phenomenon that I met on xfs(with ftype=0) as underlying fs. Thanks, Chengguang. > Sent: Tuesday, March 20, 2018 at 2:44 PM > From: "Chengguang Xu" > To: 王元良 > Cc: miklos@szeredi.hu, linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org, 王元良 > Subject: Re: [PATCH] fs/overlayfs: Drop dentry cache to prevent unknown file status > > Hi Yuanliang, > > Can you explain how to reproduce it? and what filesystem do you use as underlying fs? > > > > Sent: Tuesday, March 20, 2018 at 2:03 PM > > From: 王元良 > > To: miklos@szeredi.hu > > Cc: linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org, 王元良 > > Subject: [PATCH] fs/overlayfs: Drop dentry cache to prevent unknown file status > > > > When the dentry cache is not destroyed, statfs will > > take unknown status '?' > > Undestroyed cache dentry also caused new file creating fails > > > > Drop it using d_delete may be a choice > > > > [root@host /] > > Loaded plugins: bestyumcache, branch, fastestmirror, langpacks > > Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache > > fast > > Cleaning repos: xxx.base.x86_64 ops.x.noarch ops.x.x86_64 > > Cleaning up everything > > Cleaning up list of best yumcache > > Cleaning up list of fastest mirrors > > > > [root@host /] > > Loaded plugins: bestyumcache, branch, fastestmirror, langpacks > > Cleaning repos: xxx.base.x86_64 ops.x.noarch ops.x.x86_64 > > Cleaning up everything > > Cleaning up list of best yumcache > > Traceback (most recent call last): > > File "/usr/bin/yum", line 29, in > > yummain.user_main(sys.argv[1:], exit_code=True) > > File "/usr/share/yum-cli/yummain.py", line 365, in user_main > > errcode = main(args) > > File "/usr/share/yum-cli/yummain.py", line 174, in main > > result, resultmsgs = base.doCommands() > > File "/usr/share/yum-cli/cli.py", line 573, in doCommands > > return self.yum_cli_commands[self.basecmd].doCommand(self, > > self.basecmd, self.extcmds) > > File "/usr/share/yum-cli/yumcommands.py", line > > 1475, in doCommand > > return base.cleanCli(extcmds) > > File "/usr/share/yum-cli/cli.py", line 1666, in > > cleanCli > > self.plugins.run('clean') > > File > > "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run > > func(conduitcls(self, self.base, conf, **kwargs)) > > File "/usr/lib/yum-plugins/branch.py", line 65, in clean_hook > > os.remove(os.path.join(root,filespath)) > > OSError: [Errno 2] No such file or directory: > > '/var/cache/yum/x86_64/x/xxxx.noarch.stable/ > > b49e49b87d17818d799363091c7a01dde83b421d-primary.sqlite.bz2' > > > > [root@host /] > > ls: cannot access > > /var/cache/yum/x86_64/x/xxxx.noarch.stable/ > > b49e49b87d17818d799363091c7a01dde83b421d-primary.sqlite.bz2: > > No such file or directory > > ls: cannot access > > /var/cache/yum/x86_64/x/xxxx.noarch.stable/cachecookie: > > No such file or directory > > ls: cannot access > > /var/cache/yum/x86_64/x/xxxx.noarch.stable/repomd.xml: > > No such file or directory > > total 0 > > ?????????? ? ? ? ? ? > > b49e49b87d17818d799363091c7a01dde83b421d-primary.sqlite.bz2 > > ?????????? ? ? ? ? ? > > cachecookie > > drwxr-xr-x 1 root root 30 Mar 15 16:12 gen > > drwxr-xr-x 2 root root 6 Jan 31 13:13 > > packages > > ?????????? ? ? ? ? ? > > repomd.xml > > > > Signed-off-by: Yuanliang Wang > > --- > > fs/overlayfs/super.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c > > index e7c8ac4..f9343d3 100644 > > --- a/fs/overlayfs/super.c > > +++ b/fs/overlayfs/super.c > > @@ -380,9 +380,15 @@ static int ovl_dentry_weak_revalidate(struct dentry *dentry, unsigned int flags) > > return ret; > > } > > > > +static int ovl_dentry_delete(const struct dentry *dentry) > > +{ > > + return 1; > > +} > > + > > static const struct dentry_operations ovl_dentry_operations = { > > .d_release = ovl_dentry_release, > > .d_real = ovl_d_real, > > + .d_delete = ovl_dentry_delete, > > }; > > > > static const struct dentry_operations ovl_reval_dentry_operations = { > > -- > > 1.8.3.1 > > > > -- > > 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 > > > -- > 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 >