Re: [PATCH] xfs_repair: stop using ->data_entry_p()

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

 



On Tue, Jan 21, 2020 at 10:37:06AM -0800, Darrick J. Wong wrote:
> On Mon, Jan 20, 2020 at 08:29:17AM -0600, Eric Sandeen wrote:
> > On 1/17/20 10:39 PM, Darrick J. Wong wrote:
> > > On Fri, Jan 17, 2020 at 05:17:11PM -0600, Eric Sandeen wrote:
> > >> The ->data_entry_p() op went away in v5.5 kernelspace, so rework
> > >> xfs_repair to use ->data_entry_offset instead, in preparation
> > >> for the v5.5 libxfs backport.
> > >>
> > >> This could later be cleaned up to use offsets as was done
> > >> in kernel commit 8073af5153c for example.
> > > 
> > > See, now that you've said that, I start wondering why not do that?
> > 
> > Because this is the fast/safe path to getting the libxfs merge done IMHO ;)
> > 
> > ...
> > 
> > 
> > >> @@ -1834,7 +1834,7 @@ longform_dir2_entry_check_data(
> > >>  			       (dep->name[0] == '.' && dep->namelen == 1));
> > >>  			add_inode_ref(current_irec, current_ino_offset);
> > >>  			if (da_bno != 0 ||
> > >> -			    dep != M_DIROPS(mp)->data_entry_p(d)) {
> > >> +			    dep != (void *)d + M_DIROPS(mp)->data_entry_offset) {
> > > 
> > > Er.... void pointer arithmetic?
> > 
> > er, let me take another look at that.
> 
> fmeh, we apparently allow this gcc extension in the kernel so I guess
> it's fine for xfsprogs :P
> 

Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

--D

> --D
> 
> > -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