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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05691C433EF for ; Wed, 29 Sep 2021 15:45:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 88B9261247 for ; Wed, 29 Sep 2021 15:45:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 88B9261247 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id BFE0E94003D; Wed, 29 Sep 2021 11:45:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BAD7C94003A; Wed, 29 Sep 2021 11:45:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A74BE94003D; Wed, 29 Sep 2021 11:45:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0066.hostedemail.com [216.40.44.66]) by kanga.kvack.org (Postfix) with ESMTP id 9A16394003A for ; Wed, 29 Sep 2021 11:45:12 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 56CFF3260F for ; Wed, 29 Sep 2021 15:45:12 +0000 (UTC) X-FDA: 78641034864.38.5065953 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf26.hostedemail.com (Postfix) with ESMTP id 0338820019E2 for ; Wed, 29 Sep 2021 15:45:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632930311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YD/JzDwhuk7rGKkEzFS8gH/oiqrA2eu324rL5fdp0h4=; b=UMGGi60zMGxR7fShXS2BAOgBrYC0mLoSySOQahi5f3db+OyrWXt9ghnCFDaqD9PH2U2JxS 3XqRt0890w5cEyhGdRQiNjAFe3zDYu4rpXcOx2R6yuOm/Xz81cV9UPwY47XVa9YBTJVYlt EOQDDorX6RHLmGJmd435ObT3virdAqA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-169-RydRWjxQMwK58uTqWu6Ekw-1; Wed, 29 Sep 2021 11:45:08 -0400 X-MC-Unique: RydRWjxQMwK58uTqWu6Ekw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 00CAB1006AA3; Wed, 29 Sep 2021 15:45:06 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 51DD86A900; Wed, 29 Sep 2021 15:45:03 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20210927200708.GI9286@twin.jikos.cz> References: <20210927200708.GI9286@twin.jikos.cz> <163250387273.2330363.13240781819520072222.stgit@warthog.procyon.org.uk> To: dsterba@suse.cz Cc: dhowells@redhat.com Cc: willy@infradead.org, Chris Mason , linux-block@vger.kernel.org, ceph-devel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, Ilya Dryomov , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH v3 0/9] mm: Use DIO for swap and fix NFS swapfiles MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4005661.1632930302.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Wed, 29 Sep 2021 16:45:02 +0100 Message-ID: <4005662.1632930302@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: imf26.hostedemail.com; dkim=fail ("headers rsa verify failed") header.d=redhat.com header.s=mimecast20190719 header.b=UMGGi60z; spf=none (imf26.hostedemail.com: domain of dhowells@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=dhowells@redhat.com; dmarc=fail reason="No valid SPF" header.from=redhat.com (policy=none) X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 0338820019E2 X-Stat-Signature: cri1z6etwzm3t63a6enfmgafzrkszimz X-HE-Tag: 1632930311-735118 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: David Sterba wrote: > > There are additional patches to get rid of noop_direct_IO and replace = it > > with a feature bitmask, to make btrfs, ext4, xfs and raw blockdevs use= the > > new ->swap_rw method and thence remove the direct BIO submission paths= from > > swap. > > = > > I kept the IOCB_SWAP flag, using it to enable REQ_SWAP. I'm not sure = if > > that's necessary, but it seems accounting related. > > There was probably some step missing. The file must not have holes, so > either do 'dd' to the right size or use fallocate (which is recommended > in manual page btrfs(5) SWAPFILE SUPPORT). There are some fstests > exercising swapfile (grep -l _format_swapfile tests/generic/*) so you > could try that without having to set up the swapfile manually. Yeah. As advised elsewhere, I removed the file and recreated it, doing th= e chattr before extending the file. At that point swapon worked. It didn't work though, and various userspace programs started dying. I'm guessing m= y btrfs_swap_rw() is wrong somehow. David