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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9179C4320E for ; Fri, 13 Aug 2021 07:14:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7DE8A60241 for ; Fri, 13 Aug 2021 07:14:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7DE8A60241 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 1E9006B006C; Fri, 13 Aug 2021 03:14:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 198AA6B0071; Fri, 13 Aug 2021 03:14:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0B1216B0072; Fri, 13 Aug 2021 03:14:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0093.hostedemail.com [216.40.44.93]) by kanga.kvack.org (Postfix) with ESMTP id E48586B006C for ; Fri, 13 Aug 2021 03:14:19 -0400 (EDT) Received: from smtpin39.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9DDBD16978 for ; Fri, 13 Aug 2021 07:14:19 +0000 (UTC) X-FDA: 78469193838.39.6BE94E9 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf14.hostedemail.com (Postfix) with ESMTP id 57C27601ABFF for ; Fri, 13 Aug 2021 07:14:19 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 5E36368B05; Fri, 13 Aug 2021 09:14:17 +0200 (CEST) Date: Fri, 13 Aug 2021 09:14:15 +0200 From: Christoph Hellwig To: David Howells Cc: willy@infradead.org, trond.myklebust@primarydata.com, darrick.wong@oracle.com, hch@lst.de, viro@zeniv.linux.org.uk, jlayton@kernel.org, sfrench@samba.org, torvalds@linux-foundation.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 5/5] mm: Remove swap BIO paths and only use DIO paths [BROKEN] Message-ID: <20210813071415.GD26339@lst.de> References: <162879971699.3306668.8977537647318498651.stgit@warthog.procyon.org.uk> <162879976139.3306668.12495248062404308890.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <162879976139.3306668.12495248062404308890.stgit@warthog.procyon.org.uk> User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspamd-Queue-Id: 57C27601ABFF Authentication-Results: imf14.hostedemail.com; dkim=none; dmarc=none; spf=none (imf14.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de X-Rspamd-Server: rspam04 X-Stat-Signature: dqkfg54jd6c3ugog6411itux441coq11 X-HE-Tag: 1628838859-804794 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Aug 12, 2021 at 09:22:41PM +0100, David Howells wrote: > [!] NOTE: This doesn't work and might damage your disk's contents. > > Delete the BIO-generating swap read/write paths and always use > ->direct_IO(). This puts the mapping layer in the filesystem. > > This doesn't work - probably due to ki_pos being set to > page_file_offset(page) which then gets remapped. Also because most common block file systems do not actually implement a ->direct_IO that does anything (noop_direct_IO).