Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp401381pxb; Wed, 20 Jan 2021 09:38:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvNLo6MUdVzxLI7wvgcwxunVcctDLNEQ13oatxcDSofKzkZLA5qikNjbwvbZjnvyV50W79 X-Received: by 2002:a05:6402:55:: with SMTP id f21mr8378076edu.38.1611164285145; Wed, 20 Jan 2021 09:38:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611164285; cv=none; d=google.com; s=arc-20160816; b=nQYC5c0ruKYBpYC2UiodQutIeIm42WKa0dPdv2Zz7pr25HmKZSiXI6J655N4VvcIkx JxcciOjNBwG9Tx2KgZDlZb0HwXF2tejslHX9idqaNLzcWIjfzgGeNOI40x3LcHrLYDtN naLpdmB05dZSCIAx22FjQyo3WI767eCBHNe3gz6ynY6Dw9OW3BhTIdNHE8xsgd4lyofA DJKCaWsUGLilmkKamvW9VpyhAsDkcQ2GhpIdK/D6ezUVUkCGXP2M+t6Cu4CgP7NJi+g5 IfjGjd9XY/zPXIwSFQAw5m2vyFtwkT6UqWHUFS/ZzwvJhHk5WK3RVFqaYNEW/RZlEiFO LaAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=lb9jY89AwQ+br3/5u9vvdPu5/r+PSf2m9Xp09J4R438=; b=ZSPrGOXBkRH/Au+zhB2QJU5vaBEvRL+jECSmIfIFq76MD2i9SMrepur9nz4TqDHvLj VpU8aQnq7cDcb923hv9lDDSip3YZ8ZOiXH5fnUne1iAwbPZNuA9aXDUhtiexxdUxiOUs QC2mR9mZcaRNtdxB5VjiMdtJ68a/QGk3hmlKk3zYdjAvFcWIkCWyagp7y9b/efXlqj4j gMNr42qQxA59z9WjkYXMwKBspedATiWf9MmLOcVnDd2psbQCm8zZSacM+DCSNAx8bl+G Vh4PnHapAPOgI5r9XxgTC6Kj6SxLPKVwyvtEvm8NLiYEJ2IE3MB5WecCNliSDdqH6jIm 1lqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-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 gf11si883281ejb.179.2021.01.20.09.37.40; Wed, 20 Jan 2021 09:38:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727517AbhATReg (ORCPT + 99 others); Wed, 20 Jan 2021 12:34:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:36582 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727758AbhATR2B (ORCPT ); Wed, 20 Jan 2021 12:28:01 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 031EDAC9B; Wed, 20 Jan 2021 17:27:06 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id AE9351E0802; Wed, 20 Jan 2021 18:27:05 +0100 (CET) Date: Wed, 20 Jan 2021 18:27:05 +0100 From: Jan Kara To: Christoph Hellwig Cc: Jan Kara , linux-fsdevel@vger.kernel.org, Matthew Wilcox , linux-ext4@vger.kernel.org Subject: Re: [PATCH 2/3] mm: Provide address_space operation for filling pages for read Message-ID: <20210120172705.GC24063@quack2.suse.cz> References: <20210120160611.26853-1-jack@suse.cz> <20210120160611.26853-3-jack@suse.cz> <20210120162001.GB3790454@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210120162001.GB3790454@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed 20-01-21 16:20:01, Christoph Hellwig wrote: > On Wed, Jan 20, 2021 at 05:06:10PM +0100, Jan Kara wrote: > > Provide an address_space operation for filling pages needed for read > > into page cache. Filesystems can use this operation to seriealize > > page cache filling with e.g. hole punching properly. > > Besides the impending rewrite of the area - having another indirection > here is just horrible for performance. If we want locking in this area > it should be in core code and common for multiple file systems. This would mean pulling i_mmap_sem out from ext4/XFS/F2FS private inode into the VFS inode. Which is fine by me but it would grow struct inode for proc / tmpfs / btrfs (although for btrfs I'm not convinced it isn't actually prone to the race and doesn't need similar protection as xfs / ext4) so some people may object. Honza -- Jan Kara SUSE Labs, CR