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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 F2D47C433E5 for ; Sun, 26 Jul 2020 15:19:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5A492065F for ; Sun, 26 Jul 2020 15:19:27 +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="MIwLu2JN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbgGZPTY (ORCPT ); Sun, 26 Jul 2020 11:19:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbgGZPTY (ORCPT ); Sun, 26 Jul 2020 11:19:24 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15CCAC0619D2; Sun, 26 Jul 2020 08:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=vtsWR5kposDocS52/2wJ1kZ1A8spMlKJv7t/OGXW3Go=; b=MIwLu2JNLgd0x7UfNhObEmRZ+u /TUB3piRcXJ82wmv24hFkogBQ3auECc5jT30ANIAuOBbIYdDbMBzFVLBFgsvLPaL+Ry9RfDd+jJcC dB/8NY/ZtGeLwgUKwrAMENXUoC8g/xj7G4nR80YQDuARiWzkPNeWfc45hQJYXXrdU1V5h1MqUSIJo 0A4juTCBGqVeT5I+RRbDX73tq4mGCDFPMnra1RHe4uPsuL4nRk1YtQ9LzzbYU3bBo9+/9PPvVL1qn BZFG8ay+s9r8kHVSaZ8AzHuqTkYIjq05Bul9uZjeF8uzfwsDlEWL8HVjILGKBeiNtCh/UQqN7LFBZ goHTtJZA==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jziQm-0006ih-Qi; Sun, 26 Jul 2020 15:19:16 +0000 Date: Sun, 26 Jul 2020 16:19:16 +0100 From: Christoph Hellwig To: Kanchan Joshi Cc: axboe@kernel.dk, viro@zeniv.linux.org.uk, bcrl@kvack.org, willy@infradead.org, hch@infradead.org, Damien.LeMoal@wdc.com, asml.silence@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-aio@kvack.org, io-uring@vger.kernel.org, linux-block@vger.kernel.org, linux-api@vger.kernel.org, Selvakumar S , Nitesh Shetty , Arnav Dawn , Javier Gonzalez Subject: Re: [PATCH v4 4/6] block: add zone append handling for direct I/O path Message-ID: <20200726151916.GC25328@infradead.org> References: <1595605762-17010-1-git-send-email-joshi.k@samsung.com> <1595605762-17010-5-git-send-email-joshi.k@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1595605762-17010-5-git-send-email-joshi.k@samsung.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: io-uring-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Fri, Jul 24, 2020 at 09:19:20PM +0530, Kanchan Joshi wrote: > For zoned block device, opt in for zone-append by setting > FMODE_ZONE_APPEND during open. Make direct IO submission path use > IOCB_ZONE_APPEND to send bio with append op. Make direct IO completion > return written-offset, in bytes, to upper layer via ret2 of > kiocb->ki_complete interface. > Write with the flag IOCB_ZONE_APPEND are ensured not be be short. > Prevent short write and instead return failure if appending write spans > beyond end of device. > Return failure if write is larger than max_append_limit and therefore > requires formation of multiple bios. We should support reporting the append offset for all block devices and all file systems support by iomap at least. There is nothing that requires actual zone append support here.