Re: [PATCH 02/32] target: Don't keep looping in report_luns if too big

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <agrover@xxxxxxxxxx>
> ---
>  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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux