blk_crypto_u...capabilities(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– blk_crypto_update_capabilities πŸ’–

okay so bestie, welcome to this little entry from the Kernel API Manual. The main character is blk_crypto_update_capabilities, and she is literally here to update one crypto profile's capabilities so they match another crypto profile's capabilities. no cap, that's the assignment. πŸ’…


🌸 NAME 🌸

blk_crypto_update_capabilities β€” update the capabilities of a crypto profile to match those of another crypto profile. slay. ✨


✨ SYNOPSIS ✨

void blk_crypto_update_capabilities (struct blk_crypto_profile *dst ,
const struct blk_crypto_profile *src );

Return type is void, so there's no return value coming back β€” she does the update and exits, periodt. πŸ’β€β™€οΈ


πŸŽ€ ARGUMENTS πŸŽ€

  • dst β€” the crypto profile whose capabilities to update. she's the one getting the glow-up, iykyk.
  • src β€” the crypto profile whose capabilities this function will update dst's capabilities to. she's the inspo, fr fr.

πŸ¦‹ DESCRIPTION πŸ¦‹

Blk-crypto has a rule and it is not optional: the crypto capabilities that were advertised when a bio was created have to keep being supported by the device until that bio is ended. literally until the bio is over, bestie. This in turn means a device cannot shrink its advertised crypto capabilities without any explicit synchronization with upper layers. no sneaky downgrade. 🚫

So if there's no such explicit synchronization, src must support all the crypto capabilities that dst does β€” i.e. we need blk_crypto_has_capabilities(src, dst). that's the vibe check. βœ…

Also note: as long as the crypto capabilities are being expanded, the order of updates becoming visible is not important. why? because it's alright for blk-crypto to see stale values β€” they only cause blk-crypto to believe that a crypto capability isn't supported when it actually is β€” which might result in blk-crypto-fallback being used if available, or the bio being failed. not ideal, but that's the consequence, periodt. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./block/blk-crypto-profile.c, plus the whole reference friend group:


signed off from the ./block corner of the Kernel API Manual, dated October 2026, under the page label blk_crypto_u...capabilities(9). bye bestie πŸ«ΆπŸ’–

πŸ“¦ where this page comes from