Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935006AbcJXIMC (ORCPT ); Mon, 24 Oct 2016 04:12:02 -0400 Received: from mail-yw0-f196.google.com ([209.85.161.196]:34927 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934086AbcJXIL6 (ORCPT ); Mon, 24 Oct 2016 04:11:58 -0400 MIME-Version: 1.0 X-Originating-IP: [217.173.44.24] In-Reply-To: References: <20161012133326.GD31239@veci.piliscsaba.szeredi.hu> <20161020204630.GA1000@redhat.com> <20161020205408.GB1000@redhat.com> <20161021201335.GB20129@redhat.com> From: Miklos Szeredi Date: Mon, 24 Oct 2016 10:11:56 +0200 Message-ID: Subject: Re: [POC/RFC PATCH] overlayfs: fix data inconsistency at copy up To: Amir Goldstein Cc: Vivek Goyal , "linux-unionfs@vger.kernel.org" , linux-fsdevel , linux-kernel , Jeremy Eder , David Howells , Gou Rao , Vinod Jayaraman , Al Viro , Dave Chinner Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1265 Lines: 27 On Sat, Oct 22, 2016 at 5:39 PM, Amir Goldstein wrote: > On Sat, Oct 22, 2016 at 10:24 AM, Amir Goldstein wrote: >> On Fri, Oct 21, 2016 at 11:13 PM, Vivek Goyal wrote: >>> --- >>> fs/file.c | 41 +++++++++++++++++++++++++++++++++++++++++ >>> fs/overlayfs/inode.c | 1 + >>> 2 files changed, 42 insertions(+) >>> >>> Index: rhvgoyal-linux/fs/overlayfs/inode.c >>> =================================================================== >>> --- rhvgoyal-linux.orig/fs/overlayfs/inode.c 2016-10-21 15:43:05.391488406 -0400 >>> +++ rhvgoyal-linux/fs/overlayfs/inode.c 2016-10-21 16:07:57.409420795 -0400 >>> @@ -416,6 +416,7 @@ static ssize_t ovl_read_iter(struct kioc >>> if (IS_ERR(upperfile)) { >>> ret = PTR_ERR(upperfile); >>> } else { >>> + replace_file(file, upperfile); I think it's a cool idea. But I'm not even going to look at the implementation for now, because it's such a rare corner case, that trying to optimize it should really be the last thing we do after everything else is working fine (and only if it actually turns out to be a thing that somebody actually cares about). Thanks, Miklos