* [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements
@ 2014-12-04 16:49 Ewan D. Milne
2014-12-04 16:49 ` [PATCH 1/4] scsi_debug: Fixed missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case Ewan D. Milne
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: Ewan D. Milne @ 2014-12-04 16:49 UTC (permalink / raw)
To: linux-scsi
From: "Ewan D. Milne" <emilne@redhat.com>
This patch series fixes a couple of problems in the code to generate UAs
when "virtual_gb" is changed, and adds the generation of a UA when "max_luns"
is changed. It also adds the generation of a UA when a WRITE BUFFER
command is issued.
Patches were generated against jejb for-next branch, with Doug Gilbert's
earlier patches applied.
Ewan D. Milne (4):
scsi_debug: Fixed missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case
scsi_debug: Added taking of sdebug_host_list_lock when changing
capacity
scsi_debug: Add REPORTED LUNS DATA HAS CHANGED Unit Attention
scsi_debug: Implement WRITE BUFFER command
drivers/scsi/scsi_debug.c | 131 ++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 128 insertions(+), 3 deletions(-)
--
1.7.11.7
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/4] scsi_debug: Fixed missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case
2014-12-04 16:49 [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements Ewan D. Milne
@ 2014-12-04 16:49 ` Ewan D. Milne
2014-12-06 16:27 ` Douglas Gilbert
2014-12-04 16:49 ` [PATCH 2/4] scsi_debug: Added taking of sdebug_host_list_lock when changing capacity Ewan D. Milne
` (4 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Ewan D. Milne @ 2014-12-04 16:49 UTC (permalink / raw)
To: linux-scsi
From: "Ewan D. Milne" <emilne@redhat.com>
This eliminates a superfluous log message when the capacity is changed:
"check_readiness: unexpected unit attention code=3"
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
---
drivers/scsi/scsi_debug.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index aa4b6b8..397cc10 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -817,6 +817,7 @@ static int check_readiness(struct scsi_cmnd *SCpnt, int uas_only,
UA_CHANGED_ASC, CAPACITY_CHANGED_ASCQ);
if (debug)
cp = "capacity data changed";
+ break;
default:
pr_warn("%s: unexpected unit attention code=%d\n",
__func__, k);
--
1.7.11.7
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/4] scsi_debug: Added taking of sdebug_host_list_lock when changing capacity
2014-12-04 16:49 [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements Ewan D. Milne
2014-12-04 16:49 ` [PATCH 1/4] scsi_debug: Fixed missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case Ewan D. Milne
@ 2014-12-04 16:49 ` Ewan D. Milne
2014-12-06 16:27 ` Douglas Gilbert
2014-12-04 16:49 ` [PATCH 3/4] scsi_debug: Add REPORTED LUNS DATA HAS CHANGED Unit Attention Ewan D. Milne
` (3 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Ewan D. Milne @ 2014-12-04 16:49 UTC (permalink / raw)
To: linux-scsi
From: "Ewan D. Milne" <emilne@redhat.com>
All other traversals of the sdebug_host_list take the lock.
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
---
drivers/scsi/scsi_debug.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 397cc10..1a11466 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -4439,6 +4439,7 @@ static ssize_t virtual_gb_store(struct device_driver *ddp, const char *buf,
struct sdebug_host_info *sdhp;
struct sdebug_dev_info *dp;
+ spin_lock(&sdebug_host_list_lock);
list_for_each_entry(sdhp, &sdebug_host_list,
host_list) {
list_for_each_entry(dp, &sdhp->dev_info_list,
@@ -4447,6 +4448,7 @@ static ssize_t virtual_gb_store(struct device_driver *ddp, const char *buf,
dp->uas_bm);
}
}
+ spin_unlock(&sdebug_host_list_lock);
}
return count;
}
--
1.7.11.7
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/4] scsi_debug: Add REPORTED LUNS DATA HAS CHANGED Unit Attention
2014-12-04 16:49 [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements Ewan D. Milne
2014-12-04 16:49 ` [PATCH 1/4] scsi_debug: Fixed missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case Ewan D. Milne
2014-12-04 16:49 ` [PATCH 2/4] scsi_debug: Added taking of sdebug_host_list_lock when changing capacity Ewan D. Milne
@ 2014-12-04 16:49 ` Ewan D. Milne
2014-12-06 16:28 ` Douglas Gilbert
2014-12-04 16:49 ` [PATCH 4/4] scsi_debug: Implement WRITE BUFFER command Ewan D. Milne
` (2 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Ewan D. Milne @ 2014-12-04 16:49 UTC (permalink / raw)
To: linux-scsi
From: "Ewan D. Milne" <emilne@redhat.com>
Generate a REPORTED LUNS DATA HAS CHANGED Unit Attention if
sysfs "max_luns" is used to change the number of scsi_debug LUNs.
This is only done if scsi_debug_scsi_level is SPC-3 or above.
Additionally, implement SPC-4 behavior which only generates
this Unit Attention on the first LUN on the target to receive
a command after the change. This condition is cleared when
a REPORT LUNS command is received.
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
---
drivers/scsi/scsi_debug.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 55 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 1a11466..648abf2 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -80,6 +80,8 @@ static const char *scsi_debug_version_date = "20141022";
#define INVALID_FIELD_IN_PARAM_LIST 0x26
#define UA_RESET_ASC 0x29
#define UA_CHANGED_ASC 0x2a
+#define TARGET_CHANGED_ASC 0x3f
+#define LUNS_CHANGED_ASCQ 0x0e
#define INSUFF_RES_ASC 0x55
#define INSUFF_RES_ASCQ 0x3
#define POWER_ON_RESET_ASCQ 0x0
@@ -181,7 +183,8 @@ static const char *scsi_debug_version_date = "20141022";
#define SDEBUG_UA_BUS_RESET 1
#define SDEBUG_UA_MODE_CHANGED 2
#define SDEBUG_UA_CAPACITY_CHANGED 3
-#define SDEBUG_NUM_UAS 4
+#define SDEBUG_UA_LUNS_CHANGED 4
+#define SDEBUG_NUM_UAS 5
/* for check_readiness() */
#define UAS_ONLY 1 /* check for UAs only */
@@ -783,6 +786,22 @@ static int scsi_debug_ioctl(struct scsi_device *dev, int cmd, void __user *arg)
/* return -ENOTTY; // correct return but upsets fdisk */
}
+static int clear_luns_changed_on_target(struct sdebug_dev_info *devip)
+{
+ struct sdebug_host_info *sdhp;
+ struct sdebug_dev_info *dp;
+
+ spin_lock(&sdebug_host_list_lock);
+ list_for_each_entry(sdhp, &sdebug_host_list, host_list) {
+ list_for_each_entry(dp, &sdhp->dev_info_list, dev_list) {
+ if ((devip->sdbg_host == dp->sdbg_host) &&
+ (devip->target == dp->target))
+ clear_bit(SDEBUG_UA_LUNS_CHANGED, dp->uas_bm);
+ }
+ }
+ spin_unlock(&sdebug_host_list_lock);
+}
+
static int check_readiness(struct scsi_cmnd *SCpnt, int uas_only,
struct sdebug_dev_info * devip)
{
@@ -818,6 +837,23 @@ static int check_readiness(struct scsi_cmnd *SCpnt, int uas_only,
if (debug)
cp = "capacity data changed";
break;
+ case SDEBUG_UA_LUNS_CHANGED:
+ /*
+ * SPC-3 behavior is to report a UNIT ATTENTION with
+ * ASC/ASCQ REPORTED LUNS DATA HAS CHANGED on every LUN
+ * on the target, until a REPORT LUNS command is
+ * received. SPC-4 behavior is to report it only once.
+ * NOTE: scsi_debug_scsi_level does not use the same
+ * values as struct scsi_device->scsi_level.
+ */
+ if (scsi_debug_scsi_level >= 6) /* SPC-4 and above */
+ clear_luns_changed_on_target(devip);
+ mk_sense_buffer(SCpnt, UNIT_ATTENTION,
+ TARGET_CHANGED_ASC,
+ LUNS_CHANGED_ASCQ);
+ if (debug)
+ cp = "reported luns data has changed";
+ break;
default:
pr_warn("%s: unexpected unit attention code=%d\n",
__func__, k);
@@ -3229,6 +3265,7 @@ static int resp_report_luns(struct scsi_cmnd * scp,
unsigned char arr[SDEBUG_RLUN_ARR_SZ];
unsigned char * max_addr;
+ clear_luns_changed_on_target(devip);
alloc_len = cmd[9] + (cmd[8] << 8) + (cmd[7] << 16) + (cmd[6] << 24);
shortish = (alloc_len < 4);
if (shortish || (select_report > 2)) {
@@ -4369,10 +4406,27 @@ static ssize_t max_luns_store(struct device_driver *ddp, const char *buf,
size_t count)
{
int n;
+ bool changed;
if ((count > 0) && (1 == sscanf(buf, "%d", &n)) && (n >= 0)) {
+ changed = (scsi_debug_max_luns != n);
scsi_debug_max_luns = n;
sdebug_max_tgts_luns();
+ if (changed && (scsi_debug_scsi_level >= 5)) { /* >= SPC-3 */
+ struct sdebug_host_info *sdhp;
+ struct sdebug_dev_info *dp;
+
+ spin_lock(&sdebug_host_list_lock);
+ list_for_each_entry(sdhp, &sdebug_host_list,
+ host_list) {
+ list_for_each_entry(dp, &sdhp->dev_info_list,
+ dev_list) {
+ set_bit(SDEBUG_UA_LUNS_CHANGED,
+ dp->uas_bm);
+ }
+ }
+ spin_unlock(&sdebug_host_list_lock);
+ }
return count;
}
return -EINVAL;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/4] scsi_debug: Implement WRITE BUFFER command
2014-12-04 16:49 [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements Ewan D. Milne
` (2 preceding siblings ...)
2014-12-04 16:49 ` [PATCH 3/4] scsi_debug: Add REPORTED LUNS DATA HAS CHANGED Unit Attention Ewan D. Milne
@ 2014-12-04 16:49 ` Ewan D. Milne
2014-12-06 16:28 ` Douglas Gilbert
2014-12-06 16:38 ` [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements Douglas Gilbert
2014-12-15 13:45 ` Christoph Hellwig
5 siblings, 1 reply; 11+ messages in thread
From: Ewan D. Milne @ 2014-12-04 16:49 UTC (permalink / raw)
To: linux-scsi
From: "Ewan D. Milne" <emilne@redhat.com>
Accept the WRITE BUFFER command and do nothing other than
set the appropriate "microcode has been changed" UA on the LU.
>From an earlier patch by Doug Gilbert.
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
---
drivers/scsi/scsi_debug.c | 74 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 71 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 648abf2..5ac04d6 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -93,6 +93,8 @@ static const char *scsi_debug_version_date = "20141022";
#define THRESHOLD_EXCEEDED 0x5d
#define LOW_POWER_COND_ON 0x5e
#define MISCOMPARE_VERIFY_ASC 0x1d
+#define MICROCODE_CHANGED_ASCQ 0x1 /* with TARGET_CHANGED_ASC */
+#define MICROCODE_CHANGED_WO_RESET_ASCQ 0x16
/* Additional Sense Code Qualifier (ASCQ) */
#define ACK_NAK_TO 0x3
@@ -184,7 +186,9 @@ static const char *scsi_debug_version_date = "20141022";
#define SDEBUG_UA_MODE_CHANGED 2
#define SDEBUG_UA_CAPACITY_CHANGED 3
#define SDEBUG_UA_LUNS_CHANGED 4
-#define SDEBUG_NUM_UAS 5
+#define SDEBUG_UA_MICROCODE_CHANGED 5 /* simulate firmware change */
+#define SDEBUG_UA_MICROCODE_CHANGED_WO_RESET 6
+#define SDEBUG_NUM_UAS 7
/* for check_readiness() */
#define UAS_ONLY 1 /* check for UAs only */
@@ -330,6 +334,7 @@ static int resp_write_same_10(struct scsi_cmnd *, struct sdebug_dev_info *);
static int resp_write_same_16(struct scsi_cmnd *, struct sdebug_dev_info *);
static int resp_xdwriteread_10(struct scsi_cmnd *, struct sdebug_dev_info *);
static int resp_comp_write(struct scsi_cmnd *, struct sdebug_dev_info *);
+static int resp_write_buffer(struct scsi_cmnd *, struct sdebug_dev_info *);
struct opcode_info_t {
u8 num_attached; /* 0 if this is it (i.e. a leaf); use 0xff
@@ -484,8 +489,9 @@ static const struct opcode_info_t opcode_info_arr[SDEB_I_LAST_ELEMENT + 1] = {
{0, 0x53, 0, F_D_IN | F_D_OUT | FF_DIRECT_IO, resp_xdwriteread_10,
NULL, {10, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xc7,
0, 0, 0, 0, 0, 0} },
- {0, 0, 0, F_INV_OP | FF_RESPOND, NULL, NULL, /* WRITE_BUFFER */
- {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} },
+ {0, 0x3b, 0, F_D_OUT_MAYBE, resp_write_buffer, NULL,
+ {10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0, 0,
+ 0, 0, 0, 0} }, /* WRITE_BUFFER */
{1, 0x41, 0, F_D_OUT_MAYBE | FF_DIRECT_IO, resp_write_same_10,
write_same_iarr, {10, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xff,
0xff, 0xc7, 0, 0, 0, 0, 0, 0} },
@@ -837,6 +843,19 @@ static int check_readiness(struct scsi_cmnd *SCpnt, int uas_only,
if (debug)
cp = "capacity data changed";
break;
+ case SDEBUG_UA_MICROCODE_CHANGED:
+ mk_sense_buffer(SCpnt, UNIT_ATTENTION,
+ TARGET_CHANGED_ASC, MICROCODE_CHANGED_ASCQ);
+ if (debug)
+ cp = "microcode has been changed";
+ break;
+ case SDEBUG_UA_MICROCODE_CHANGED_WO_RESET:
+ mk_sense_buffer(SCpnt, UNIT_ATTENTION,
+ TARGET_CHANGED_ASC,
+ MICROCODE_CHANGED_WO_RESET_ASCQ);
+ if (debug)
+ cp = "microcode has been changed without reset";
+ break;
case SDEBUG_UA_LUNS_CHANGED:
/*
* SPC-3 behavior is to report a UNIT ATTENTION with
@@ -3070,6 +3089,55 @@ resp_write_same_16(struct scsi_cmnd *scp, struct sdebug_dev_info *devip)
return resp_write_same(scp, lba, num, ei_lba, unmap, ndob);
}
+/* Note the mode field is in the same position as the (lower) service action
+ * field. For the Report supported operation codes command, SPC-4 suggests
+ * each mode of this command should be reported separately; for future. */
+static int
+resp_write_buffer(struct scsi_cmnd *scp, struct sdebug_dev_info *devip)
+{
+ u8 *cmd = scp->cmnd;
+ struct scsi_device *sdp = scp->device;
+ struct sdebug_dev_info *dp;
+ u8 mode;
+
+ mode = cmd[1] & 0x1f;
+ switch (mode) {
+ case 0x4: /* download microcode (MC) and activate (ACT) */
+ /* set UAs on this device only */
+ set_bit(SDEBUG_UA_BUS_RESET, devip->uas_bm);
+ set_bit(SDEBUG_UA_MICROCODE_CHANGED, devip->uas_bm);
+ break;
+ case 0x5: /* download MC, save and ACT */
+ set_bit(SDEBUG_UA_MICROCODE_CHANGED_WO_RESET, devip->uas_bm);
+ break;
+ case 0x6: /* download MC with offsets and ACT */
+ /* set UAs on most devices (LUs) in this target */
+ list_for_each_entry(dp,
+ &devip->sdbg_host->dev_info_list,
+ dev_list)
+ if (dp->target == sdp->id) {
+ set_bit(SDEBUG_UA_BUS_RESET, dp->uas_bm);
+ if (devip != dp)
+ set_bit(SDEBUG_UA_MICROCODE_CHANGED,
+ dp->uas_bm);
+ }
+ break;
+ case 0x7: /* download MC with offsets, save, and ACT */
+ /* set UA on all devices (LUs) in this target */
+ list_for_each_entry(dp,
+ &devip->sdbg_host->dev_info_list,
+ dev_list)
+ if (dp->target == sdp->id)
+ set_bit(SDEBUG_UA_MICROCODE_CHANGED_WO_RESET,
+ dp->uas_bm);
+ break;
+ default:
+ /* do nothing for this command for other mode values */
+ break;
+ }
+ return 0;
+}
+
static int
resp_comp_write(struct scsi_cmnd *scp, struct sdebug_dev_info *devip)
{
--
1.7.11.7
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/4] scsi_debug: Fixed missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case
2014-12-04 16:49 ` [PATCH 1/4] scsi_debug: Fixed missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case Ewan D. Milne
@ 2014-12-06 16:27 ` Douglas Gilbert
0 siblings, 0 replies; 11+ messages in thread
From: Douglas Gilbert @ 2014-12-06 16:27 UTC (permalink / raw)
To: Ewan D. Milne, linux-scsi
On 14-12-04 11:49 AM, Ewan D. Milne wrote:
> From: "Ewan D. Milne" <emilne@redhat.com>
>
> This eliminates a superfluous log message when the capacity is changed:
>
> "check_readiness: unexpected unit attention code=3"
>
> Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Thanks.
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/4] scsi_debug: Added taking of sdebug_host_list_lock when changing capacity
2014-12-04 16:49 ` [PATCH 2/4] scsi_debug: Added taking of sdebug_host_list_lock when changing capacity Ewan D. Milne
@ 2014-12-06 16:27 ` Douglas Gilbert
0 siblings, 0 replies; 11+ messages in thread
From: Douglas Gilbert @ 2014-12-06 16:27 UTC (permalink / raw)
To: Ewan D. Milne, linux-scsi
On 14-12-04 11:49 AM, Ewan D. Milne wrote:
> From: "Ewan D. Milne" <emilne@redhat.com>
>
> All other traversals of the sdebug_host_list take the lock.
>
> Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Thanks.
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/4] scsi_debug: Add REPORTED LUNS DATA HAS CHANGED Unit Attention
2014-12-04 16:49 ` [PATCH 3/4] scsi_debug: Add REPORTED LUNS DATA HAS CHANGED Unit Attention Ewan D. Milne
@ 2014-12-06 16:28 ` Douglas Gilbert
0 siblings, 0 replies; 11+ messages in thread
From: Douglas Gilbert @ 2014-12-06 16:28 UTC (permalink / raw)
To: Ewan D. Milne, linux-scsi
On 14-12-04 11:49 AM, Ewan D. Milne wrote:
> From: "Ewan D. Milne" <emilne@redhat.com>
>
> Generate a REPORTED LUNS DATA HAS CHANGED Unit Attention if
> sysfs "max_luns" is used to change the number of scsi_debug LUNs.
> This is only done if scsi_debug_scsi_level is SPC-3 or above.
> Additionally, implement SPC-4 behavior which only generates
> this Unit Attention on the first LUN on the target to receive
> a command after the change. This condition is cleared when
> a REPORT LUNS command is received.
>
> Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Tested-by: Douglas Gilbert <dgilbert@interlog.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/4] scsi_debug: Implement WRITE BUFFER command
2014-12-04 16:49 ` [PATCH 4/4] scsi_debug: Implement WRITE BUFFER command Ewan D. Milne
@ 2014-12-06 16:28 ` Douglas Gilbert
0 siblings, 0 replies; 11+ messages in thread
From: Douglas Gilbert @ 2014-12-06 16:28 UTC (permalink / raw)
To: Ewan D. Milne, linux-scsi
On 14-12-04 11:49 AM, Ewan D. Milne wrote:
> From: "Ewan D. Milne" <emilne@redhat.com>
>
> Accept the WRITE BUFFER command and do nothing other than
> set the appropriate "microcode has been changed" UA on the LU.
>
>>From an earlier patch by Doug Gilbert.
>
> Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Tested-by: Douglas Gilbert <dgilbert@interlog.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements
2014-12-04 16:49 [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements Ewan D. Milne
` (3 preceding siblings ...)
2014-12-04 16:49 ` [PATCH 4/4] scsi_debug: Implement WRITE BUFFER command Ewan D. Milne
@ 2014-12-06 16:38 ` Douglas Gilbert
2014-12-15 13:45 ` Christoph Hellwig
5 siblings, 0 replies; 11+ messages in thread
From: Douglas Gilbert @ 2014-12-06 16:38 UTC (permalink / raw)
To: Ewan D. Milne, linux-scsi
On 14-12-04 11:49 AM, Ewan D. Milne wrote:
> From: "Ewan D. Milne" <emilne@redhat.com>
>
> This patch series fixes a couple of problems in the code to generate UAs
> when "virtual_gb" is changed, and adds the generation of a UA when "max_luns"
> is changed. It also adds the generation of a UA when a WRITE BUFFER
> command is issued.
>
> Patches were generated against jejb for-next branch, with Doug Gilbert's
> earlier patches applied.
>
> Ewan D. Milne (4):
> scsi_debug: Fixed missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case
> scsi_debug: Added taking of sdebug_host_list_lock when changing
> capacity
> scsi_debug: Add REPORTED LUNS DATA HAS CHANGED Unit Attention
> scsi_debug: Implement WRITE BUFFER command
>
> drivers/scsi/scsi_debug.c | 131 ++++++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 128 insertions(+), 3 deletions(-)
Great work. I have acked and tested each item (i.e. 1 through 4).
I have some other scsi_debug clean ups (e.g. neuter
the host_lock option) but they can wait until the 3.20 series.
BTW I did notice a small regression compared to the existing
"big switch" version of the scsi_debug driver: the VERIFY and the
PREVENT ALLOW MEDIUM REMOVAL commands were accepted (but did
little). Now they are rejected. If that bites anyone, it could
be corrected as a bug fix in 3.19 .
Doug Gilbert
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements
2014-12-04 16:49 [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements Ewan D. Milne
` (4 preceding siblings ...)
2014-12-06 16:38 ` [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements Douglas Gilbert
@ 2014-12-15 13:45 ` Christoph Hellwig
5 siblings, 0 replies; 11+ messages in thread
From: Christoph Hellwig @ 2014-12-15 13:45 UTC (permalink / raw)
To: Ewan D. Milne; +Cc: linux-scsi
Thanks, applied patch 1 and 2 to drivers-for-3.19, the rest will go
into the 3.20 queue a soon as that opens.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-12-15 13:45 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-04 16:49 [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements Ewan D. Milne
2014-12-04 16:49 ` [PATCH 1/4] scsi_debug: Fixed missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case Ewan D. Milne
2014-12-06 16:27 ` Douglas Gilbert
2014-12-04 16:49 ` [PATCH 2/4] scsi_debug: Added taking of sdebug_host_list_lock when changing capacity Ewan D. Milne
2014-12-06 16:27 ` Douglas Gilbert
2014-12-04 16:49 ` [PATCH 3/4] scsi_debug: Add REPORTED LUNS DATA HAS CHANGED Unit Attention Ewan D. Milne
2014-12-06 16:28 ` Douglas Gilbert
2014-12-04 16:49 ` [PATCH 4/4] scsi_debug: Implement WRITE BUFFER command Ewan D. Milne
2014-12-06 16:28 ` Douglas Gilbert
2014-12-06 16:38 ` [PATCH 0/4] scsi_debug: Unit Attention fixes/enhancements Douglas Gilbert
2014-12-15 13:45 ` Christoph Hellwig
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.