Re: [PATCH 16/32] xfs: create a hashname function for parent pointers

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

 



On Tue, Apr 09, 2024 at 10:33:45PM -0700, Christoph Hellwig wrote:
> > +	/*
> > +	 * Use the same dirent name hash as would be used on the directory, but
> > +	 * mix in the parent inode number.
> > +	 */
> > +	ret = xfs_dir2_hashname(mp, &xname);
> > +	ret ^= upper_32_bits(parent_ino);
> > +	ret ^= lower_32_bits(parent_ino);
> > +	return ret;
> 
> Totally superficial nit, but wouldn't this read a little nicer as:
> 
> 	return xfs_dir2_hashname(mp, &xname) ^
> 		lower_32_bits(parent_ino) ^
> 		upper_32_bits(parent_ino);
> 
> ?

Yeah, will change.

> Otherwise looks good:
> 
> 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