summaryrefslogtreecommitdiff
tag nameconstify-btree-5.15_2021-08-12 (a0be41dbeab482c46e4f2081ebd0e31f43451961)
tag date2021-08-12 16:28:24 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 3d286cad7b...
xfs: constify btree operations
After finishing the bug fixes in the previous series, the thought occurred to me that I really ought to check the main index query functions around XFS and make sure that they weren't changing their arguments either. Since btrees are one of the major data structure types in XFS, I decided to concentrate there. Starting with the query_range and query_all functions, I started constifying the btree record and key parameters to make sure that the query functions don't modify the search parameters and that the callback functions don't modify the record pointer that is passed from the range query function. That spiralled from there into a full blown audit of all the btree predicates and extraction functions; many of them could be constified too. AFAICT there's almost no change in the generated code, which is what you'd expect since there was only one query range caller in the entire codebase that actually messed with caller memory. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmEVrpgACgkQ+H93GTRK tOvVtg/+J8uKVD9H44ie5eXTcsRVvLFE+pM1fuuivUy9xmZNJVAESGnamJ9jFQHH C7dGf9KCf4F5X3pcyVs0vHhasH8FnyKvuRlFF1KJDFTkQl1it9cFWgr7CiX5yqk3 8lRsPoPJq352qiBnOp+D9UFRYUDPKf3x0y/UDUeJwo3MA/xotiDWOywoZxspeQCX 93v5sG7Rf0nQouo0j55URc7NKAt2nnWYNTioQ8UVUYbPbG6JFLCf6oP3oPTQT9mi YDlLfpJu+THsoLvWN6djjbd+JOPrOCzieD/8AqNGGjMiCySNsWd/5LTNt3hoEsia utSs1n3V3LYebVjE1kr9EvPOK26cQpv793r4v3HDSfKIEb4iqHx3xSK1ZMcpNL14 wcRGGvjV+XcBclf8WWamIvIR3AWKMpafLwRMkToTtyaLqc9t6EntZd69KToUbAmy B++mayN2uWnxE9vybg6j+NayE5trjaOrS4c9SO8RslbJHD5ADvtRCCBgKKCKtlCd WAViVzyNx30GBY7L7Q8v3mXndRPjr9X+FMWyIVE1vgmhYBmLkHTuSSj9koCJvLyJ NsZd3wz5ju31h5HVhfEo/IeQurW5TOWt680oCytjXIevnds75Dpk+wN08RxMLCVk wqpr078Fmg2eGTKoSnmXio7HeKtxyMcS2WXmvx1hRqL0sXKYKHk= =zfz9 -----END PGP SIGNATURE-----