[Drbd-dev] main.c comments

David Butterfield dab21774 at gmail.com
Tue Jun 18 19:58:54 CEST 2019

>> (1) Isn't the third argument to module_param_named() supposed to be the type of
>>     the second argument?  (But seems to require it as a single token??)
> Yes and no ;-)
> the type of the second argument in this case is a drbd_protocol_version,
> so by naming that as third argument, we point to the "conversion and
> validation functions" for that type.

Aha!  Thanks.  All I was doing was comparing the types at compile-time
and not finding a match.

> again, "details depend on the kernel version"...

Yeah, I'm pretending to be 2.6.32, the minimum supported by DRBD's kernel
compatibility, to minimize the amount of kernel function I have to emulate.

>> (2) The cast avoids a compiler warning about signed/unsigned comparison.
> As long as our kernel compiles complete without warnings, "boring".

OK, I'll set my own warnings back down to the same ones the kernel enables.

For warnings that happen a lot I already disabled them, but there were
three warnings that each was reported only once in 51,444 lines of DRBD
code -- I had figured those conditions were being maintained and not
supposed to be there, so those are the ones I mentioned.

David Butterfield

More information about the drbd-dev mailing list