linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/5] Target sense data handling modifications
@ 2015-07-08 14:58 Sagi Grimberg
  2015-07-08 14:58 ` [PATCH v4 1/5] target: Inline transport_get_sense_codes() Sagi Grimberg
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Sagi Grimberg @ 2015-07-08 14:58 UTC (permalink / raw)
  To: linux-scsi, target-devel
  Cc: Christoph Hellwig, Nicholas A. Bellinger, Hannes Reinecke,
	Bart Van Assche, Martin K. Petersen, James Bottomley

This patch set modifies the target sense data handling.
First, cleanup transport_send_check_condition_and_sense()
by splitting the sense translation to a separate function.
Second, convert sense reason the switch statement to a table
driven code. Third, Use scsi common helpers to correctly set
the sense buffer. Last, Fix sense key wrong setting of t10-pi
errors.

Changes from v2:
- Removed wrong patch 5/5 for descriptor format sense data
- Added a patch (5/5) that fixes wrong sense key for PI errors
- Incorporate hch's comments
- Added Reviewed-by tags

Changes from v2:
- Pass sense_reason_t to scsi_translate_sense()
- Split patch 3:
  1) move the helpers to scsi_common.c
  2) use helpers in the target code
  3) always use descriptor-type sense data for PI errors

Changes from v1:
- Added Reviewed-by tags for patches 1,2
- Fixed compilation error after testing patch #3 on scsi/for-next
  branch. Moved scsi_sense_desc_find() to scsi_common as well (dependency)
  and also moved <asm/unaligned.h> include to scsi_common.h

Changes from v0:
- Added Bart's patches and converted my patch to apply over his
- Moved scsi sense helpers to scsi_common

Bart Van Assche (2):
  target: Inline transport_get_sense_codes()
  target: Split transport_send_check_condition_and_sense()

Sagi Grimberg (3):
  scsi: Move sense handling routines to scsi_common
  target: Use scsi helpers to build the sense data correctly
  target: Return ABORTED_COMMAND sense key for PI errors

 drivers/scsi/scsi_common.c             |  98 ++++++++
 drivers/scsi/scsi_error.c              |  99 +--------
 drivers/target/target_core_spc.c       |  31 +--
 drivers/target/target_core_transport.c | 396 ++++++++++++---------------------
 include/scsi/scsi_common.h             |   5 +
 include/scsi/scsi_eh.h                 |   7 +-
 6 files changed, 252 insertions(+), 384 deletions(-)

-- 
1.8.4.3


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-07-24  5:16 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08 14:58 [PATCH v4 0/5] Target sense data handling modifications Sagi Grimberg
2015-07-08 14:58 ` [PATCH v4 1/5] target: Inline transport_get_sense_codes() Sagi Grimberg
2015-07-09 16:13   ` Martin K. Petersen
2015-07-08 14:58 ` [PATCH v4 2/5] target: Split transport_send_check_condition_and_sense() Sagi Grimberg
2015-07-09 16:15   ` Martin K. Petersen
2015-07-08 14:58 ` [PATCH v4 3/5] scsi: Move sense handling routines to scsi_common Sagi Grimberg
2015-07-08 15:06   ` Hannes Reinecke
2015-07-08 15:23     ` Sagi Grimberg
2015-07-10  6:39       ` Hannes Reinecke
2015-07-09 16:16   ` Martin K. Petersen
2015-07-08 14:58 ` [PATCH v4 4/5] target: Use scsi helpers to build the sense data correctly Sagi Grimberg
2015-07-08 15:07   ` Hannes Reinecke
2015-07-09 16:17   ` Martin K. Petersen
2015-07-08 14:58 ` [PATCH v4 5/5] target: Return ABORTED_COMMAND sense key for PI errors Sagi Grimberg
2015-07-08 15:07   ` Hannes Reinecke
2015-07-09 16:21   ` Martin K. Petersen
2015-07-24  5:16 ` [PATCH v4 0/5] Target sense data handling modifications Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).