Re: Why LUN0?

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

 



2012/12/10 Braun, David <David.Braun@xxxxxxx>:
> By "like today the dummy-LUN0 will automatically be replaced" you mean with your patch - right?
>
> My --force code was very simple - basically a 2 line change. The other changes are just prints. Here's what I did.

David,

It's not as simple as that, as the dummy device mapped to LUN 0 is
also abused to handle SCSI requests sent to LUNs that are not backed
by a device:

int target_cmd_queue(int tid, struct scsi_cmd *cmd)
{
        /* ... snip ... */
	cmd->dev = device_lookup(target, dev_id);
	/* use LUN0 */
	if (!cmd->dev)
		cmd->dev = list_first_entry(&target->device_list,
					    struct scsi_lu,
					    device_siblings);

        /* ... snip ... */

	/*
	 * Call struct scsi_lu->cmd_perform() that will either be setup for
	 * internal or passthrough CDB processing using 2 functions below.
	 */
	return cmd->dev->cmd_perform(tid, cmd);
}

This is addressed by the patch Boaz is carrying in his tree.

HTH,
Arne
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux