Re: [PATCH 2/5] blk-crypto-fallback: consolidate static variables
From: Eric Biggers <ebiggers@kernel.org>
Date: 2021-09-16 17:44:13
Also in:
dm-devel, linux-mmc, linux-scsi
From: Eric Biggers <ebiggers@kernel.org>
Date: 2021-09-16 17:44:13
Also in:
dm-devel, linux-mmc, linux-scsi
On Thu, Sep 16, 2021 at 08:39:54AM +0100, Christoph Hellwig wrote:
On Wed, Sep 15, 2021 at 10:50:13AM -0700, Eric Biggers wrote:quoted
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.quoted
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 :)
The names are still pretty long even with the second "crypt" dropped from those two. How about just "fallback_*"? It might be clear enough from the context. Anyway, I've dropped this patch from the series for now. This can be done later we can agree on which approach to take. - Eric