Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3450381pxj; Tue, 15 Jun 2021 00:52:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw96MP2us0ZvTSwB5dIU4Y7Xs/973dM8Q51TdiDbEHhFKzkJ5R0+HMP4BMXD9GrO+3V2pK7 X-Received: by 2002:a05:6e02:cd1:: with SMTP id c17mr16868186ilj.210.1623743578542; Tue, 15 Jun 2021 00:52:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623743578; cv=none; d=google.com; s=arc-20160816; b=FmV8juWcPXjXTv+DK8uEYnJwEQ39py1Jn8PFJK65B1qxfF075fITiU5bcqj5MWNHFa c63KjOrlWgCS7p/wL/vYyAPB5YtK9V2suzhbDSwe/8LUi/PX+P9AR0v8lblz1FzKPoJa 8P62U0bW2vwGIYRlrzzF0QO/54ZudJ3gF93j/4E/3zp+RnvqTQHYVwtH+SBNTKuPsYdu YJzIpNJ+jBKf6jx0LiICv0uyVWHzUKwO3opC5+84iBG584G7lx0HkrffKKbgO9OT20Rs WrlH6T/xYKmwAxLBggDkSxqaQ29tV6x6vQ1463/ng2LJjhZAeokrRuomxfFQuZu47kM/ Tzqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=tAJ6aPIop6SIFrXfkq9iI9s2sPFbjWEwGMM4+nWtP6s=; b=QaE+q8UTJ4E7OlySBo4IjJ9QZNUpsJ445h/umqY59Da1iMOHNPqqTi6aZ5ABuHXGWf m7ZdOzknYU845l2S/E0VYoFe2Ln6fIQSs1QfCwAZ5x790ZOmsy7+DLWaJe6AL/5DO/oh UkHBgP9FwaACZE4nA66UsZK5ep6wxYcW2yLlKKkEWbyoWQWmmgb//9irG/CNYQh0t3kn cocEgz7+KN/E+FMeSZY4xlKxXo3lRpxIVp71PfrXpwDuxaKKtD9Tjv7aKnenovrgo+ZS tECsYpH447/8k7XAx9Bj9nLxPeLRJz4PwQArq+u2AbhO1VFBjyzBqjm6Vt5c+HNUzVcc ZP0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="k5cWbhp/"; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x6si22529768ilv.67.2021.06.15.00.52.42; Tue, 15 Jun 2021 00:52:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@suse.cz header.s=susede2_rsa header.b="k5cWbhp/"; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230417AbhFOHym (ORCPT + 99 others); Tue, 15 Jun 2021 03:54:42 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:42320 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230392AbhFOHyk (ORCPT ); Tue, 15 Jun 2021 03:54:40 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id D6EA0219CD; Tue, 15 Jun 2021 07:52:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1623743552; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tAJ6aPIop6SIFrXfkq9iI9s2sPFbjWEwGMM4+nWtP6s=; b=k5cWbhp/IIrR/fwQXp72sUXztrKm4+2C0eAnU1TAmucCPG7MlfTKzJek66ApS2IE0JsEWl 1uZztnjyzhzzt7q43prB3SLwgpivul9G+glLegsMN++eMzs5wz6vjoLfR1NQr/X6JAH/qF UP3eDadbtxGMPDGuGbNvXHjoDEAn+tQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1623743552; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tAJ6aPIop6SIFrXfkq9iI9s2sPFbjWEwGMM4+nWtP6s=; b=UZenumCyG8ZXXKY5yW/dodKIrCHFw+n7v0QxpIa6fMGVnlDy/zSFxFx9TRtCOzpIc+pp8b 1LYZcJafEb1AJnDg== Received: from quack2.suse.cz (unknown [10.100.200.198]) by relay2.suse.de (Postfix) with ESMTP id 89D16A3B84; Tue, 15 Jun 2021 07:52:32 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 6772E1F2C88; Tue, 15 Jun 2021 09:52:32 +0200 (CEST) Date: Tue, 15 Jun 2021 09:52:32 +0200 From: Jan Kara To: Andreas Dilger Cc: Jan Kara , Ted Tso , Ext4 Developers List Subject: Re: [PATCH] tune2fs: Update overhead when toggling journal feature Message-ID: <20210615075232.GE29751@quack2.suse.cz> References: <20210614212830.20207-1-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon 14-06-21 15:38:57, Andreas Dilger wrote: > > > On Jun 14, 2021, at 3:28 PM, Jan Kara wrote: > > > > When adding or removing journal from a filesystem, we also need to add / > > remove journal blocks from overhead stored in the superblock. Otherwise > > total number of blocks in the filesystem as reported by statfs(2) need > > not match reality and could lead to odd results like negative number of > > used blocks reported by df(1). > > > > Signed-off-by: Jan Kara > > You could add: > > Fixes: 9046b4dfd0ce ("mke2fs: set overhead in super block") > > and > > Reviewed-by: Andreas Dilger Thanks! > That also makes me wonder if resize2fs also needs to recalculate or > invalidate the s_overhead_clusters field when adding new block groups. > It *looks* like that is done correctly in adjust_fs_info() already? Yes. From a quick look I had when doing this tune2fs patch I've noticed that adjust_fs_info() just zeros s_overhead_clusters which makes the kernel compute the overhead instead... Honza -- Jan Kara SUSE Labs, CR