[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230817141112.GZ2247938@mit.edu>
Date: Thu, 17 Aug 2023 10:11:12 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: Kemeng Shi <shikemeng@...weicloud.com>
Cc: adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 12/13] ext4: remove unnecessary check for avoiding
multiple update_backups in ext4_flex_group_add
On Thu, Aug 17, 2023 at 11:53:52AM +0800, Kemeng Shi wrote:
>
>
> on 8/16/2023 11:47 AM, Theodore Ts'o wrote:
> > On Thu, Jun 29, 2023 at 08:00:43PM +0800, Kemeng Shi wrote:
> >> Commit 0acdb8876fead ("ext4: don't call update_backups() multiple times
> >> for the same bg") add check in ext4_flex_group_add to avoid call
> >> update_backups multiple times for block group descriptors in the same
> >> group descriptor block. However, we have already call update_backups in
> >> block step, so the added check is unnecessary.
> >
> > I'm having trouble understaind this comit. What do you mean by the
> > "block step" in the last paragraph?
> >
> Sorry for the confusing stuff. I mean we foreach in group descriptor block
> step instead of foreach in group descriptor step to update backup.
> So there is no chance to call update_backups for different descriptors
> in the same bg.
I'm still confused. This commit is not so much removing an
unnecessary check as much as forcing update_backups() to be called for
every single block group. Right?
So either we're doing extra work, or (b) we're fixing a problem
because we actually *need* to call update_backups() for every single
block group.
More generally, this whole patch series is making it clear that the
online resize code is hard to understand, because it's super
complicated, leading to potential bugs, and very clearly code which is
very hard to maintain. So this may mean we need better comments to
make it clear *when* the backup block groups are going to be
accomplished, given the various different cases (e.g., no flex_bg or
meta_bg, with flex_bg, or with meat_bg).
- Ted
Powered by blists - more mailing lists