[dm-devel] [Bcache v13 09/16] Bcache: generic utility code

Kent Overstreet koverstreet at google.com
Wed May 23 15:33:30 UTC 2012


On Wed, May 23, 2012 at 11:15 AM, Vivek Goyal <vgoyal at redhat.com> wrote:
> Another thing is that keep variable names consistent. Last time I looked,
> same name "c" was being used to represent cached_dev or cache_set or
> something else too. If we keep variable name same to represent same
> data structure, it becomes easier to read the code. I was totally lost
> and always had to go back to figure out what "c" is representing, what
> "d" is representing etc.

Yeah, those examples are both cases where the struct was split -
struct cache was broken into struct cache and cache_set, struct
bcache_device was split off from cached_dev.

I've been fixing things as I go along, but probably I should just do
them all at once and be done with it, damn the code churn.




More information about the dm-devel mailing list