[dm-devel] [PATCH 4/6] block: cleanup variable naming in get_max_io_size
Christoph Hellwig
hch at lst.de
Wed Jun 15 06:27:29 UTC 2022
On Tue, Jun 14, 2022 at 09:50:00AM -0700, Bart Van Assche wrote:
> On 6/14/22 02:09, Christoph Hellwig wrote:
>> get_max_io_size has a very odd choice of variables names and
>> initialization patterns. Switch to more descriptive names and more
>> clear initialization of them.
>
> Hmm ... what is so odd about the variable names? I have done my best to
> chose clear and descriptive names when I introduced these names.
Major confusion:
- we have a local variable to hold the queue max sectors value,
but it is callled sectors
- while we have a variable the holds the rounded end of the I/O
range that is called max_sectors
Minor confusion:
- a variable that hold that rounded start of the range has a random
_offset suffix despite not really being an offset
More information about the dm-devel
mailing list