From patchwork Thu Apr 12 15:07:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miklos Szeredi X-Patchwork-Id: 10338875 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8AA7D602D8 for ; Thu, 12 Apr 2018 15:25:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E4591FFB2 for ; Thu, 12 Apr 2018 15:25:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 713792000A; Thu, 12 Apr 2018 15:25:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FC3B1FE82 for ; Thu, 12 Apr 2018 15:25:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753299AbeDLPX2 (ORCPT ); Thu, 12 Apr 2018 11:23:28 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:54068 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753281AbeDLPIk (ORCPT ); Thu, 12 Apr 2018 11:08:40 -0400 Received: by mail-wm0-f68.google.com with SMTP id 66so12327576wmd.3 for ; Thu, 12 Apr 2018 08:08:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uX6aTHnEW9LvbdfGMvzyQ13zpM/CnYREPeragoO2Cpk=; b=M6uCAeqnbFiwyptnIenYbHMTvsd6fsvWSX2tiAoWsEkcmoGiqFxlH+jjt0DKUMu8DC Yng0p/+qZ7XjP//1oJJ7OATRhNLsSkTp+lxJYlWWtIWpEmtd2cPmqsuFQmj9YSpHfmb1 Sd3zjHaYqO4opT4kHyu6ok51NXE/g18DIcr/T40nFZWzzXKZMD5hfgGP4LzujVZuz+SR yijew5Mfqbr0Rwb+7NZohE+P3ChSYKeDyLt1sM4yZJb1c1og5E3dKHEZy2RY11Iz5tyB JeLqDjLKZrIk0hKA9NEolnaIbD6w2ISJuqkKyaLZOByYRfjysTJZn2g6axNb0In92Zjs 0Csw== X-Gm-Message-State: ALQs6tDT20aYA9iqNrnc36iKj/O9qQMC5hZsGzJ6xYVhUnENFMT1Qww8 IcbkChGLg5PMnPhT3YRh1H3S2w== X-Google-Smtp-Source: AIpwx48/+2BeJBgSjRqdg+LzoUIEzfokgjMK0YClUpuXO1zaXQMxe5jpVytkVs2dF8ym3Cy+PDwjdw== X-Received: by 10.28.54.220 with SMTP id y89mr1016890wmh.108.1523545719717; Thu, 12 Apr 2018 08:08:39 -0700 (PDT) Received: from veci.piliscsaba.redhat.com (catv-176-63-54-97.catv.broadband.hu. [176.63.54.97]) by smtp.gmail.com with ESMTPSA id p197sm2621783wme.43.2018.04.12.08.08.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Apr 2018 08:08:39 -0700 (PDT) From: Miklos Szeredi To: linux-unionfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 07/35] ovl: copy up file size as well Date: Thu, 12 Apr 2018 17:07:58 +0200 Message-Id: <20180412150826.20988-8-mszeredi@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180412150826.20988-1-mszeredi@redhat.com> References: <20180412150826.20988-1-mszeredi@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)); } static inline void ovl_copyflags(struct inode *from, struct inode *to)