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=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 52851C43141 for ; Tue, 19 Nov 2019 16:48:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 218F9218BA for ; Tue, 19 Nov 2019 16:48:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="BErkTr/m" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728344AbfKSQsw (ORCPT ); Tue, 19 Nov 2019 11:48:52 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:43480 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728287AbfKSQsv (ORCPT ); Tue, 19 Nov 2019 11:48:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=o6Xorr1YcsQsK3Quwrv71zh+7TkFJFwPNfufKpOpWww=; b=BErkTr/m8+nOTc6ZYIhuAYK4v vvcZGb9/osrqj2yO8ze66UdF/0KDwcPjM3K4qRLjLOi/Ph5ce0GbBP2ZONQs23VEWZAvOIKujPmkK Hr/ypgbW6J8ExdcLawErnSDO5J2UFnrRPnT0SYFNdFlyRNt7lmnK0XbJVU2/8D6m0SEQOMe4OboMa Xqzz/yuVJ2Z5mSx4gQ7dZemYdXejXREbNwHsK7JUs8DQzQ1goIL6V1g6OIIEzIlqnCZy+Ou8CCqA0 Hva5TN527WebFB6v2nrcnexMtcmVVKcbR7rMZHMNVqBbLUoXwBZjL24Ai5PLFaWRz3x85jC+gEhpj 7cWM4l7Dw==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iX6gH-0006IA-QP; Tue, 19 Nov 2019 16:48:45 +0000 Date: Tue, 19 Nov 2019 08:48:45 -0800 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Jan Kara , linux-fsdevel@vger.kernel.org, Christoph Hellwig , Al Viro , Matthew Bobrowski , linux-ext4@vger.kernel.org, Ted Tso Subject: Re: Splice & iomap dio problems Message-ID: <20191119164845.GA22763@infradead.org> References: <20191113180032.GB12013@quack2.suse.cz> <20191113184403.GM6235@magnolia> <20191119163214.GC2440@quack2.suse.cz> <20191119163454.GS6235@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191119163454.GS6235@magnolia> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Nov 19, 2019 at 08:34:54AM -0800, Darrick J. Wong wrote: > > The slight concern I have with this is that that would change e.g. the > > behavior of IOMAP_REPORT. We could specialcase IOMAP_REPORT but then it > > gets kind of ugly. And it seems kind of fuzzy when do we truncate the > > extent with i_size and when not... Generally i_size is kind of a side-band > > thing for block mapping operations so if we could leave it out of > > ->iomap_begin I'd find that nicer. > > Yes. I'd prefer if the caller deals with any i_size limiting and not the iomap methods themselves. For now I'm tempted to just go with the iov_iter_revert scheme. Note that I particularly like it, but it matches the most common direct I/O implementation at least.