Date: Thu, 13 Oct 2005 18:47:06 +0200 From: Danny Braniss <danny@cs.huji.ac.il> To: scsi@freebsd.org Cc: "Kenneth D. Merry" <ken@freebsd.org> Subject: iSCSI/CAM & tags Message-ID: <E1EQ6EU-0001vS-Ax@cs1.cs.huji.ac.il>
next in thread | raw e-mail | index | archive | help
I need to 'syncronize' the discovery of devices on the target with the iscsi module so that is can set the tag opening size. At the moment im doing this in the user mode control (iscontrol) with a sleep. ... sleep(5); // this call will return the needed info: // cam_id, target_id, nluns, luns[]. if(ioctl(sess->fd, ISCSIGETCAM, &sess->cam) != 0) { syslog(LOG_WARNING, "ISCSIGETCAM failed: %d", errno); return; } ... while(sess->camdev == NULL) { sess->camdev = cam_open_btl(sess->cam.path_id, sess->cam.target_id, sess->cam.target_lun[i], O_RDWR, NULL); if(sess->camdev != NULL) { if(count-- == 0) { syslog(LOG_WARNING, "%s", cam_errbuf); debug(3, "%s", cam_errbuf); return; } } sleep(1); } There must be a better way. any ideas are welcomed. danny
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1EQ6EU-0001vS-Ax>