Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1226449ybh; Tue, 10 Mar 2020 17:42:21 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvSkgO49A4tA4BXm0BCggG/EaJaV9+v3MruDKJUKKp9JiU5zJQbppQDUh42mbIXOW/NKkiq X-Received: by 2002:a05:6808:315:: with SMTP id i21mr213216oie.139.1583887340967; Tue, 10 Mar 2020 17:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583887340; cv=none; d=google.com; s=arc-20160816; b=idw9Ywi3oAo7xkcX6c58/onG4kOYrx57PchZazwLtHUyBEs5cGmMy2qKDo+yb3Wmot XO9jh7Gm0RxvM0wXCPdJzLOu8lt3q+S9svhmyTtnOIkM1uNGWywo4v4eL/FpAJ0hiJzV f6v8zdIO4h7mwqQD+emqAcI5nfBJ8200Hth8rhS89a1kXyKnQfECFtEjXda6tAJp36Ug WT8QV/PXLB7kgf3WIOdwVccnDYxCeQ25J7JxN8kP7/fBED+au2IY3Vv1aVMEdBZf28+e 8Pdn34TYZyhRi9+61dfcV4gsUIabcgxPZswVjKNKlFESgdNku5v1GWV8gaoAZU21Hoe4 Xopg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=OBrVVELH4naRKYb7sRVMossXW73YYjEDWBCPWfRN4ow=; b=q/R9Zb2Cc8Dyhj7imM049eko2xohblN8jxXENOQ4BndJPaLisXjQ0dkqCPpELdeLgA SxJQCgULyyrXT/7lgz66ZxnlUl33b6xNsQxWFRJn42LhtXewwLch2aUu/hDfuJY8q5Gl qHAU8Eeqh7h4Ygfa5yceafoQaIC/3pzOBkuHAqjcLgtma0aRt3k9s1aW0ZzlTxjoTf2f T52Ld50dAnJpiLorr+r4NBOwpOYteWMCC/5JvUjOnu+geb5FmltLjGkav04H15y2uf7u wPH5+a9eUYHFKiV0L/80/vLwHrm4pGz/vQYQ5ZIJ8uAO8sdXSzFBpgQOkd7FpiWvUWv6 vGYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si268242oii.181.2020.03.10.17.41.43; Tue, 10 Mar 2020 17:42:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727828AbgCKAkk (ORCPT + 99 others); Tue, 10 Mar 2020 20:40:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:50852 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727484AbgCKAkj (ORCPT ); Tue, 10 Mar 2020 20:40:39 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 32836B17A; Wed, 11 Mar 2020 00:40:38 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id D8016DA7A7; Wed, 11 Mar 2020 01:40:12 +0100 (CET) Date: Wed, 11 Mar 2020 01:40:12 +0100 From: David Sterba To: Roman Gushchin Cc: Josef Bacik , Chris Mason , David Sterba , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, Rik van Riel Subject: Re: [PATCH v3] btrfs: implement migratepage callback Message-ID: <20200311004012.GC12659@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Roman Gushchin , Josef Bacik , Chris Mason , David Sterba , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, Rik van Riel References: <20200305005735.583008-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200305005735.583008-1-guro@fb.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 04, 2020 at 04:57:35PM -0800, Roman Gushchin wrote: > Currently btrfs doesn't provide a migratepage callback. It means that > fallback_migrate_page() is used to migrate btrfs pages. The callback exists for the metadata pages (btree_migratepage), so I've added 'for data pages' where appropriate. > fallback_migrate_page() cannot move dirty pages, instead it tries to > flush them (in sync mode) or just fails (in async mode). > > In the sync mode pages which are scheduled to be processed by > btrfs_writepage_fixup_worker() can't be effectively flushed by the > migration code, because there is no established way to wait for the > completion of the delayed work. > > It all leads to page migration failures. > > To fix it the patch implements a btrs-specific migratepage callback, > which is similar to iomap_migrate_page() used by some other fs, except > it does take care of the PagePrivate2 flag which is used for data > ordering purposes. > > v3: fixed the build issue once again > v2: fixed the build issue found by the kbuild test robot > > Signed-off-by: Roman Gushchin > Reviewed-by: Chris Mason Added to devel queue, thanks.