Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1376001pxb; Thu, 7 Oct 2021 06:37:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyq6/ECL0/WuhNIzb3CTthQzgc8l6c7cvkn0nspmkiD0ywZLkSfG+h7QLdO2YnWw+0KO94i X-Received: by 2002:a05:6402:5255:: with SMTP id t21mr6048385edd.103.1633613864809; Thu, 07 Oct 2021 06:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633613864; cv=none; d=google.com; s=arc-20160816; b=E6gEHXQ0kbhWVPnHUlNHMkN7gXjI37V7XLB6Yb3oc/TlKpmYEWa956nR1qlzSYrDIN JugtvpW85SLiHMJVxGP5INHdx7Edgry4R5lGy5v/wNlIiXJ71glfuv51jUXzIWS2dpdG wyxarQ337cxrp7i9f+jWm5VIF/AEpkETbwT1GvmFTRpoROWFgNBkPmi24eznyjZ3gukj 6aP7hKeTCgq8yidlXsM+LewfNdhciVFbV/NlLPhV5ny8E3ZxMVTnY7f7VNd/ltNvO777 S/z7Y6zSa1OFd8mMt/3BsMzRE6q4IwLTXk70Yd8qXzW+r5dkCjd8urhnCjlHNqg2gkDk Ou0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jag9C+ogrZcxnbvlzXCV96tv+CXNE9JJxs7UZNJcVuY=; b=r9MJ+MPer6zzH/+Kp19qKBhBO+HR22TU0GCOSd7UpxRWI7vr3Jo/CNrd05Ve9G8S/d lkfTinhzrF8x/o/FnqKj2ylyiYb/9wUcoLl7h2NWrUVz62p3x6yuXaDwxGLJY6bMWvD3 V5AkixrpuvpUZiwOsXRlvgyuKEB+ooLW0srLyg4BvJWS/ivVg/UlBeT+jrmgGYyOqcML r5dM+zkUDIvazpEJY+VBJF9citHTWhcnB6tiRLiGX05eJLIG8RDD56DYDoy4zCBnw4MX 2UbZp7MymaR5QKRr4KKJjVb1zdc9oLIqak3kCEGrG2ACjQXTPG1RfSWofaAzWa9Fe5hE rWBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=YPEEqVqn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg13si28439911edb.604.2021.10.07.06.37.20; Thu, 07 Oct 2021 06:37:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=YPEEqVqn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241075AbhJGNg0 (ORCPT + 99 others); Thu, 7 Oct 2021 09:36:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241180AbhJGNgZ (ORCPT ); Thu, 7 Oct 2021 09:36:25 -0400 Received: from mail-ua1-x930.google.com (mail-ua1-x930.google.com [IPv6:2607:f8b0:4864:20::930]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A170CC061755 for ; Thu, 7 Oct 2021 06:34:31 -0700 (PDT) Received: by mail-ua1-x930.google.com with SMTP id g13so3672102uaj.3 for ; Thu, 07 Oct 2021 06:34:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jag9C+ogrZcxnbvlzXCV96tv+CXNE9JJxs7UZNJcVuY=; b=YPEEqVqncgDZE3eOkA9QLiJA/i4iA0W9YwPaz99zO6kRow3kMf036K9y4L5ulmXREu ZJ+XMgqDtE8jQNFq4SiulrFzWphUX+a4zhH3stha9Lt4cLuaXNJfpnwDN0TSCrbHNC4l 5eukq3L/u0pJrD9i1pnR4NBIR94tVFkZ3ItWA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jag9C+ogrZcxnbvlzXCV96tv+CXNE9JJxs7UZNJcVuY=; b=wvfQc6V4Yf8zFifF+wEDCojbBMAW0fQhRqRZpFRnJyYp9p0DDH7zEx5+oqSJktgDFv rXAASDhczAL9E1rqsmhKeuYxT/wwUjt+k4oZbMqdrUiaAHjMEPkI6kN4VFPfHrEtmj9a JCx7xKDGp5dS9mg5eI6vuvvcB711v8oriFbuTVuefHn34jfuh3zA5LlCC2wdgsZItCSA 7hag/m3EvzvhA80zLP2L4Nb98pMCUuV5rqkz2uq2FI0A1JoCcBMIKw8FbNynP54Qrmeu Q8smA9hfUhLcteqAWJjUzH6TWiCV7lRdZeCBPbnK13fp3yu0tLBV3ST0niIPJ/kENVuE nhDA== X-Gm-Message-State: AOAM530mTe/VXboKII1FIjrA/lrt/7i6oyLiyI/mB2LKzcH0wZ5xBKwl CmW0Iw2+XNhw5OAXkXFezat5/niBHRcjRI9hssScSg== X-Received: by 2002:a9f:234a:: with SMTP id 68mr4384005uae.13.1633613670429; Thu, 07 Oct 2021 06:34:30 -0700 (PDT) MIME-Version: 1.0 References: <20210923130814.140814-1-cgxu519@mykernel.net> <20210923130814.140814-7-cgxu519@mykernel.net> <17c5aba1fef.c5c03d5825886.6577730832510234905@mykernel.net> <17c5adfe5ea.12f1be94625921.4478415437452327206@mykernel.net> In-Reply-To: <17c5adfe5ea.12f1be94625921.4478415437452327206@mykernel.net> From: Miklos Szeredi Date: Thu, 7 Oct 2021 15:34:19 +0200 Message-ID: Subject: Re: [RFC PATCH v5 06/10] ovl: implement overlayfs' ->write_inode operation To: Chengguang Xu Cc: Jan Kara , Amir Goldstein , linux-fsdevel , overlayfs , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 7 Oct 2021 at 15:10, Chengguang Xu wrote: > > However that wasn't what I was asking about. AFAICS ->write_inode() > > won't start write back for dirty pages. Maybe I'm missing something, > > but there it looks as if nothing will actually trigger writeback for > > dirty pages in upper inode. > > > > Actually, page writeback on upper inode will be triggered by overlayfs ->writepages and > overlayfs' ->writepages will be called by vfs writeback function (i.e writeback_sb_inodes). Right. But wouldn't it be simpler to do this from ->write_inode()? I.e. call write_inode_now() as suggested by Jan. Also could just call mark_inode_dirty() on the overlay inode regardless of the dirty flags on the upper inode since it shouldn't matter and results in simpler logic. Thanks, Miklos > > Thanks, > Chengguang > > >