Re: [libvirt] [PATCH 4/5]: Move the sendtarget command into the login command

2008-06-17 Thread Daniel Veillard
On Mon, Jun 16, 2008 at 03:52:46PM +0200, Chris Lalancette wrote:
 A small bugfix; we only need to call the iscsiadm sendtarget command when we 
 are
 first logging in; we don't need to do it for logout.  Move the sendtarget
 command into the Login() function.

  Again I don't know the details, but patch looks okay +1

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard  | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH 4/5]: Move the sendtarget command into the login command

2008-06-17 Thread Chris Lalancette
Chris Lalancette wrote:
 A small bugfix; we only need to call the iscsiadm sendtarget command when we 
 are
 first logging in; we don't need to do it for logout.  Move the sendtarget
 command into the Login() function.
 
 Changes since last time:
 1)  Make const char *cmdsendtarget into const char *const cmdsendtarget based 
 on
 feedback from Jim.
 
 Signed-off-by: Chris Lalancette [EMAIL PROTECTED]

Committed

Chris Lalancette

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH 4/5]: Move the sendtarget command into the login command

2008-06-16 Thread Chris Lalancette
A small bugfix; we only need to call the iscsiadm sendtarget command when we are
first logging in; we don't need to do it for logout.  Move the sendtarget
command into the Login() function.

Changes since last time:
1)  Make const char *cmdsendtarget into const char *const cmdsendtarget based on
feedback from Jim.

Signed-off-by: Chris Lalancette [EMAIL PROTECTED]

diff -urp libvirt.session/src/storage_backend_iscsi.c libvirt.sendtarget/src/storage_backend_iscsi.c
--- libvirt.session/src/storage_backend_iscsi.c	2008-06-16 14:33:13.0 +0200
+++ libvirt.sendtarget/src/storage_backend_iscsi.c	2008-06-16 14:35:34.0 +0200
@@ -158,14 +158,6 @@ virStorageBackendISCSIConnection(virConn
 --targetname, pool-def-source.devices[0].path, action, NULL
 };
 
-const char *cmdsendtarget[] = {
-ISCSIADM, --mode, discovery, --type, sendtargets,
---portal, portal, NULL
-};
-
-if (virRun(conn, (char **)cmdsendtarget, NULL)  0)
-return -1;
-
 if (virRun(conn, (char **)cmdargv, NULL)  0)
 return -1;
 
@@ -403,6 +395,14 @@ virStorageBackendISCSILogin(virConnectPt
 virStoragePoolObjPtr pool,
 const char *portal)
 {
+const char *const cmdsendtarget[] = {
+ISCSIADM, --mode, discovery, --type, sendtargets,
+--portal, portal, NULL
+};
+
+if (virRun(conn, (char **)cmdsendtarget, NULL)  0)
+return -1;
+
 return virStorageBackendISCSIConnection(conn, pool, portal, --login);
 }
 

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list