Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3945928ybl; Tue, 20 Aug 2019 04:50:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzh5nWaUeLbi890f1Ap6kJKzhOybcoicOIFQtxu74tAY0wsdv0JJ+bH7ojWHuYrVPSz90ui X-Received: by 2002:a63:eb51:: with SMTP id b17mr23634420pgk.384.1566301850249; Tue, 20 Aug 2019 04:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566301850; cv=none; d=google.com; s=arc-20160816; b=HKRfkrCnkzFHmAKLTrgt520b7AmSnus1oScZVNM5ZgWKfjpW30yUKJIMT5aoOkEjgH u/8V2og2y9IeG/duiRhSYXpMHIeWtKmaP67/PoD94MxR4jDorLfzV3B3VFpyzYTMiyTd sks7LYPUML5zwYWV9cnGRJat0Z0GQeYVpUxwPHHcOPm8K9SNKjGHLPMoh9a/d1WDzhbp Hk80MGszh06skDLsyHZOqQNXhmcagzAvCiZ49lPBqm4vD6vU6bYRb2m1uQIKFWGmk4I+ oT4UTJnUcqkKIOJuCbrmLvnLEClWG2Lq8Hng9IInSQA5VNpG6Tr6OXYHiYqWPwjJ6Tb3 o2IA== 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; bh=6nhf/Ms4fF82JroXpn3gwO3kduDX1I/bVAEVAU5J7uU=; b=zlt8Jf8VY2NJe0UiMsS/72jldDr2HjrQEmpGfkydeoZOkuO1p+emoik5hjtqKRnmBY zV40s7cP+UMdeR9+PAkVd6kEawYVNburOILc/fy9P+07C174smaJgtfGjNdNdlHpJknV +deR/lr8oTMlP3pPj/JQR0nab/YHlZSZnlaZ+2y7idCACs6zU0umxb4rw0RSvHdWPlyN 174d2QtIXdEelVtslM19H4X/e1DSEKOJlAY9g1g11kuACumotVUy8kDgyNRSucWOvdWc 5gcKvIWrxvr+5LZyKiFQYGnuVoXis6oay/5KZxyqTGOnxfh+Wy+EkOjq72tRExDFxrqb d4bg== 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 z72si11762247pgd.34.2019.08.20.04.50.34; Tue, 20 Aug 2019 04:50:50 -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 S1729826AbfHTLtp (ORCPT + 99 others); Tue, 20 Aug 2019 07:49:45 -0400 Received: from nautica.notk.org ([91.121.71.147]:42261 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729741AbfHTLto (ORCPT ); Tue, 20 Aug 2019 07:49:44 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id E2887C009; Tue, 20 Aug 2019 13:49:42 +0200 (CEST) Date: Tue, 20 Aug 2019 13:49:27 +0200 From: Dominique Martinet To: Chengguang Xu Cc: ericvh@gmail.com, lucho@ionkov.net, v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] 9p: avoid attaching writeback_fid on mmap with type PRIVATE Message-ID: <20190820114927.GA12715@nautica> References: <20190820100325.10313-1-cgxu519@zoho.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190820100325.10313-1-cgxu519@zoho.com.cn> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Chengguang Xu wrote on Tue, Aug 20, 2019: > Currently on mmap cache policy, we always attach writeback_fid > whether mmap type is SHARED or PRIVATE. However, in the use case > of kata-container which combines 9p(Guest OS) with overlayfs(Host OS), > this behavior will trigger overlayfs' copy-up when excute command > inside container. hmm, I guess this just works for non-ovl cases because sync_inode() realizes there is nothing to sync, but the fsync at the end still triggers the copy-up ? Well, I guess there really is no need to flush for private mappings, so might as well go for this; sparing an extra useless clone walk cannot hurt. I'll queue this up after tests, no promise on delay sorry :/ -- Dominique