[libvirt] iSCSI Multi-IQN (Libvirt Support)

Shyam_Iyer at Dell.com Shyam_Iyer at Dell.com
Thu Oct 22 20:01:01 UTC 2009


> -----Original Message-----
> From: Cole Robinson [mailto:crobinso at redhat.com]
> Sent: Friday, October 23, 2009 12:35 AM
> To: Iyer, Shyam
> Cc: libvir-list at redhat.com; Bellad, Sudhir; Domsch, Matt; KM, Paniraja
> Subject: Re: [libvirt] iSCSI Multi-IQN (Libvirt Support)
> 
> On 10/22/2009 01:50 PM, Shyam_Iyer at Dell.com wrote:
> 
> <snip>
> 
> > diff --git a/src/storage_backend_iscsi.c
> b/src/storage_backend_iscsi.c
> > index b516add..3f2a79d 100644
> > --- a/src/storage_backend_iscsi.c
> > +++ b/src/storage_backend_iscsi.c
> > @@ -39,6 +39,10 @@
> >  #include "storage_backend_iscsi.h"
> >  #include "util.h"
> >  #include "memory.h"
> > +#include <sys/types.h>
> > +#include <sys/stat.h>
> > +#include <fcntl.h>
> > +#include <unistd.h>
> >
> >  #define VIR_FROM_THIS VIR_FROM_STORAGE
> >
> > @@ -159,13 +163,57 @@ virStorageBackendISCSIConnection(virConnectPtr
> > conn,
> >                                   const char *portal,
> >                                   const char *action)
> >  {
> > -    const char *const cmdargv[] = {
> > -        ISCSIADM, "--mode", "node", "--portal", portal,
> > -        "--targetname", pool->def->source.devices[0].path, action,
> NULL
> > -    };
> > -
> > -    if (virRun(conn, cmdargv, NULL) < 0)
> > -        return -1;
> > +    DIR *dir;
> > +    struct dirent *entry;
> > +
> > +
> > +       if (pool->def->source.initiator[0].iqnname != NULL) {
> 
> You are using 8 space indentation here which does not match the
libvirt
> convention of 4 spaces, please fix that.

Ok.

 Also, be sure both 'make
> check'
> and 'make syntax-check' pass with the patch applied.

Thanks for pointing these tests. Got a few fail tests here. Will fix
them up and resend.

> 
> > +               int i = 0;
> > +               while(pool->def->source.initiator[i].iqnname !=
> NULL){
> > +                       if (!(dir = opendir(IFACES_DIR))) {
> > +                               if (errno == ENOENT)
> > +                               return 0;
> > +                               virReportSystemError(conn, errno,
> > _("Failed to open dir '%s'"),
> > +                               IFACES_DIR);
> > +                               return -1;
> > +                       }
> 
> Looks like the patch was mangled. Just pasting the patch into your
> client probably won't be sufficient. I'd recommend git format-patch
and
> git send-email, or just attach the patch file.
>

Sure. Thanks.





More information about the libvir-list mailing list