From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2403C43381 for ; Tue, 16 Feb 2021 10:27:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 861FC64DA8 for ; Tue, 16 Feb 2021 10:27:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbhBPK1C (ORCPT ); Tue, 16 Feb 2021 05:27:02 -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: ceph-devel@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?