* Merging se_dev_entry and se_lun?
@ 2015-06-19 6:40 Hannes Reinecke
2015-06-19 6:56 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Hannes Reinecke @ 2015-06-19 6:40 UTC (permalink / raw)
To: Nicholas A. Bellinger
Cc: target-devel, linux-scsi@vger.kernel.org, Christoph Hellwig,
Andy Grover
Hi Nic,
having done the patch to export 'write_protect' for demo-mode LUNs
I've came across one puzzling item:
struct se_lun uses a list to refer to the underlying se_dev_entry
structures. Which I found rather curious, as from my understanding
'se_lun' is the structure for the mapped LUN (ie the LUN visible to
the initiator) and 'se_dev_entry' is the underlying physical device
as visible to the LUN.
As such I would have expected a 1:1 relationship between both, ie a
simple pointer from se_lun to se_dev_entry.
Having a list here implies that 'se_lun' can have _several_
se_dev_entry structure attached to it, which I found rather curious.
Can you give me an example where this might be the case?
Or can we replace the list with a simple pointer or even merge both?
Reason I'm asking is the lun_access / dev_flags field; it really
looks like it being a duplicate (I would judge 'write_protect' to be
a property of the mapped LUN, and not of the underlying device),
but in either case having it in both places requires a
synchronisation between both, as for demo-mode LUNs we can only
change it via se_lun, and for others we have to change it via the
se_dev_entry.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Merging se_dev_entry and se_lun?
2015-06-19 6:40 Merging se_dev_entry and se_lun? Hannes Reinecke
@ 2015-06-19 6:56 ` Christoph Hellwig
2015-06-19 13:21 ` Hannes Reinecke
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2015-06-19 6:56 UTC (permalink / raw)
To: Hannes Reinecke
Cc: Nicholas A. Bellinger, target-devel, linux-scsi@vger.kernel.org,
Andy Grover
On Fri, Jun 19, 2015 at 08:40:23AM +0200, Hannes Reinecke wrote:
> Having a list here implies that 'se_lun' can have _several_
> se_dev_entry structure attached to it, which I found rather curious.
>
> Can you give me an example where this might be the case?
> Or can we replace the list with a simple pointer or even merge both?
Each initiator has it's own dev entry.
What might make sense with the new list-based dev entry handling is to
merge the se_lun_acl and se_dev_entry, but it would be a fair amount of
work.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Merging se_dev_entry and se_lun?
2015-06-19 6:56 ` Christoph Hellwig
@ 2015-06-19 13:21 ` Hannes Reinecke
2015-06-19 13:58 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Hannes Reinecke @ 2015-06-19 13:21 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Nicholas A. Bellinger, target-devel, linux-scsi@vger.kernel.org,
Andy Grover
On 06/19/2015 08:56 AM, Christoph Hellwig wrote:
> On Fri, Jun 19, 2015 at 08:40:23AM +0200, Hannes Reinecke wrote:
>> Having a list here implies that 'se_lun' can have _several_
>> se_dev_entry structure attached to it, which I found rather curious.
>>
>> Can you give me an example where this might be the case?
>> Or can we replace the list with a simple pointer or even merge both?
>
> Each initiator has it's own dev entry.
>
But isn't 'se_lun' per initiator, too?
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Merging se_dev_entry and se_lun?
2015-06-19 13:21 ` Hannes Reinecke
@ 2015-06-19 13:58 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2015-06-19 13:58 UTC (permalink / raw)
To: Hannes Reinecke
Cc: Christoph Hellwig, Nicholas A. Bellinger, target-devel,
linux-scsi@vger.kernel.org, Andy Grover
On Fri, Jun 19, 2015 at 03:21:27PM +0200, Hannes Reinecke wrote:
> > Each initiator has it's own dev entry.
> >
> But isn't 'se_lun' per initiator, too?
No.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-19 13:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-19 6:40 Merging se_dev_entry and se_lun? Hannes Reinecke
2015-06-19 6:56 ` Christoph Hellwig
2015-06-19 13:21 ` Hannes Reinecke
2015-06-19 13:58 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox