Re: [PATCH] xfs: fix sign handling problem in xfs_bmbt_diff_two_keys

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

 



On Thu, Aug 29, 2019 at 08:41:58AM -0700, Darrick J. Wong wrote:
> A signed s64 comparison would just break the diff_two_keys function
> again.  The reason for the big dorky comment is to point out that the
> signed comparison doesn't work for xfs_btree_query_all, because it does:

Even more reason to have a good helper encapsulating and documenting
all the caveats :)

> I wouldn't mind you cooking up a patch (I think I'm going to be busy
> for a few hours digging through all of Dave's patches) but the helper
> needs to be cmp_u64.  Though ... I also think the logic in the patched
> bmbt diff_two_keys is easy enough to follow along.
> 
> (Personally I find the subtraction logic harder to follow, though it
> generates less asm code on x64...)

The subtraction is a little weird, but very efficient if it works.
I'm not sure any of our users is worth the micro-optimization, though.

I'll cook up a series over the weekend.



[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