Received: by 10.192.165.148 with SMTP id m20csp4959577imm; Tue, 24 Apr 2018 11:12:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+hQDKgD0Xh5axYp+mgk/vtRH7XVxJowUUmn9c6LVSQpK5ZOThxNpbc1PcXieGL+wiUj7Ph X-Received: by 2002:a17:902:624:: with SMTP id 33-v6mr26050264plg.361.1524593542227; Tue, 24 Apr 2018 11:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524593542; cv=none; d=google.com; s=arc-20160816; b=MfkrSPccthbLyaL8+7+a7+trQ9T0aEaJKN9VgvdAsO0ztGAmFCQx0gFqOjMSVqGDPy L5z60Nh2hKSn6ga077RGFFAtdaqOAUOvoKgsAjgwhlR9eEnnKdHOA+RMw6oal9Ovid0N lFddvViN1hRCLwN6JoJg5RZTC4uevUtu/Uebtd02FOZ+jhWJqVHz2s9l3pWR8s0bFavK koiTLZ0kmbc2I9a++/seLSnqiGmyPm3byYF52BRy7bXwhtakUrwTErq8346s8IWrEwJR 3d9VIaNRmkyF6matbFfdS3XmWy4iGhcuDrL9Ez4ZCMw7lQ8DFL+3COSgZLNHSkA9zBEv long== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=czK2yt8wu0ZlnQr5BZlnB6AgWIvASNWPzFIL59kQygw=; b=U6WkN1wkzHM3v/5ZLtlYUT6TROI/ShP/pK6bD/jgy4JlUxXOOjYY6xtLOiIYEXTQnl Jt/d1ziVpzZW1LZA7e3ya1YSXKj9AA/Ebirqjc3tFd50ouSY0T82T7cJDlfYK8d8cPAe XrssssfV3bfhzxPvuLU1q7AhN1885hOicOCydkUhtIKUlJlFPsOYh5QQP/S2t+Rs9th5 Rr1IyRLmIWRXb/JgiKElU6z5bb1e2IRdpZaCLHQCXo/ZvVqslBt2k1ZOvkCJV1sG2jQw uLkEdVEbkFnqm4azXKj1tiJVFQJa0qil44RcaA1i3EyMz/MvV96lq+Dz3p5WlBzgxof4 S19g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x4si6315223pgc.411.2018.04.24.11.12.06; Tue, 24 Apr 2018 11:12:22 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751510AbeDXSK7 (ORCPT + 99 others); Tue, 24 Apr 2018 14:10:59 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59200 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750735AbeDXSK6 (ORCPT ); Tue, 24 Apr 2018 14:10:58 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 965A210D43F; Tue, 24 Apr 2018 18:10:57 +0000 (UTC) Received: from horse.redhat.com (unknown [10.18.25.159]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8685E2026990; Tue, 24 Apr 2018 18:10:57 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 3E5F8220267; Tue, 24 Apr 2018 14:10:57 -0400 (EDT) Date: Tue, 24 Apr 2018 14:10:57 -0400 From: Vivek Goyal To: Miklos Szeredi Cc: linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 07/35] ovl: copy up file size as well Message-ID: <20180424181057.GA2700@redhat.com> References: <20180412150826.20988-1-mszeredi@redhat.com> <20180412150826.20988-8-mszeredi@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180412150826.20988-8-mszeredi@redhat.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 24 Apr 2018 18:10:57 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Tue, 24 Apr 2018 18:10:57 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'vgoyal@redhat.com' RCPT:'' 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 05:07:58PM +0200, Miklos Szeredi wrote: > Copy i_size of the underlying inode to the overlay inode in ovl_copyattr(). > > This is in preparation for stacking I/O operations on overlay files. > > This patch shouldn't have any observable effect. > > Signed-off-by: Miklos Szeredi > --- > fs/overlayfs/overlayfs.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h > index 265cb288417a..10f5f3bf9d96 100644 > --- a/fs/overlayfs/overlayfs.h > +++ b/fs/overlayfs/overlayfs.h > @@ -9,6 +9,7 @@ > > #include > #include > +#include > #include "ovl_entry.h" > > enum ovl_path_type { > @@ -355,6 +356,7 @@ static inline void ovl_copyattr(struct inode *from, struct inode *to) > to->i_atime = from->i_atime; > to->i_mtime = from->i_mtime; > to->i_ctime = from->i_ctime; > + i_size_write(to, i_size_read(from)); > } With this change, is following comment in ovl_getattr() stale now. /* * We don't initialize inode->size, which just means that * inode_newsize_ok() will always check against MAX_LFS_FILESIZE and not * check for a swapfile (which this won't be anyway). */ Thanks Vivek