]> bbs.cooldavid.org Git - net-next-2.6.git/commit - drivers/scsi/sr.c
[SCSI] hide EH backup data outside the scsi_cmnd
authorChristoph Hellwig <hch@lst.de>
Sat, 8 Jul 2006 18:42:15 +0000 (20:42 +0200)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sun, 9 Jul 2006 16:56:44 +0000 (11:56 -0500)
commit631c228cd09bd5b93090fa60bd9803ec14aa0586
tree3d15819bbdc30e291c342e06a0694184b1616996
parentae0fda0cdf009731a33f031f86df8566f1977ffe
[SCSI] hide EH backup data outside the scsi_cmnd

Currently struct scsi_cmnd has various fields that are used to backup
original data after the corresponding fields have been overridden for
EH commands.  This means drivers can easily get at it and misuse it.
Due to the old_ naming this doesn't happen for most of them, but two
that have different names have been used wrong a lot (see previous
patch).  Another downside is that they unessecarily bloat the scsi_cmnd
size.

This patch moves them onstack in scsi_send_eh_cmnd to fix those two
issues aswell as allowing future EH fixes like moving the EH command
submissions to use SG lists like everything else.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aha152x.c
drivers/scsi/scsi.c
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_priv.h
drivers/scsi/sd.c
drivers/scsi/sr.c
include/scsi/scsi_cmnd.h