Re: [PATCH 02/15] scsi: add scsi_{get,put}_internal_cmd() helper

Martin K. Petersen
2021-11-30T04:17:58Z

Hannes,

> I have oriented myself at __scsi_execute(), which also has
> 'data_direction' as an integer. Presumably to avoid header clutter.
> Martin?

Just a vestige from ancient times. I really hate scsi_execute() and its
10,000 randomly ordered arguments. The more sanity checking we have in
that department, the better.

At some point I proposed having scsi_execute() take a single struct as
argument to get better input validation. I've lost count how many things
have been broken because of misordered arguments to this function.
Backporting patches almost inevitably causes regressions because of this
interface.

--
Martin K. Petersen Oracle Linux Engineering