Re: [PATCH v6] xfs: introduce protection for drop nlink

From: cheng.lin130
Date: Wed Oct 11 2023 - 02:51:49 EST


> On Tue, Oct 10, 2023 at 10:09:01AM +0800, cheng.lin130@xxxxxxxxxx wrote:
> > From: Cheng Lin <cheng.lin130@xxxxxxxxxx>
> >
> > When abnormal drop_nlink are detected on the inode,
> > return error, to avoid corruption propagation.
> I know this has been through a few cycles, but wouldn't it be useful
> to have at least a little description here how that case could happen?
Unfortunately, I don't know how the underflow happened. The purpose
of this patch is to prevent the situation from getting worse and provide
users can repair it at the appropriate moment afterwards.