From 331cc5d28d5c756f6ac9bc0aedb1290ae0c283f8 Mon Sep 17 00:00:00 2001
From: Vladislav Bolkhovitin
At the moment, in scst_vdisk handler command execution function vdisk_do_job() is - overcomplicated and not very performance effective. It would be good to replace all those - ugly "switch" statements by choosing the handler for each SCSI command by indirect - function call on an array of function pointers.
- -I.e., there should be an array vdisk_exec_fns with 256 entries of function pointers:
- -void (*cmd_exec_fn) (struct scst_cmd *cmd)
- -Then vdisk_do_job() should look like
- -static int vdisk_do_job(struct scst_cmd *cmd)
- {
- return vdisk_exec_fns[cmd->cdb[0]](cmd);
- }
-
In the pass-through mode (i.e. using the pass-through device handlers like