Re: [PATCH 2/6] xfs_repair: enforce that inode btree chunks can't point to AG headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 1/30/20 2:26 PM, Darrick J. Wong wrote:
> On Thu, Jan 30, 2020 at 01:38:52PM -0600, Eric Sandeen wrote:
>> On 1/23/20 6:17 PM, Darrick J. Wong wrote:
>>> From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
>>>
>>> xfs_repair has a very old check that evidently excuses the AG 0 inode
>>> btrees pointing to blocks that are already marked XR_E_INUSE_FS* (e.g.
>>> AG headers).  mkfs never formats filesystems that way and it looks like
>>> an error, so purge the check.  After this, we always complain if inodes
>>> overlap with AG headers because that should never happen.
>>
>> I peered back into the mists of time to see if I could find any reason for
>> this exception, and I couldn't.
>>
>> Only question is why you removed the
>>
>> -	ASSERT(M_IGEO(mp)->ialloc_blks > 0);
>>
>> assert, that's still a valid assert, no?
> 
> The superblock validation routines are supposed to reject all the
> combinations that can result in ialloc_blks being zero.
> 
> That said, I can't think of a reason to remove the assert.  If you want
> me to put it back, it I can... or pretty-please put it back in for me?
> :)


Sure, I'll try to remember to do that with your blessing.

It just didn't seem related to the rest of the patch, is all.  If it's only
there to protect the next calculations, and this is a spot that makes no
sense to test it, I'm ok with dropping it too.  Was just looking for a reason.

-Eric



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux