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 18B9FC04A6A for ; Wed, 9 Aug 2023 13:41:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229890AbjHINlp (ORCPT ); Wed, 9 Aug 2023 09:41:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjHINln (ORCPT ); Wed, 9 Aug 2023 09:41:43 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9A5C1986 for ; Wed, 9 Aug 2023 06:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=3TRNqmcaEGWcqiDRqyA2b3ib5K8DQ6i1timI+5pEw34=; b=Bd2Opyajb45fFr2wKhQzsXDLu7 mnzwHp0JaARZ+eAmLjiv8nlwo14v4YA6lEdxQBGD6aBAjB0kflFxrzMBWTd4PGLn+1uxy4ncjbRH9 7hnljHdlosVjZWagAs1di2LuKBAe1c/LQD8CSI8SC0KiQ2MWBtY/CKJDsdx59LO7LmqRB3ufMiUH+ H4OtiIQUmeGBGr5lpdxbDs3+ynDbwCZb3eiaRW9pnIvDRXOWAlbEkbDp7+AwndTXtNkf38uVRifI3 WgtTOoS3ymngTQNcQHJz7da0B4s5U+/IeRhb/pgUxKzYzcEJNj0djhFfl1Uysu1jL4qABLDjFkwIi qUJMRQhA==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qTjR7-0053pV-30; Wed, 09 Aug 2023 13:41:17 +0000 Date: Wed, 9 Aug 2023 06:41:17 -0700 From: Christoph Hellwig To: Hugh Dickins Cc: Christian Brauner , Andrew Morton , Oleksandr Tymoshenko , Carlos Maiolino , Jeff Layton , Chuck Lever , Jan Kara , Miklos Szeredi , Daniel Xu , Chris Down , Tejun Heo , Greg Kroah-Hartman , Matthew Wilcox , Christoph Hellwig , Pete Zaitcev , Helge Deller , Topi Miettinen , Yu Kuai , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH vfs.tmpfs 4/5] tmpfs: trivial support for direct IO Message-ID: References: <7c12819-9b94-d56-ff88-35623aa34180@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c12819-9b94-d56-ff88-35623aa34180@google.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Please do not add a new ->direct_IO method. I'm currently working hard on removing it, just set FMODE_CAN_ODIRECT and handle the fallback in your read_iter/write_iter methods. But if we just start claiming direct I/O support for file systems that don't actually support it, I'm starting to seriously wonder why we bother with the flag at all and don't just allow O_DIRECT opens to always succeed..