[Stgt-devel] [PATCH] osd avoid memzero

Pete Wyckoff pw
Sat Dec 8 16:31:28 CET 2007

To work around the zeroing of task->data, add VARLEN_CDB as an "IO"
opcode.  It isn't necesssarily, but the only handler of this opcode is
OSD and it does not require zeroing for any of its commands.

Remove this once the spc, sbc, etc. functions that assume a zeroed buffer
have been fixed.

Signed-off-by: Pete Wyckoff <pw at osc.edu>
 usr/scsi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/usr/scsi.c b/usr/scsi.c
index 2bdc0b5..b2db738 100644
--- a/usr/scsi.c
+++ b/usr/scsi.c
@@ -154,6 +154,7 @@ int scsi_is_io_opcode(unsigned char op)
 	case WRITE_16:
 	case VERIFY_16:
 	case WRITE_VERIFY_16:
+	case VARLEN_CDB:  /* not necessarily IO, but does not need allocation */
 		ret = 1;

More information about the stgt mailing list