diff --git a/scst/src/scst_copy_mgr.c b/scst/src/scst_copy_mgr.c index 68e081b8a..fd1f35e62 100644 --- a/scst/src/scst_copy_mgr.c +++ b/scst/src/scst_copy_mgr.c @@ -2669,8 +2669,13 @@ void scst_cm_update_dev(struct scst_device *dev) spin_unlock_bh(&dev->dev_lock); lun = scst_cm_get_lun(dev); - if (WARN_ON_ONCE(lun == SCST_MAX_LUN)) + if (lun == SCST_MAX_LUN) { + /* + * Verify that scst_unregister_virtual_device() is in progress. + */ + WARN_ON_ONCE(!dev->remove_completion); goto out_unblock; + } rc = scst_cm_send_init_inquiry(dev, lun, NULL); if (rc != 0) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 1f7f78179..bfcec05f7 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -11216,7 +11216,7 @@ static int get_cdb_info_serv_act_in(struct scst_cmd *cmd, SCST_REG_RESERVE_ALLOWED | SCST_WRITE_EXCL_ALLOWED | SCST_EXCL_ACCESS_ALLOWED; - cmd->log2_max_buf_len = 5; + cmd->log2_max_buf_len = 7; break; case SAI_GET_LBA_STATUS: cmd->op_name = "GET LBA STATUS";