Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp371255rwl; Thu, 23 Mar 2023 17:53:21 -0700 (PDT) X-Google-Smtp-Source: AKy350bd5HdFwsEUNHjlOOFXMFIhXavOKkffoLToAQVfBtKcgB0ZzdD0auVyK4v+KiqN5Zgf7+CH X-Received: by 2002:a17:907:1c2a:b0:886:7e24:82eb with SMTP id nc42-20020a1709071c2a00b008867e2482ebmr894056ejc.21.1679619200938; Thu, 23 Mar 2023 17:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679619200; cv=none; d=google.com; s=arc-20160816; b=TsvVV5lSMpr1sY+q2FT3AcVRTbm3Gq2MwIDvfenuHuFStSXohmc/RKHi3AoKGktVnY fENu3h+O3EHD/Cso3G2L6vt8Xu8DBtKpQ3ivN6NHEhLFzwi6rjUxpswrIWYtP+q9Zs8i FQAeHIbkwcj23fzSlul3qh3xHkZcHg6bTvUFLdsIjdVW8DbP24litScjnuF5n7u1+gUY 1f3U/nPr8BUYLg4xqAebFJ8FMl/5HN/1rGRT5Mriqj0iXPeHLyZWYRDdjWI8ogGQqe0J 4a2xconvvIWVZb2yCRlEhEI4WIlXiKFLLByDhuvlWE4U0zJK9HZExe49lwqUO64VPQPg vPBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vZTxBa0kT5vPLldd0MPPyKOJ+tSnZyEE9vXgyM1U3Ng=; b=0uCicKpCbFEgefK611Y8Gnuj2xqrZP7Pd4L0jgLMdSRXhuYtBSyfeIoYbk/bWiakT5 gSTy2dtrDuJa7mPN/NoyAeYm8L/B2G1nlhO1rD+Fcg6ORn63lwvjNeiEhx3Q5bmYyj7m tP/7IOe0GVgooqEZrzIBJackxAhzoqznoulKx8XbojwOTag1M57AAq8e343V1alZKUB0 6PI4TfVydVJd7hj+iuXZ2w7JbfQ1dfOYqNlOMGwY4ZHSspAhmhTbBH9MZDBVOGQPDS7Y /7GsAUeqRhQoFmQKpHcJ8K7ALeTsRz9OVfOgNfaj08kztnENNlWjSI3aZ6OnmV5caaAf BWRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AFSW9108; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hv6-20020a17090760c600b009325610fddcsi17883746ejc.501.2023.03.23.17.52.56; Thu, 23 Mar 2023 17:53:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AFSW9108; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229834AbjCXAqp (ORCPT + 99 others); Thu, 23 Mar 2023 20:46:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjCXAqn (ORCPT ); Thu, 23 Mar 2023 20:46:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CBA1193E4 for ; Thu, 23 Mar 2023 17:46:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D3F0EB82279 for ; Fri, 24 Mar 2023 00:46:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40100C433EF; Fri, 24 Mar 2023 00:46:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679618799; bh=o+500o1W/tmKTD52ErdN6cCtWOuSwEJCYhyr4GzTzrk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AFSW9108Gr1OWZPUXrn2wD9LQpzPpmz9gSHNU6I66cwJr88MRANJE6syVlImnX7d6 VrEJvSp3cnivvWHlDfm7455R31V6xaHpNIY47XArDhjeBc1u4HrIVBYgtJd3EZf3rT NdPv1H9W7y+jD89e4rsETC5uQDXI29/517EQYaFE1gvqF0sd4QpLSXwMyjw03QEzFG 8CQ8WAOfnNJc3Ngz8cBhgjwC0isOHrbTB1FfjdqNisY6FRcHPMbybQOVcAjhDutVXI 9O62i9dVPaLawnGzU2bcAhrZqRuOUBA9QsXCx/RXWawAPvm7ARoa7MUrDPWk8kq9UB ewH9SYQWKzDQg== Date: Thu, 23 Mar 2023 17:46:37 -0700 From: Jaegeuk Kim To: Damien Le Moal Cc: "chao@kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , "hans@owltronix.com" , "hch@infradead.org" , Aravind Ramesh , Hans Holmberg , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH] f2fs: preserve direct write semantics when buffering is forced Message-ID: References: <20230220122004.26555-1-hans.holmberg@wdc.com> <402cc90ce5defa81c937c3fcd09de1f6497459ee.camel@wdc.com> <8207efb81cd1e9322ad608d313eb4b4bd5740e80.camel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8207efb81cd1e9322ad608d313eb4b4bd5740e80.camel@wdc.com> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/24, Damien Le Moal wrote: > On Thu, 2023-03-23 at 16:46 -0700, Jaegeuk Kim wrote: > > On 03/23, Damien Le Moal wrote: > > > On Thu, 2023-03-23 at 15:14 -0700, Jaegeuk Kim wrote: > > > > On 03/20, Christoph Hellwig wrote: > > > > > On Mon, Feb 20, 2023 at 01:20:04PM +0100, Hans Holmberg wrote: > > > > > > A) Supporting proper direct writes for zoned block devices > > > > > > would > > > > > > be the best, but it is currently not supported (probably for > > > > > > a good but non-obvious reason). Would it be feasible to > > > > > > implement proper direct IO? > > > > > > > > > > I don't think why not.? In many ways direct writes to zoned > > > > > devices > > > > > should be easier than non-direct writes. > > > > > > > > > > Any comments from the maintainers why the direct I/O writes to > > > > > zoned > > > > > devices are disabled?? I could not find anything helpful in the > > > > > comments > > > > > or commit logs. > > > > > > > > The direct IO wants to overwrite the data on the same block > > > > address, > > > > while > > > > zoned device does not support it? > > > > > > Surely that is not the case with LFS mode, doesn't it ? Otherwise, > > > even > > > buffered overwrites would have an issue. > > > > Zoned device only supports LFS mode. > > Yes, and that was exactly my point: with LFS mode, O_DIRECT write > should never overwrite anything. So I do not see why direct writes > should be handled as buffered writes with zoned devices. Am I missing > something here ? That's an easiest way to serialize block allocation and submit_bio when users are calling buffered writes and direct writes in parallel. :) I just felt that if we can manage both of them in direct write path along with buffered write path, we may be able to avoid memcpy. > > > >