Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp111804imn; Mon, 25 Jul 2022 11:16:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v3JlMZS9lHZxHKoTRYGxoliZJSF440YWw5YWkwWDT382h2AUOIMqI06TgzxAwZFSPk9nGG X-Received: by 2002:a05:6402:1767:b0:43b:a844:14f with SMTP id da7-20020a056402176700b0043ba844014fmr14966767edb.131.1658772996275; Mon, 25 Jul 2022 11:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658772996; cv=none; d=google.com; s=arc-20160816; b=ikQWJFC3c2STmYiMetFLp9FeM4BOOj5JHiAShBspcBIkUJAMnZiBlygaIJfS8tLc/E LH/jh/sysVKmuDD7uaQjEVg8Qu9HYXYbFx9WvzO1v0tcgWLJyKotUC8F7W88ROGIt18t mxFbpnHXJSyl0DmStXROoCBgjXi8H0o2Tk86+iFZjUfNpgYcVOjuGcG2o2qRs852QR76 0Hhl6/nRwxyCGFhLJNfBfp9EAesfsqarCcUidCR0ubegFcMAQJNDqKNYp9iMLNdcMEl0 tUCcHKn3+MWI7zxF0LD5NMexhdOVswIWeo5EcdrD0W8PydMjq13SQKaNEH+qjrsIbjdb yZPQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uJRtfrElba5CLxcxh8D4VlMCc+DhA3Y0CvzSiB09Tcw=; b=j8Wt1v+pjqC1b3lc/+oReD9Yo2T7WXaqVeCV9KTLKsU7zRuMIMYNFlWdxWBfDt8iiz SSLWQH0Hl1rOcCx3Mm7K/jnYGT8O4derRZwQU8yx11D0kebyfZlnQAdzspgY5Dw2yAbT xxZun7w7TiDBYHnVy85KllkgDWmgPHD5ZKwahdz8knQRUsHq+iIY3h90VcScwoikbZW7 iw3O3HkkZWyflCS8Qb9OhmO1olEZOoachkEmtiRI7/rX7jRFfU6LGQPXUrGrEkkW/lv6 /OVuFGx91qRcFOsIU+OyHxRNvvDR4xUw1VUla+/qyU+Qp+MA7XvbS1/ZYva1mG4J9X+y m+vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XWhXckPe; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 t34-20020a056402242200b0043be28d93adsi6237725eda.261.2022.07.25.11.16.05; Mon, 25 Jul 2022 11:16:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=XWhXckPe; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-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 S235188AbiGYSMb (ORCPT + 99 others); Mon, 25 Jul 2022 14:12:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbiGYSMa (ORCPT ); Mon, 25 Jul 2022 14:12:30 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1154BF77; Mon, 25 Jul 2022 11:12:29 -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 9DE0FB80E4E; Mon, 25 Jul 2022 18:12:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7248C341C6; Mon, 25 Jul 2022 18:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658772747; bh=qdWMQQKR8B6EADa6U6NBfxlIzi/aeUuQEIWc4wTtIJ4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XWhXckPekmLTNg1ZhroIC3wMS4JVLPCYsXHe5Fd86LEkStVLlwKwuRERjnfWICZBs KwdMl4Ubwhhxz/SNyupEpf5ZQdsMAQipiMg8H4g3GRNnXlc6S8etHe+wcJ0+4ymVG7 ro6EoyxIDImJMuJQ98IuU3u3IslYx4Q3X1JEQSRvvWlmdxM/olx+9jEVK83Sgxk3S9 yrYLuIoHLs+3h9t2gNY/JPYpZ5OmfpnUkgYBFfvl+qFCxil+mzDEHaZVnrgR1UGvMP HB/lbSEc1W8W/iVFQNNW3Ql/QUIkQRPG2kXFJXQBnfnZD5V0YIrLvKPLE06jEgA/hW D6q+HLHyj18Tg== Date: Mon, 25 Jul 2022 11:12:25 -0700 From: Eric Biggers To: Jaegeuk Kim Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, linux-api@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Keith Busch Subject: Re: [PATCH v4 6/9] f2fs: don't allow DIO reads but not DIO writes Message-ID: References: <20220722071228.146690-1-ebiggers@kernel.org> <20220722071228.146690-7-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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-ext4@vger.kernel.org On Sat, Jul 23, 2022 at 07:01:59PM -0700, Jaegeuk Kim wrote: > On 07/22, Eric Biggers wrote: > > From: Eric Biggers > > > > Currently, if an f2fs filesystem is mounted with the mode=lfs and > > io_bits mount options, DIO reads are allowed but DIO writes are not. > > Allowing DIO reads but not DIO writes is an unusual restriction, which > > is likely to be surprising to applications, namely any application that > > both reads and writes from a file (using O_DIRECT). This behavior is > > also incompatible with the proposed STATX_DIOALIGN extension to statx. > > Given this, let's drop the support for DIO reads in this configuration. > > IIRC, we allowed DIO reads since applications complained a lower performance. > So, I'm afraid this change will make another confusion to users. Could > you please apply the new bahavior only for STATX_DIOALIGN? > Well, the issue is that the proposed STATX_DIOALIGN fields cannot represent this weird case where DIO reads are allowed but not DIO writes. So the question is whether this case actually matters, in which case we should make STATX_DIOALIGN distinguish between DIO reads and DIO writes, or whether it's some odd edge case that doesn't really matter, in which case we could just fix it or make STATX_DIOALIGN report that DIO is unsupported. I was hoping that you had some insight here. What sort of applications want DIO reads but not DIO writes? Is this common at all? - Eric