Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1935837ima; Thu, 25 Oct 2018 07:15:51 -0700 (PDT) X-Google-Smtp-Source: AJdET5eUuxyimTjWsoWuAQ9XshfuytYdWSXMKetkjSLsCvQeInD1gVZtmpcjChq0m9HrA3k8LhVH X-Received: by 2002:a63:6dc8:: with SMTP id i191mr1588273pgc.215.1540476951234; Thu, 25 Oct 2018 07:15:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540476951; cv=none; d=google.com; s=arc-20160816; b=AruMkuAbss12omtqK4ENPTIUI/gy0ohyluu8cF9W1sjFlThvqZZstbGbfBgnq1/zxi xZ0SAbhl1S/hXRt40qsmKzwluXMuruyukgRT+6wBBpBf+6BDdZLoj1D9LHAV+lG9tgrR jTfgDt7jX8UMCDa/1N4MHqbCjOwQUVlLwmGZMP9sGqY1JEXgSBeYxCrf7aS/aZGm0OSY rxWBMKDZ2b1OdUJQyBqKYbtQjxix9KwizTyJy4IAv4uujf5h4uf4Cd+UgE2CqEh08l5A AHBZmscK7KasnM20mA/ZUT4rqlvrn7NxSpQssimm8BBW6JwHIF5Y6KjjUeFWLoKX+X3S LfwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=xqMC37lTHgKVO2i5HsHULNwTo04JHunXWhSF/7HO6VI=; b=M0Brxi3UuD2460BsfKRp49E88QyWp01iz7dsaise++Vpa1F+sWsb0mvR6iBn+NOqaT VE1+hrQ1dxmXbylv90tmG97aBGgc17UViox5PMo9lNJqOUFLr8xW3wsAx42pz0SNUnCQ t2/Rz/uEWMNWeLg7q7IJZpwbZobGHWMEgD/J/e0fBkMylYNdWQRIC5QPr313IYaW/5v6 9kk35JvEpDVkhFrn6UN1Q7fUoBQjtwydXqImgo/KvL8/QRwPXN893t8do6AMx4vL5p3D ZGTlgeYtrbKSvWLTd/+H2jgrULU4KnNdzHsLJ71KUFloe6B6qUaXVWnMAu0y1eYnlVdV t11Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iwt6NUwU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12-v6si8267257pga.81.2018.10.25.07.15.03; Thu, 25 Oct 2018 07:15:51 -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; dkim=pass header.i=@kernel.org header.s=default header.b=iwt6NUwU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728421AbeJYWou (ORCPT + 99 others); Thu, 25 Oct 2018 18:44:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:53804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728299AbeJYWoq (ORCPT ); Thu, 25 Oct 2018 18:44:46 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D0A822084A; Thu, 25 Oct 2018 14:11:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476710; bh=any9d/ZlmM1theEkMiICGcDkwKEKdz3y9VhByluyreI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iwt6NUwUPJ42QDvsEJ8mh3aKuz+cZpBRST8srUm0X//Bqj+R6K7AP3FV1qJZ9v5LZ zroT71K4WNGnNpuZfydM82WlPzbs42z9UD0VGeWT28sAGC2ip1zBmb4OtcRRQaQ568 YMEjtfjVQ5YUeHxTPucMI8HmTgaJUGBeFnQZg9hY= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Qu Wenruo , David Sterba , Sasha Levin Subject: [PATCH AUTOSEL 4.14 40/46] btrfs: quota: Set rescan progress to (u64)-1 if we hit last leaf Date: Thu, 25 Oct 2018 10:10:47 -0400 Message-Id: <20181025141053.213330-40-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141053.213330-1-sashal@kernel.org> References: <20181025141053.213330-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qu Wenruo [ Upstream commit 6f7de19ed3d4d3526ca5eca428009f97cf969c2f ] Commit ff3d27a048d9 ("btrfs: qgroup: Finish rescan when hit the last leaf of extent tree") added a new exit for rescan finish. However after finishing quota rescan, we set fs_info->qgroup_rescan_progress to (u64)-1 before we exit through the original exit path. While we missed that assignment of (u64)-1 in the new exit path. The end result is, the quota status item doesn't have the same value. (-1 vs the last bytenr + 1) Although it doesn't affect quota accounting, it's still better to keep the original behavior. Reported-by: Misono Tomohiro Fixes: ff3d27a048d9 ("btrfs: qgroup: Finish rescan when hit the last leaf of extent tree") Signed-off-by: Qu Wenruo Reviewed-by: Misono Tomohiro Signed-off-by: David Sterba Signed-off-by: Sasha Levin --- fs/btrfs/qgroup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 473ad5985aa3..47dec283628d 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -2603,8 +2603,10 @@ qgroup_rescan_leaf(struct btrfs_fs_info *fs_info, struct btrfs_path *path, } btrfs_put_tree_mod_seq(fs_info, &tree_mod_seq_elem); - if (done && !ret) + if (done && !ret) { ret = 1; + fs_info->qgroup_rescan_progress.objectid = (u64)-1; + } return ret; } -- 2.17.1