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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D43BCCA48A for ; Mon, 25 Jul 2022 18:12:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234995AbiGYSMb (ORCPT ); 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: Precedence: bulk List-ID: X-Mailing-List: linux-api@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