Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3876727pxb; Tue, 17 Nov 2020 06:01:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJyt9Wp8lWv0t8a3zJ+3hBXPvuovC5Mo/0FrkLS6TOJj8rpTZykSLYeyPzHjlCs/xXUB5ShW X-Received: by 2002:a50:fd8b:: with SMTP id o11mr21103003edt.156.1605621711474; Tue, 17 Nov 2020 06:01:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605621711; cv=none; d=google.com; s=arc-20160816; b=quGLVd2og5nAAZu/TsK8DfIg6CkTGVazygotAuFfQAvfcI+hxtbawgHPOW6W6yAFH0 X3qI6mDmCrPchp6SOlahX/etDhxrfjm9R/GbB8IOTHb6zv65iVkUTY/ZJZ/zCvUtQPPS 1dNW8XhLpQ0lLf/qMqJSCbXlhGrIhT0R3wsFHwPs0zeBFXrwcA/oI+idNB2kRDpPB4i4 OtSWofP/5pLcuhzxiE4iB2J3DKM30pg4+LvRN6ofDOG19UVR85vFgO/FY3tUkyNpZnWC R1wFYFqQ4OWF5XDeBNb7demVb8UWaL7reh/xltjSFbNIcdEN/arq7qGUqfZzSBSEeeYV O/iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3loCxRMxrxiDE1oU65Qt37YEYGdIf2fBoxW9Kom8DBQ=; b=MTi1K/DyLUGztYoJbqpDijpAbYeyuq54+OHiYjkuLUMxqJRqZzA2N8+IX1YQ7TZRZf TEaqcUwN0sJPwlnoeedyaO+p2MO7nroaqlLYYcklrFpEJyeLwkc7X+OamjT01of2JiuL NZZBIyS58dwYcgm7vO1YVRGiOSaVwfPTeeJ0aQt+PEEiMqKttVFBGZisUdPCEfwNPArF 1WJdPi4/R85DqyR1j4kUTY/YSgRySGnF+jR9Lrtwa4o4bBGUUZ95RFeakNz4BB3An4af 9a123eFKWXPBsxD7OuhQP/cq9JPa0DVP9n9gwZoDmCepFTAIKt/RcVEVAZO22UN6iLm+ RoUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lSwC5IPq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo5si14067177ejb.102.2020.11.17.06.01.26; Tue, 17 Nov 2020 06:01:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lSwC5IPq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732302AbgKQN5p (ORCPT + 99 others); Tue, 17 Nov 2020 08:57:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:52718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729109AbgKQNTj (ORCPT ); Tue, 17 Nov 2020 08:19:39 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C8F3824695; Tue, 17 Nov 2020 13:19:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605619179; bh=dLG5ITSkyLAmWjLFAa0VwfX6Za66mIz9qPoWi5+lFgg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lSwC5IPqUS+OOvlUAHX21Ii7ft9wLZwQGb9gkQnfgGFEiMcURlQAIzvotjQqRVu9S bd6pd4m728vckNHVY83NAGg822sBmun4QoPPGmqCZqhH/rVytGm2BRF/alBc5TBQEJ Eq/JCRGYHJecCytYMdb0H/bBY7Y+1PPBasYlUYrg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Darrick J. Wong" , Christoph Hellwig , Sasha Levin Subject: [PATCH 4.19 055/101] xfs: set the unwritten bit in rmap lookup flags in xchk_bmap_get_rmapextents Date: Tue, 17 Nov 2020 14:05:22 +0100 Message-Id: <20201117122115.778357576@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122113.128215851@linuxfoundation.org> References: <20201117122113.128215851@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Darrick J. Wong [ Upstream commit 5dda3897fd90783358c4c6115ef86047d8c8f503 ] When the bmbt scrubber is looking up rmap extents, we need to set the extent flags from the bmbt record fully. This will matter once we fix the rmap btree comparison functions to check those flags correctly. Fixes: d852657ccfc0 ("xfs: cross-reference reverse-mapping btree") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Sasha Levin --- fs/xfs/scrub/bmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c index f84a58e523bc8..b05d65fd360b3 100644 --- a/fs/xfs/scrub/bmap.c +++ b/fs/xfs/scrub/bmap.c @@ -120,6 +120,8 @@ xchk_bmap_get_rmap( if (info->whichfork == XFS_ATTR_FORK) rflags |= XFS_RMAP_ATTR_FORK; + if (irec->br_state == XFS_EXT_UNWRITTEN) + rflags |= XFS_RMAP_UNWRITTEN; /* * CoW staging extents are owned (on disk) by the refcountbt, so -- 2.27.0