Masaki Kanno
2008-Oct-21 09:32 UTC
[Xen-devel] [PATCH 0/2] Fix syntax problem of vscsi_util
Hi, These patches fix the syntax problem reported from Ian. Also they use os.path.realpath() instead of os.chdir() and os.getcwd(). And they clean up vscsi_util.py and related other files. I wrote them on xen-unstable staging tree. 1/2 : Revert changeset 18646. 2/2 : Fix and clean up vscsi_util.py and other files. Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> Best regards, Kan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Revert changeset 18646 Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2008-Oct-21 09:37 UTC
[Xen-devel] [PATCH 2/2] Fix and clean up vscsi_util.py and other files
Fix and clean up vscsi_util.py and other files Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2008-Oct-21 10:00 UTC
[Xen-devel] Re: [PATCH 2/2] Fix and clean up vscsi_util.py and other files
Masaki Kanno writes ("[PATCH 2/2] Fix and clean up vscsi_util.py and other files"):> Fix and clean up vscsi_util.py and other files > Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>Thanks. This looks like a definite improvement. I think it should make the vscsi stuff more or less harmless in situations where it''s not being used. So: Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> However, are you sure that the approach taken in vscsi_util.py is the right one ? The set of scsi devices available on a system may change over time, so it is not correct to try to build a list at startup. Also, doing so will slow down startup (including startup time of the xm utility) on systems with many scsi devices even when pvscsi is not in use, and exposes non-pvscsi users to bugs in the pvscsi system (as previously discussed). Surely there must be some way to do this lookup directly in /sys or whereever at the point of use, when we''re instructed to pass through a specific device ? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2008-Oct-21 12:33 UTC
Re: [Xen-devel] Re: [PATCH 2/2] Fix and clean up vscsi_util.py andother files
Hi Ian, Tue, 21 Oct 2008 11:00:26 +0100, Ian Jackson wrote:>Masaki Kanno writes ("[PATCH 2/2] Fix and clean up vscsi_util.py and other >files"): >> Fix and clean up vscsi_util.py and other files >> Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> > >Thanks. This looks like a definite improvement. I think it should >make the vscsi stuff more or less harmless in situations where it''s >not being used. > >So: > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>Thanks.>However, are you sure that the approach taken in vscsi_util.py is the >right one ? The set of scsi devices available on a system may change >over time, so it is not correct to try to build a list at startup."startup" which you pointed out is xm create, isn''t it? Or xend start? If xm create, I think that the xm utility does not affect non-pvscsi users. Non-pvscsi users return at line 702, so the xm utility is not called by xm create. 696 def configure_vscsis(config_devs, vals): 697 """Create the config for vscsis (virtual scsi devices). 698 """ 699 devidlist = [] 700 config_scsi = [] 701 if len(vals.vscsi) == 0: 702 return 0 703 704 scsi_devices = vscsi_util.vscsi_get_scsidevices() 705 for (p_dev, v_dev, backend) in vals.vscsi: 706 (p_hctl, devname) = \ 707 vscsi_util.vscsi_get_hctl_and_devname_by(p_dev, scsi_devices) Best regards, Kan>Also, doing so will slow down startup (including startup time of the >xm utility) on systems with many scsi devices even when pvscsi is not >in use, and exposes non-pvscsi users to bugs in the pvscsi system (as >previously discussed). > >Surely there must be some way to do this lookup directly in /sys or >whereever at the point of use, when we''re instructed to pass through a >specific device ? > >Ian. > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2008-Oct-21 12:38 UTC
Re: [Xen-devel] Re: [PATCH 2/2] Fix and clean up vscsi_util.py andother files
Masaki Kanno writes ("Re: [Xen-devel] Re: [PATCH 2/2] Fix and clean up vscsi_util.py andother files"):> "startup" which you pointed out is xm create, isn''t it? > Or xend start?The code seems to be run in both contexts, but I only checked with some grepping rather than actual execution.> If xm create, I think that the xm utility does not affect non-pvscsi > users. Non-pvscsi users return at line 702, so the xm utility is not > called by xm create.Ah, yes. But don''t you still need to think about the possibility that devices may appear and disappear (or even both!) during command execution or during the lifetime of xend ? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2008-Oct-22 04:11 UTC
Re: [Xen-devel] Re: [PATCH 2/2] Fix and clean up vscsi_util.pyandother files
Tue, 21 Oct 2008 13:38:09 +0100, Ian Jackson wrote:>Masaki Kanno writes ("Re: [Xen-devel] Re: [PATCH 2/2] Fix and clean up >vscsi_util.py andother files"): >> "startup" which you pointed out is xm create, isn''t it? >> Or xend start? > >The code seems to be run in both contexts, but I only checked with >some grepping rather than actual execution. > >> If xm create, I think that the xm utility does not affect non-pvscsi >> users. Non-pvscsi users return at line 702, so the xm utility is not >> called by xm create. > >Ah, yes. > >But don''t you still need to think about the possibility that devices >may appear and disappear (or even both!) during command execution or >during the lifetime of xend ?Hi Ian, Yes, I also consider more consideration may be needed. Could you give us (me, Kamada and Horikoshi) time to consider? Best regards, Kan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2008-Oct-22 09:14 UTC
Re: [Xen-devel] Re: [PATCH 2/2] Fix and clean up vscsi_util.pyandother files
Masaki Kanno writes ("Re: [Xen-devel] Re: [PATCH 2/2] Fix and clean up vscsi_util.pyandother files"):> Tue, 21 Oct 2008 13:38:09 +0100, Ian Jackson wrote: > >But don''t you still need to think about the possibility that devices > >may appear and disappear (or even both!) during command execution or > >during the lifetime of xend ? > > Yes, I also consider more consideration may be needed. > Could you give us (me, Kamada and Horikoshi) time to consider?Of course :-). Regards, Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel