On Thu, Jun 27, 2024 at 09:06:56PM +0530, Kanchan Joshi wrote: > The bi->csum_type is constant as far as this bio_for_each_segment loop > is concerned. > Seems wasteful processing, and can rather be moved out where we set a > function pointer to point to either ext_pi_crc64_generate or > t10_pi_generate once. A function pointer is way more expensive than a few branches, especially easily predictable ones.