From patchwork Tue Jun 5 14:07:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 10448419 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 819BF60284 for ; Tue, 5 Jun 2018 14:10:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6845B29582 for ; Tue, 5 Jun 2018 14:10:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E810296BF; Tue, 5 Jun 2018 14:10:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C18329598 for ; Tue, 5 Jun 2018 14:10:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752158AbeFEOKK (ORCPT ); Tue, 5 Jun 2018 10:10:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:49231 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751688AbeFEOKI (ORCPT ); Tue, 5 Jun 2018 10:10:08 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 84974AC71; Tue, 5 Jun 2018 14:10:07 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id E6101DA992; Tue, 5 Jun 2018 16:07:21 +0200 (CEST) Date: Tue, 5 Jun 2018 16:07:21 +0200 From: David Sterba To: Qu Wenruo Cc: dsterba@suse.cz, Qu Wenruo , Qu Wenruo , linux-btrfs@vger.kernel.org Subject: Re: [PATCH RFC ver.B] btrfs: scrub: Don't use inode pages for device replace Message-ID: <20180605140721.GB3539@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Qu Wenruo , Qu Wenruo , Qu Wenruo , linux-btrfs@vger.kernel.org References: <20180605043656.4006-1-wqu@suse.com> <20180605134237.GA3539@twin.jikos.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jun 05, 2018 at 09:47:46PM +0800, Qu Wenruo wrote: > > > On 2018年06月05日 21:42, David Sterba wrote: > > On Tue, Jun 05, 2018 at 01:34:03PM +0800, Qu Wenruo wrote: > >> Hi David, > >> > >> It would be pretty nice if we could get this fix (or previous RFC patch) > >> to get into current release cycle. > >> > >> As it's a unrecoverable data corruption, it would be better to get it > >> fixed as soon as possible. > > > > That we can do, I'm planning to send 2nd pull by the end of the next > > week as there's at least one patch in the queue now. > > > > This patch seems to big, can you please prepare a minimal version? > > The previous version (a completely different direction though) is much > smaller. > https://patchwork.kernel.org/patch/10440541/ > > However personally speaking, I still prefer this one, as it's much simpler. As this will go to older stable kernels, I'd rather split that to more patches where the first one is --- and then the whole callchain of copy_nocow_pages continues. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -2799,7 +2799,7 @@ static int scrub_extent(struct scrub_ctx *sctx, struct map_lookup *map, have_csum = scrub_find_csum(sctx, logical, csum); if (have_csum == 0) ++sctx->stat.no_csum; - if (sctx->is_dev_replace && !have_csum) { + if (0 && sctx->is_dev_replace && !have_csum) { ret = copy_nocow_pages(sctx, logical, l, mirror_num, physical_for_dev_replace);