Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp406482ybg; Sun, 26 Jul 2020 08:20:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/f12+1c1iTqWYGnZBnxidosZ9mvfC8Y4zIQwIg4kow9QbnOfNngIMaPPXkk6Ox4SImIfq X-Received: by 2002:a05:6402:22d5:: with SMTP id dm21mr17465555edb.26.1595776829338; Sun, 26 Jul 2020 08:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595776829; cv=none; d=google.com; s=arc-20160816; b=rBQE/77rbjAbKGY9TJctmML2ii1T3NIYDbmVzCCnzPbxwjccv8Xos3KcMJCSUUW3OF pvyD7n8tdGIYj1vsQFk0CNE2DiGqHiBdL7fyssMstKVosc69D6dHl8dy125AgT2j/RZP SpjhrXBYkV9LAHqf/c1zlu0PSRl7TpF1/k+Y2IT8ybq0nqNiF0GmH0Y/1z3x0qO5+pII k9ZI21Yq8Lmf/obcWRKiZbqql7OrtyrDTxRVD0liHSWJKunTy+5Gcsp6RSkzcP5qkN/w RRS3G5k+EZrD1Bd8YlGbHJNh5W4GKRE8mWvrq7Z327uCsfGcmNIUcWioxxmv7CywBgpU YNig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=vtsWR5kposDocS52/2wJ1kZ1A8spMlKJv7t/OGXW3Go=; b=QmOih7unOJsM4ga2MmZqCgaqVNGPbTynrI62xK0AaPFRDLFgGgtIX9FAESg4h7eG+J kHjv+FplDLXu0zI+hgMJvnN9f+wpoyTn/qvDChxo4p5JCGtO36V0dudaiDxUooP4iO7D q8LujoGu0HloA34sYuwy8hKaGVknM6HC1p52mqT0RVkerQctmlgdVS9hTTdYQFI9Phzb dJOwPmmzrSWepxZ/SidBssvLJRJbmLgW4EJ5C7W/g+2ZRHAvXEjuITph+/2KBuG37cLY AVse/od7ZyR01K7NnT0qbGuLjpKnSkzJbQBmlsV4ZMpAYa7DyH73hOxSdB8xP8D/6Qzy 6/2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=MIwLu2JN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 r15si4021745eja.493.2020.07.26.08.20.06; Sun, 26 Jul 2020 08:20:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=MIwLu2JN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726891AbgGZPTY (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.