Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5591017pxb; Tue, 16 Feb 2021 02:27:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmDyB/qDBd4pKOGsqFv4gHi8t952pZRocYLbc3IwpClquN1J4c+lJ262LbwZcqgNnBq48h X-Received: by 2002:a17:906:1249:: with SMTP id u9mr20142204eja.484.1613471268180; Tue, 16 Feb 2021 02:27:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613471268; cv=none; d=google.com; s=arc-20160816; b=xjOaUpHSN7NNZJo1FgkqW/BNT5mU1cpCns38e1oA3a0gwf257Qaj2l1E+LZERXoOna H4XNZ22SUN17Z9e725WKPo5FRZmEO6WybAzUm5x0trJega5gEQUgros2tSv8+OmH8VxS caAgSgRkzeej8VuoRDgJjg4i7RNfiqypECTEWqNOPiJRBRrTr8gyeJwwY6GP55sqTA5g sawpbO3KTtYkyrpuKBVk226g8ZUiVbKAtXWYLTGAfyEN0/vm9LyXAeHgcfDYVhf/A2pI j5RwIzW/W4lwDhspdrTqJ/45Conf3+MHC1sMTay5zksoAdzM0hEjrQHdIwv8Q+zd0KLP vc1A== 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=VYfCzK77bwauv0asaQ0xbXJ69lqP3qFHbBmwaR1I7bA=; b=TfDnDHSxNr7UwlWTUArVU2QMp/rPdyNilQM6bYxeCS81jMwhq+dufP0iWZjlxYxMgP mehnceG4SmBmvOOLzc/8UJxiRoNiB8B1RCsS+aRamAS8rSlLSMp+HBEThgvFaMvrK6sB QKAgH0VlLrPJFpDYk7Pl+pqqbErhhQFxlvvOl3siG/Iriqi0+6ArPzWZRn9D6Bnx9dQs Gx9RyWR/2Y/Gel6b21+Gxv0FvBtzrg0CbpexzYQzb7dCc85ukYyHRPsJhhISz9gT9NRc ZpAIeN1VPKg4pmeiRIGK6mGhYzcJU9jaErWKB5Q0/ZAOUAp6SKrKypuvOklb07ijJQl8 1F+g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-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 j18si15119425edw.197.2021.02.16.02.27.15; Tue, 16 Feb 2021 02:27:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-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-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229811AbhBPK1B (ORCPT + 99 others); Tue, 16 Feb 2021 05:27:01 -0500 Received: from verein.lst.de ([213.95.11.211]:40732 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbhBPK07 (ORCPT ); Tue, 16 Feb 2021 05:26:59 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 9AA846736F; Tue, 16 Feb 2021 11:26:14 +0100 (CET) Date: Tue, 16 Feb 2021 11:26:14 +0100 From: Christoph Hellwig To: David Howells Cc: Trond Myklebust , Anna Schumaker , Steve French , Dominique Martinet , Alexander Viro , Christoph Hellwig , Matthew Wilcox , linux-mm@kvack.org, linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, Jeff Layton , David Wysochanski , linux-kernel@vger.kernel.org Subject: Re: [PATCH 04/33] vfs: Export rw_verify_area() for use by cachefiles Message-ID: <20210216102614.GA27555@lst.de> References: <161340385320.1303470.2392622971006879777.stgit@warthog.procyon.org.uk> <161340390150.1303470.509630287091953754.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <161340390150.1303470.509630287091953754.stgit@warthog.procyon.org.uk> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Mon, Feb 15, 2021 at 03:45:01PM +0000, David Howells wrote: > Export rw_verify_area() for so that cachefiles can use it before issuing > call_read_iter() and call_write_iter() to effect async DIO operations > against the cache. This is analogous to aio_read() and aio_write(). I don't think this is the right thing to do. Instead of calling into ->read_iter / ->write_iter directly this should be using helpers. What prevents you from using vfs_iocb_iter_read and vfs_iocb_iter_write which seem the right level of abstraction for this?