e>
https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y2025-07-24T15:30:13Zxfs: refactor cmp_key_with_cur routines to take advantage of cmp_int()2025-07-24T15:30:13ZFedor Pchelkinpchelkin@ispras.ru2025-07-02T09:39:31Zurn:sha1:734b871d6cf7d4f815bb1eff8c808289079701c2
The net value of these functions is to determine the result of a
three-way-comparison between operands of the same type.
Simplify the code using cmp_int() to eliminate potential errors with
opencoded casts and subtractions. This also means we can change the return
value type of cmp_key_with_cur routines from int64_t to int and make the
interface a bit clearer.
Found by Linux Verification Center (linuxtesting.org).
Suggested-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
xfs: refactor cmp_two_keys routines to take advantage of cmp_int()2025-07-24T15:30:13ZFedor Pchelkinpchelkin@ispras.ru2025-07-02T09:39:30Zurn:sha1:3b583adf55c649d5ba37bcd1ca87644b0bc10b86
The net value of these functions is to determine the result of a
three-way-comparison between operands of the same type.
Simplify the code using cmp_int() to eliminate potential errors with
opencoded casts and subtractions. This also means we can change the return
value type of cmp_two_keys routines from int64_t to int and make the
interface a bit clearer.
Found by Linux Verification Center (linuxtesting.org).
Suggested-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
xfs: rename key_diff routines2025-07-24T15:30:13ZFedor Pchelkinpchelkin@ispras.ru2025-07-02T09:39:29Zurn:sha1:82b63ee160016096436aa026a27c8d85d40f3fb1
key_diff routines compare a key value with a cursor value. Make the naming
to be a bit more self-descriptive.
Found by Linux Verification Center (linuxtesting.org).
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
xfs: rename diff_two_keys routines2025-07-24T15:30:13ZFedor Pchelkinpchelkin@ispras.ru2025-07-02T09:39:28Zurn:sha1:edce172444b4f489715a3df2e5d50893e74ce3da
One may think that diff_two_keys routines are used to compute the actual
difference between the arguments but they return a result of a
three-way-comparison of the passed operands. So it looks more appropriate
to denote them as cmp_two_keys.
Found by Linux Verification Center (linuxtesting.org).
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
xfs: add a generic group pointer to the btree cursor2024-11-05T21:38:29ZChristoph Hellwighch@lst.de2024-11-04T04:18:44Zurn:sha1:77a530e6c49d22bd4a221d2f059db24fc30094db
Replace the pag pointers in the type specific union with a generic
xfs_group pointer. This prepares for adding realtime group support.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
xfs: convert busy extent tracking to the generic group structure2024-11-05T21:38:29ZChristoph Hellwighch@lst.de2024-11-04T04:18:43Zurn:sha1:adbc76aa0fedcb6da2d1ceb1ce786d1f963afee8
Split busy extent tracking from struct xfs_perag into its own private
structure, which can be pointed to by the generic group structure.
Note that this structure is now dynamically allocated instead of embedded
as the upcoming zone XFS code doesn't need it and will also have an
unusually high number of groups due to hardware constraints. Dynamically
allocating the structure this is a big memory saver for this case.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
xfs: factor out a generic xfs_group structure2024-11-05T21:38:27ZChristoph Hellwighch@lst.de2024-11-04T04:18:38Zurn:sha1:e9c4d8bfb26c13c41b73fdf4183d3df2d392101e
Split the lookup and refcount handling of struct xfs_perag into an
embedded xfs_group structure that can be reused for the upcoming
realtime groups.
It will be extended with more features later.
Note that he xg_type field will only need a single bit even with
realtime group support. For now it fills a hole, but it might be
worth to fold it into another field if we can use this space better.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
xfs: pass a pag to xfs_extent_busy_{search,reuse}2024-11-05T21:38:25ZChristoph Hellwighch@lst.de2024-11-04T04:18:29Zurn:sha1:b6dc8c6dd2d3f230e1a554f869d6df4568a2dfbb
Replace the [mp,agno] tuple with the perag structure, which will become
more useful later.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
xfs: standardize the btree maxrecs function parameters2024-09-01T15:58:20ZDarrick J. Wongdjwong@kernel.org2024-08-30T22:37:21Zurn:sha1:411a71256de6f5a0015a28929cfbe6bc36c503dc
Standardize the parameters in xfs_{alloc,bm,ino,rmap,refcount}bt_maxrecs
so that we have consistent calling conventions. This doesn't affect the
kernel that much, but enables us to clean up userspace a bit.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>