Re: [PATCH 2/5] blk-crypto-fallback: consolidate static variables
From: Christoph Hellwig <hch@infradead.org>
Date: 2021-09-16 07:41:09
Also in:
dm-devel, linux-mmc, linux-scsi
From: Christoph Hellwig <hch@infradead.org>
Date: 2021-09-16 07:41:09
Also in:
dm-devel, linux-mmc, linux-scsi
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 :)