[dm-devel] [PATCH 2/5] blk-crypto-fallback: consolidate static variables

Christoph Hellwig hch at infradead.org
Thu Sep 16 07:39:54 UTC 2021


On Wed, Sep 15, 2021 at 10:50:13AM -0700, Eric Biggers wrote:
> Using "blk_crypto_fallback_*" for all these variables results in some pretty
> long names, e.g. "blk_crypto_fallback_crypt_ctx_cache" and
> "blk_crypto_fallback_num_prealloc_crypt_ctxs".  This proposal gives the best of
> both worlds; the names are properly "namespaced" but there is also a shortcut to
> refer to them (struct blk_crypto_fallback *fallback = &blk_crypto_fallback).

I'd just drop the second crypt in those.

> If this is going to be controversial I can just drop this patch, but I was
> hoping there would be a way to make things more consistent.

I personally detest that pattern.  Not sure if that counts as
controversial or even matters :)




More information about the dm-devel mailing list