[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y5LMosWupn5a1orF@mit.edu>
Date: Fri, 9 Dec 2022 00:50:26 -0500
From: "Theodore Ts'o" <tytso@....edu>
To: Ye Bin <yebin@...weicloud.com>
Cc: adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org, jack@...e.cz,
Ye Bin <yebin10@...wei.com>, Eric Whitney <enwlinux@...il.com>
Subject: Re: [PATCH v4 2/3] ext4: record error when detect abnormal
'i_reserved_data_blocks'
On Thu, Dec 08, 2022 at 11:34:25AM +0800, Ye Bin wrote:
> From: Ye Bin <yebin10@...wei.com>
>
> If 'i_reserved_data_blocks' is not cleared which mean something wrong with
> code, free space accounting is likely wrong, according to Jan Kara's advice
> use ext4_error() to record this abnormal let fsck to repair and also we can
> capture this issue.
If i_reserved_data_block, it means that there is something wrong with
our delayed allocation accounting. However, this accounting is
usually only an in-memory error. The one exception is if quota is
enabled, in which case the space is decremented from the
user/group/project quota.
However, if quota is not in use, which is the overwhelmingly common
case, there will be nothing for fsck to repair. (It does mean that df
will show a slightly smaller free space value due to the messed up
delayed allocation accounting, but that disappears after a reboot.)
Marking the file system as in need of repair when nothing is actually
wrong with the on-disk file system can backfire, in that it confuses
users when they see the ext4 error but then when they run fsck, fsck
reports nothing wrong --- at which point they file a bug.
We could use ext4_error if quotas are enabled, and ext4_msg if not,
but it might not worth the extra complexity.
Cheers,
- Ted
Powered by blists - more mailing lists