Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9178029pxu; Mon, 28 Dec 2020 08:31:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLeudbynwXVquP+AubRIDlem9skD2/F/6AfK9Ff6yMHhvsp2WBaNJXcYSkBmUbQE4zfcXd X-Received: by 2002:aa7:d3cc:: with SMTP id o12mr44727802edr.235.1609173069715; Mon, 28 Dec 2020 08:31:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173069; cv=none; d=google.com; s=arc-20160816; b=QkbTNAys9P6UGI8caL6VY/Jfi5M71daXOQum4m7ADU/9fyZxJpOUz+GvmYfmnuKzuA S1Il7OHdCY8Ora8Hrr65Nt0Q5bsZO/WoEUUrUOIxwTWtCLX0pfYOjpS2bVjcqBKiFOhb nGoIwUnGCaGORbjjc2C8fW4EPicuWSLuw1h4F1Nu28QwGYEqvqiVnWc6Z3qjZIEdFeQL xxhc3Y7JND2B0guY4v/qcy4He237aYxaWVYCuu3j2mF0D4XLyzk44h6fqHxkbw9LY2A+ ZldRuOuWZxnWrc8rh9PsBc0qRYrtJUvLJdTdHeM8MS1IIQtwV9lmNHQ8h6OsIwq7u33f YQNA== 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=S0j/bfhuqf0EbEYwASn9Aak0+PkhFvEtsg+MI44lQwc=; b=YuF5IKJlo6SLwDaHAXpmbKDf6kvd3BXyHsDsG94bV/3WowRJ+H2foAyKyxQ6o7MH3y i7RZ7DSfAQA6LHhFa5IdGsVyAlWZMV+NUFqO52Z4tHBn3nVg0GZXmMCZa6YbSL+9jGWv ozozz69kKq4iIL7GZmuoMnAIIfsrxlNglutJ+4QqAoDMZioywWdMZWw7KcRCqRiUv9dw /G46VV4EaIoOBltyF8zwgKMq924TEFRDm0Z88egppgho97cSbgYrI7w4dOdhI4BBX2JK +SZdpobAAyjTpnq1+BOyYkFOCABTlSvMmYaUHm65WVZ5swF/XBSN9k9AVMDuC98gmG/Y 4xew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ee7nunOR; 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=pass (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 gn22si18041026ejc.749.2020.12.28.08.30.45; Mon, 28 Dec 2020 08:31:09 -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=@linuxfoundation.org header.s=korg header.b=ee7nunOR; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633570AbgL1Q2e (ORCPT + 99 others); Mon, 28 Dec 2020 11:28:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:34784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730769AbgL1NHU (ORCPT ); Mon, 28 Dec 2020 08:07:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C3F8421D94; Mon, 28 Dec 2020 13:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160825; bh=1r5zoLsFnihtbS6peEyTW2l0dkQjHRAT4xSKpGJHh+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ee7nunORxKorMnKrwmb6i0v3lCRZL9gBqoPsZCdKPBwZPZFpHrD2makHrzwTZ9Nje ejUdlJgtPwZhWBUE+Ozkm6Mqm5J+RxD7eCVBscrT5nDCT4kNssdjngZjlL1t7+Nb7z EXYd7LMEWMnvP9zr8twAk+/Cuuq4qTjf+SgSaG8k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Misono Tomohiro , Qu Wenruo , David Sterba , Sudip Mukherjee Subject: [PATCH 4.9 151/175] btrfs: quota: Set rescan progress to (u64)-1 if we hit last leaf Date: Mon, 28 Dec 2020 13:50:04 +0100 Message-Id: <20201228124900.575870911@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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: Qu Wenruo commoit 6f7de19ed3d4d3526ca5eca428009f97cf969c2f upstream 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: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/qgroup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -2340,8 +2340,10 @@ out: } 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; }