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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:
> > 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 :)

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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux