Re: [PATCH] xfs: fix online repair probing when CONFIG_XFS_ONLINE_REPAIR=n

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

 



On Wed, Jan 15, 2025 at 07:27:43AM +0100, Christoph Hellwig wrote:
> On Tue, Jan 14, 2025 at 10:20:37PM -0800, Darrick J. Wong wrote:
> > Good point, we could cut it off right then and there.  Though this seems
> > a little gross:
> > 
> > 	if (xchk_could_repair(sc))
> > #ifdef CONFIG_XFS_ONLINE_REPAIR
> > 		sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT;
> > #else
> > 		return -EOPNOTSUPP;
> > #endif
> > 	return 0;
> > 
> > but I don't mind.  Some day the stubs will go away, fingers crossed.
> 
> We'll I'd write it as:
> 
> 	if (xchk_could_repair(sc)) {
> 		if (!IS_ENABLED(CONFIG_XFS_ONLINE_REPAIR))
> 			return -EOPNOTSUPP;
> 		sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT;
> 	}
> 
> but I'm fine with either version:

I like your version /much/ better.

> Reviewed-by: Christoph Hellwig <hch@xxxxxx>

Thanks!

--D




[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