From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 09/12] target: Convert se_portal_group->tpg_lun_list[] to RCU hlist Date: Wed, 13 May 2015 09:53:10 +0200 Message-ID: <20150513075310.GA23580@lst.de> References: <1431422736-29125-1-git-send-email-nab@daterainc.com> <1431422736-29125-10-git-send-email-nab@daterainc.com> <20150513062458.GA21426@lst.de> <5552FB9C.7000704@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <5552FB9C.7000704@suse.com> Sender: target-devel-owner@vger.kernel.org To: Juergen Gross Cc: Christoph Hellwig , "Nicholas A. Bellinger" , target-devel , linux-scsi , linux-kernel , Hannes Reinecke , Sagi Grimberg , Nicholas Bellinger List-Id: linux-scsi@vger.kernel.org On Wed, May 13, 2015 at 09:22:04AM +0200, Juergen Gross wrote: >> The Xen usage also looks really weird. Maybe Juergen can explain what >> scsiback_add_translation_entry is trying to do? > > scsiback_add_translation_entry() makes the connection between a pvSCSI > LUN configured by the xen tools in xenstore and a xen-scsiback target. > > The xen tools specify the pvSCSI LUN via :, with > being either the WWN of the target or an alias of that target specified > in config_fs. > > scsiback_add_translation_entry() searches all it's targets until a match > is found and links the found tpg to the device specification of the xen > guest. > >> Note that I think both >> sbp and xen really should be working on node ACLs. Right now both >> of them oly supported autogenerated ACLs, so in practice it doesn't >> matter, but keeping the data structure use clean is a goal on it's own. > > I'd be fine with this, but I think I'll need some hints how to achieve > this. I guess I have to specify .fabric_make_nodeacl and > .fabric_drop_nodeacl like e.g. done in drivers/vhost/scsi.c ? Is there > anything else I have to consider? I don't think that model works to well for Xen, at it assumes we get someone to mkdir/rmdir on configfs to create / delete ACLs, while for Xen we get this through in-kernel through a management channel. So I guess you need to export the raw core_tpg_add_initiator_node_acl and core_tpg_del_initiator_node_acl functions again and call them in response to the Xenbus events.