Re: [PATCH 2/2] xfs: don't consider future format versions valid

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

 



On Wed, Apr 12, 2023 at 05:13:41AM -0700, Christoph Hellwig wrote:
> > @@ -86,16 +87,16 @@ xfs_sb_good_version(
> >  	if (xfs_sb_is_v5(sbp))
> >  		return xfs_sb_validate_v5_features(sbp);
> >  
> > +	/* versions prior to v4 are not supported */
> > +	if (XFS_SB_VERSION_NUM(sbp) != XFS_SB_VERSION_4)
> > +		return false;
> 
> The comment is a bit confusing now.  But maybe the v4 checks should
> move into a xfs_sb_validate_v4_features helper anyway, which
> would lead to a quite nice flow here:
> 
> 	if (xfs_sb_is_v5(sbp))
> 	 	return xfs_sb_validate_v5_features(sbp);
> 	if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4)
> 	 	return xfs_sb_validate_v4_features(sbp);
> 	return false;

Sure. Care to send a patch that does that cleanup?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[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