Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp752939pxb; Wed, 29 Sep 2021 09:00:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxv8lQCk3hcEIA3iPfkcZaDLEhSRTiuJWXN9WcA3i/HTVvIEs01Djthgx6i5Cni3OXPbAVo X-Received: by 2002:a17:902:a406:b029:12b:c50a:4289 with SMTP id p6-20020a170902a406b029012bc50a4289mr398316plq.56.1632931242116; Wed, 29 Sep 2021 09:00:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632931242; cv=none; d=google.com; s=arc-20160816; b=eCJq10cejJ0yQayc41+5uVNpy6EUwt7qggV+HfQj8qmQ+j9KqiNphhIEHU+rDbdYV7 irp3eKqMdfjF5MIND2tsADXoabo6s6VUGt5sjnmKC3wfMFzVnicsZZOpUvSAVV51o551 eu+ibQbmWp0HEY45sgZO6VwsLiS3lqKmvsO0MLnq7MiKXa+mmlIwOlmfxiptfeZxL5zm 3tqeJ57lASmYgC3p3l9U8r3XzmZ6lQ3l9L1T4G5Lx/pD+r9fTCH8byp96MS4MYfGCOmn owJ887voAPOw+oVmWdKCCmkcnNlI2N5QWFCSDlJNtRiZkWnYs6dFq9q9Qrudwls6ULZj 7gjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:cc:to:references:in-reply-to :from:organization:dkim-signature; bh=YD/JzDwhuk7rGKkEzFS8gH/oiqrA2eu324rL5fdp0h4=; b=PjqG6p7o7h8ghlcsGbAL0mO4bMEe9ndvrZUxIhxpIqQHgRn0RZ8i+OWKYsvLFRKCjn 3i0CRjhopyMnNclq2xPtS+DQjuLI2cPAVQWPADogSM39uQA2cBOtY/bP/NNtYKHOjcu0 MnHSaQUmAAr/RdcpQecPTtuXLGNGdojb7ruJb2LMiTTZml7JuwdQ3N1Q/75AL/UfVuRd YeRt9qjIL+bZwz3aqVRQqr6BXhwO+/KqD1j6Ms9D3adWHOxNGA1glTe2ZejCWzVWx3Nn EKjlJuH1yDXQnKDGqwkaBJWTKtTL00s81nbxBn3PYWx//Pn646PmVPyExDFn4R/qeJB9 H93A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=JHWSxY2T; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w193si190962pfc.328.2021.09.29.09.00.22; Wed, 29 Sep 2021 09:00:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=JHWSxY2T; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345376AbhI2Pqz (ORCPT + 99 others); Wed, 29 Sep 2021 11:46:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39132 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245638AbhI2Pqv (ORCPT ); Wed, 29 Sep 2021 11:46:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632930309; 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=JHWSxY2TsFsxf4kceHPwC6BVWFUHkyy9dGFyRZgFflSIy9eAGO7RjD7NHDJz3/VZAEVW6R hRWnyWQ/TIbvYWewRR3GAbmZEihf+7rhE/N5sKgZDCluq4+eoOAdo5GCVHGRUeVbzPGM+G RCZ/b3021Ar8Jhp7OrvyBBRRPesVxYc= 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 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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