From: Sagi Grimberg <sagig@dev.mellanox.co.il>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>,
Sagi Grimberg <sagig@mellanox.com>
Cc: target-devel@vger.kernel.org, linux-scsi@vger.kernel.org,
Bart Van Assche <bart.vanassche@sandisk.com>,
Christoph Hellwig <hch@infradead.org>,
Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH v3 0/5] Target sense data handling modifications
Date: Tue, 7 Jul 2015 09:18:14 +0300 [thread overview]
Message-ID: <559B6F26.7050006@dev.mellanox.co.il> (raw)
In-Reply-To: <1436223065.6666.7.camel@haakon3.risingtidesystems.com>
On 7/7/2015 1:51 AM, Nicholas A. Bellinger wrote:
> On Mon, 2015-07-06 at 16:15 +0300, Sagi Grimberg wrote:
>> 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 wrong setting of t10-pi errors
>> (non descriptor format).
>>
>> 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: Fix wrong setting of sense format 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 | 399 ++++++++++++---------------------
>> include/scsi/scsi_common.h | 5 +
>> include/scsi/scsi_eh.h | 7 +-
>> include/target/target_core_base.h | 1 +
>> 7 files changed, 256 insertions(+), 384 deletions(-)
>>
>
> Nice series to make scsi-core and target-core use common code. ;)
>
> Applied to target-pending/for-next.
>
> hch + jejb, please let me know if you have any objections to taking this
> through target-pending.
Can you please fold into patch #5 this change suggested by Bart:
diff --git a/drivers/target/target_core_transport.c
b/drivers/target/target_core_transport.c
index 79bb8d1..9c34937 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2625,7 +2625,7 @@ struct sense_info {
u8 asc;
u8 ascq;
bool add_sector_info;
- int desc_format;
+ bool desc_format;
};
static const struct sense_info sense_info_table[] = {
@@ -2709,21 +2709,21 @@ static const struct sense_info
sense_info_table[] = {
.asc = 0x10,
.ascq = 0x01, /* LOGICAL BLOCK GUARD CHECK FAILED */
.add_sector_info = true,
- .desc_format = 1,
+ .desc_format = true,
},
[TCM_LOGICAL_BLOCK_APP_TAG_CHECK_FAILED] = {
.key = ILLEGAL_REQUEST,
.asc = 0x10,
.ascq = 0x02, /* LOGICAL BLOCK APPLICATION TAG CHECK
FAILED */
.add_sector_info = true,
- .desc_format = 1,
+ .desc_format = true,
},
[TCM_LOGICAL_BLOCK_REF_TAG_CHECK_FAILED] = {
.key = ILLEGAL_REQUEST,
.asc = 0x10,
.ascq = 0x03, /* LOGICAL BLOCK REFERENCE TAG CHECK
FAILED */
.add_sector_info = true,
- .desc_format = 1,
+ .desc_format = true,
},
[TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE] = {
/*
--
Thanks!
next prev parent reply other threads:[~2015-07-07 6:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 13:15 [PATCH v3 0/5] Target sense data handling modifications Sagi Grimberg
2015-07-06 13:15 ` [PATCH v3 1/5] target: Inline transport_get_sense_codes() Sagi Grimberg
2015-07-06 13:15 ` [PATCH v3 2/5] target: Split transport_send_check_condition_and_sense() Sagi Grimberg
2015-07-08 10:15 ` Christoph Hellwig
2015-07-08 10:24 ` Sagi Grimberg
2015-07-06 13:15 ` [PATCH v3 3/5] scsi: Move sense handling routines to scsi_common Sagi Grimberg
2015-07-06 15:25 ` Bart Van Assche
2015-07-08 10:16 ` Christoph Hellwig
2015-07-06 13:15 ` [PATCH v3 4/5] target: Use scsi helpers to build the sense data correctly Sagi Grimberg
2015-07-08 10:17 ` Christoph Hellwig
2015-07-08 10:23 ` Sagi Grimberg
2015-07-06 13:15 ` [PATCH v3 5/5] target: Fix wrong setting of sense format for PI errors Sagi Grimberg
2015-07-06 15:28 ` Bart Van Assche
2015-07-06 16:14 ` Sagi Grimberg
2015-07-06 16:22 ` Bart Van Assche
2015-07-08 10:19 ` Christoph Hellwig
2015-07-08 10:36 ` Sagi Grimberg
2015-07-08 10:49 ` Christoph Hellwig
2015-07-08 10:59 ` Hannes Reinecke
2015-07-08 11:14 ` Sagi Grimberg
2015-07-08 12:59 ` Sagi Grimberg
2015-07-08 11:44 ` Christoph Hellwig
2015-07-08 12:02 ` Sagi Grimberg
2015-07-06 22:51 ` [PATCH v3 0/5] Target sense data handling modifications Nicholas A. Bellinger
2015-07-07 6:18 ` Sagi Grimberg [this message]
2015-07-07 6:48 ` Nicholas A. Bellinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=559B6F26.7050006@dev.mellanox.co.il \
--to=sagig@dev.mellanox.co.il \
--cc=bart.vanassche@sandisk.com \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=sagig@mellanox.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.