Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp302368imn; Mon, 25 Jul 2022 17:10:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tTBnLAxK0uHgI45+yD4tpigq5rb1+MYO62Yw2DGSI5cGxpkh45uzyh5w2gKhbetZDy8i27 X-Received: by 2002:aa7:c599:0:b0:43b:b7c8:36ff with SMTP id g25-20020aa7c599000000b0043bb7c836ffmr15764571edq.110.1658794254161; Mon, 25 Jul 2022 17:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658794254; cv=none; d=google.com; s=arc-20160816; b=uWS+7RnD46gxJxQRVc8jbgjLQzhOwYCtyzWCx8TxbfUCN7HdbNQVuErb+23jmPpmEb FUwJSSvJa38UKnl4MwEG10l8SPhnalEjrxB5K0i0xhiRuE3mNoj7HVpj42KmffkClMCF lutO9Ky+Dl06Zy2lfJycecrsY7o4KaNOdqWtZSnKWgPGAUQLcRL9M6d+Edrf+Ry7km5K erYAUipXHcX2ms/LL0PuNdx9Ivv5wlJvKP1BYg3sKLcRcmNt9lNnYlxJEFO60Gl+WoOF fdWHaPzAVegfoPd9MaOD2kWe+X5vdljPl5eMXKaiTBCT9ddSzulMzXHqDlgXaZEThdxc endg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:to:cc:in-reply-to:date:subject :mime-version:message-id:from:dkim-signature; bh=Ojaa/UU8B50WRImEMgYvPwV6uUe5mTD3KQg4CpEBv6U=; b=rkPuiOoTTwqkZstcJTVoYSNeoyE23t5whv/h7fAj3BLyEaMJoB96nyYekeuPM/u1N2 wT9864u7ea5PpAnFudmTkUjqKBxaK9ZZ9XD80Jwrl1WeL/+ohNr2o7XqwCpLMWumjYtW cCTxRIw57dba2Mq4wuQjERXgRwM9oVWzKypYfzPiDOjZWiGlPBog/goxU5KckPq9oclu Jk2GyvS161X1uBtWrPd2JVqyOiy2kglJdCyr7B12K+ZPl/nGsFwOKHFaqKeAotqbeXY5 I6W4AemVRi4IFEGhOR3bjERcbgLZRPBWkSOXSkjvXzAQ+mXn3HHExC2sM/fBRO1UFt5N 3qWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dilger-ca.20210112.gappssmtp.com header.s=20210112 header.b="PkQ/Af+T"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a1709065f9500b00722e6c16c85si773672eju.969.2022.07.25.17.10.22; Mon, 25 Jul 2022 17:10:54 -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=@dilger-ca.20210112.gappssmtp.com header.s=20210112 header.b="PkQ/Af+T"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235544AbiGYX6k (ORCPT + 99 others); Mon, 25 Jul 2022 19:58:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231325AbiGYX6j (ORCPT ); Mon, 25 Jul 2022 19:58:39 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C490B27FC7 for ; Mon, 25 Jul 2022 16:58:36 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id 12so11509886pga.1 for ; Mon, 25 Jul 2022 16:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dilger-ca.20210112.gappssmtp.com; s=20210112; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Ojaa/UU8B50WRImEMgYvPwV6uUe5mTD3KQg4CpEBv6U=; b=PkQ/Af+T+bA+/HBQemEG7rZ7dPDvjPWBs3HhdBpZabOE+c1rBlVlPIz1r+rHpdv09X hB/EyFoWNzuccoVADcy4Vdl0PLaNW6AiPxDyeJbUvnDe/d0KvCIQjhAOcQQ6b24XQJYg 8/PAIEY6L4XYgwJFXkpYL6jJ6xqV0QHoFCBKZuCOOlwPSQ9LL/4PuyVrqBEmhxUVKhgq +5HJCiX+CYP8vccNJNvOCHb5WsnAQn5aouKG55wjmwwCi36yEZd/bT00fkiGHByJF0de LcwGyirkTcqrv4ntzC3qtmLHmekGwpixqOSlqyQo5wyaYQWrvN7MIDDe1tW66CN4d0X1 CgSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=Ojaa/UU8B50WRImEMgYvPwV6uUe5mTD3KQg4CpEBv6U=; b=1bWpcoZYcDbMUORU0L528wIEVwQQK38fNjSMG8QSnk25R8K4SV+9kAImirDsAXUiLB Dh8X2iC4gxTNi3KwyFlCWsqcosSZOJfPGAwsRmt7VOEw9pRDClKqy7QWBKkYY4BouT/v /XTQ6G4WZuPc92HTo+sv7coXnWlJXAmvQ/rf6SCpw8tdW3enWe8pW+msoo/fVhLmI1Ym QnMhxXdB/Lt64eudndwQO+zlMpyHla7tJsH1qWqhHUhDX+saWAiF7UpOQ6FZODusITx5 ZheM86q6hZu1gZzXq2PFdkW/SBGQodsclyaOD86jvISmF7jnIAv+8RsN9vUvIQIr8lat 4l/g== X-Gm-Message-State: AJIora/YWNfqY/OCv+AP+ktM/NhYl1jctzV7fZApA3Nhi9zFDtrM2wg2 xt/Tbv52ZOJV9Eg/G6qlen9Hdg== X-Received: by 2002:a65:57c2:0:b0:41a:ff04:694c with SMTP id q2-20020a6557c2000000b0041aff04694cmr5997273pgr.573.1658793516160; Mon, 25 Jul 2022 16:58:36 -0700 (PDT) Received: from cabot.adilger.int (S01061cabc081bf83.cg.shawcable.net. [70.77.221.9]) by smtp.gmail.com with ESMTPSA id p2-20020a170902780200b00168dadc7354sm9859676pll.78.2022.07.25.16.58.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jul 2022 16:58:35 -0700 (PDT) From: Andreas Dilger Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_DB83B9B8-69A7-4FD9-B14D-F8B77FC7C0F2"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH v4 6/9] f2fs: don't allow DIO reads but not DIO writes Date: Mon, 25 Jul 2022 17:58:31 -0600 In-Reply-To: Cc: Jaegeuk Kim , 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 To: Eric Biggers References: <20220722071228.146690-1-ebiggers@kernel.org> <20220722071228.146690-7-ebiggers@kernel.org> X-Mailer: Apple Mail (2.3273) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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-ext4@vger.kernel.org --Apple-Mail=_DB83B9B8-69A7-4FD9-B14D-F8B77FC7C0F2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jul 25, 2022, at 12:12 PM, Eric Biggers wrote: >=20 > On Sat, Jul 23, 2022 at 07:01:59PM -0700, Jaegeuk Kim wrote: >> On 07/22, Eric Biggers wrote: >>> From: Eric Biggers >>>=20 >>> Currently, if an f2fs filesystem is mounted with the mode=3Dlfs 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. >>=20 >> 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? >>=20 >=20 > 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? I don't think this is f2fs related, but some backup applications I'm = aware of are using DIO reads to avoid polluting the page cache when reading = large numbers of files. They don't care about DIO writes, since that is = usually slower than async writes due to the sync before returning from the = syscall. Also, IMHO it doesn't make sense to remove useful functionality because = the new STATX_DIOALIGN fields don't handle this. At worst the application = will still get an error when trying a DIO write, but in most cases they will not use the brand new STATX call in the first place, and if this is = documented then any application that starts to use it should be able to handle it. Cheers, Andreas --Apple-Mail=_DB83B9B8-69A7-4FD9-B14D-F8B77FC7C0F2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIzBAEBCAAdFiEEDb73u6ZejP5ZMprvcqXauRfMH+AFAmLfLigACgkQcqXauRfM H+DIjBAAuhcCUrRZxLbIIbGQiYg9WA8Kq1A3wSBPDzMet5t78gjiKUo6y+RE2w0X O2Be8DY9X8x4OIpbD4jiFAe7TiVDAHAYjjrzKFMykU63wB4nJELcIZrqELT/O1qg 9Zi1+hqoXK+WcCcC8IEh52+ypABRczFIb9OF6RPR450wAxc+0x7lXfyZ/TzBcRyl +NeWbyLAQfW+VRViN/re9tlticLobDklbfgNC0rNuhp1CawlnMVsqWSxx/F9WT3s RjdsJ8hzDqLEpPv6Sgd30T9U4UaoLEpRe36CMuT4/SYx6h6SR2Kv61+Z3IihAp41 utLypsHnpswfLjF3KmxusOMLZGmCG1EFazn/gMi6WuccfBaI+m7OXeUvvlLGnzn4 9RJWpVHy3TVTWdikFE/LVP9L7D8rj2jos9UVpFE8QUO2Gu1NNf6C5lIg3iXlvcvn uxuqCpYcPCCwYosLSNcpi9tNW/p3aS0WNNfGlqWfB8Au4S/91sMJsGKkON+jwsMs cMiUECc+eFc7HuCrP80IW+N8asiaGrTWGrrg+EpxFtl12OzKyn4OnoY5NxWuLXLF 3lSS1IZWudfgO1TD/5sUmvsHtUS4Rd3akslKsAQyavGxszDWvxIGvU0kABSb8k1P q3CXMHx8oG9FooyoP3FnfUzDrZXf40Sk28cCsqOa09926JUbhqY= =zitC -----END PGP SIGNATURE----- --Apple-Mail=_DB83B9B8-69A7-4FD9-B14D-F8B77FC7C0F2--