Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp746040rwd; Mon, 12 Jun 2023 22:57:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6EpnrbdSsU559Q7xEZn8cELxXbNTKHNNZuP+7SX4+Kz3q4RXR7V7cKEytJ+MiztOD9CFS0 X-Received: by 2002:a17:907:2688:b0:967:a127:7e79 with SMTP id bn8-20020a170907268800b00967a1277e79mr11111480ejc.28.1686635828375; Mon, 12 Jun 2023 22:57:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686635828; cv=none; d=google.com; s=arc-20160816; b=V/owUGXKYnrn8IA3+oRaeEI3W/O97yL+Jdw7Fah3i4URkZBJzvadcGGKUMqF4BW9Ox KS9XXuCuv0msiJAY8lh6KVtSIc2bKLoQdsL25CL9TpV8gWd7P/CgBvNL5n7CgxCERyo4 LIou0MX6uYd1gWotj4dJV1kjyegl+dV6YsZnA0B4LCBAxDwDjQpfSj8R6d+UnLBybQ8Y z4XJKg9BK8WluhSY6QJR7F7muFNEsHsOZ5alH+Ur1crSQv5kQCpmYkM+QgaLDZ1Oyj49 pBybh7KF5j9JNL0s9feyhrFY4GN6T0NyCaNbbI1IA77UKBiXqH5otvodUGiEhPsvJNwQ tMcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=s1qook6q8wbrpgk/eXnBGGKapAlVUV9UOHtWaO8AwGU=; b=Z8buv1e4S0h7NQ6LOg5KV89ys+H6/xfEtVbp3EYYKr9a64jpsqfGiE798sEv+GRoiM 5Ne0uSUJ5BEEoIu0pWt59Sjk1EibzFhwSjanYR8pv9hcl/ZDuQXveqVKfX6Rca5bVjRE QjPdPzkdW7l+YoTxdSM6egz3ly/wKiB0FcvgWWxar2zJleUys+ZU2BS3qwRIFMr99QHL WNzWOYr5zcSj0GdrNcWcC9oQrOnKlaiyYfQ/YnyQa4OzJUVEZuwWWlKykjJ41m7Au//z nL6VF3fpQGHvZ/ZLScqYHJs5ktf5g1wIoT8IAd3FtfiolnDCDbLeQd6m1IJDvg0Jg20D Srxw== ARC-Authentication-Results: i=1; mx.google.com; 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 t11-20020a170906a10b00b00977eb940999si6315129ejy.72.2023.06.12.22.56.40; Mon, 12 Jun 2023 22:57:08 -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; 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 S232063AbjFMFrG (ORCPT + 99 others); Tue, 13 Jun 2023 01:47:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239066AbjFMFrG (ORCPT ); Tue, 13 Jun 2023 01:47:06 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBA719C for ; Mon, 12 Jun 2023 22:47:03 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 854E168BEB; Tue, 13 Jun 2023 07:47:00 +0200 (CEST) Date: Tue, 13 Jun 2023 07:47:00 +0200 From: Christoph Hellwig To: Ritesh Harjani Cc: Christoph Hellwig , tytso@mit.edu, linux-ext4@vger.kernel.org Subject: Re: [PATCH] ext4: set FMODE_CAN_ODIRECT instead of a dummy direct_IO method Message-ID: <20230613054700.GA14648@lst.de> References: <20230612053731.585947-1-hch@lst.de> <87wn0853pw.fsf@doe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wn0853pw.fsf@doe.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Tue, Jun 13, 2023 at 11:00:19AM +0530, Ritesh Harjani wrote: > why do we require .direct_IO function op for any of the dax_aops? > IIUC, any inode if it supports DAX i.e. IS_DAX(inode), then it takes the > separate path in file read/write iter path. > > so it should never do ->direct_IO on an inode which supports DAX right? do_dentry_open rejects opens with O_DIRECT if FMODE_CAN_ODIRECT is not set. So we either needs to set that manually or because there is a ->direct_IO if we want to keep supporting O_DIRECT opens for DAX files, which we've traditionally supported.