On Fri, 2013-12-13 at 15:58 -0800, Andy Grover wrote:
> All further loops will still fail the conditional so just bail right
> away.
> 
> Signed-off-by: Andy Grover <agro...@redhat.com>
> ---
>  drivers/target/target_core_spc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/target/target_core_spc.c 
> b/drivers/target/target_core_spc.c
> index 021c3f4..8f52974 100644
> --- a/drivers/target/target_core_spc.c
> +++ b/drivers/target/target_core_spc.c
> @@ -1162,7 +1162,7 @@ sense_reason_t spc_emulate_report_luns(struct se_cmd 
> *cmd)
>                */
>               lun_count++;
>               if ((offset + 8) > cmd->data_length)
> -                     continue;
> +                     break;
>  
>               int_to_scsilun(deve->mapped_lun, (struct scsi_lun 
> *)&buf[offset]);
>               offset += 8;

NAK.

REPORT_LUNS is supposed to return the total lun_count, even if there is
no more buffer space to fill..

This is how the initiator knows it should send another REPORT_LUNS with
a larger payload to receive the complete layout.

--nab

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to