On Thu, 2012-11-01 at 19:57 -0500, Mike Christie wrote:
On 10/24/2012 06:30 PM, Eddie Wai wrote:
+
+ /* Extract boot info */
+ strlcpy(boot_content, boot_initiator, sizeof(boot_content));
+ if (sysfs_get_str(session, ISCSI_SESSION_SUBSYS,
+ boot_content,
+ boot_name, NAME_SIZE))
+ goto skip_boot;
+ strlcpy(boot_content, boot_target, sizeof(boot_content));
+ if (sysfs_get_str(session, ISCSI_SESSION_SUBSYS,
+ boot_content,
+ boot_name, NAME_SIZE))
+ goto skip_boot;
+ strlcpy(boot_content, boot_nic, sizeof(boot_content));
+ if (sysfs_get_str(session, ISCSI_SESSION_SUBSYS,
+ boot_content,
+ boot_name, NAME_SIZE))
+ goto skip_boot;
+
+ /* If boot_initiator/boot_target/boot_nic exist,
+ then extract the info from the boot nic */
+ if (sysfs_get_str(boot_name, ISCSI_IBFT_SUBSYS,
+ vlan, boot_content, NAME_SIZE))
+ log_debug(5, could not read %s/vlan: %d,
+ boot_name, ret);
+ else
+ iface-vlan_id = atoi(boot_content);
+
+ if (sysfs_get_str(boot_name, ISCSI_IBFT_SUBSYS,
+ subnet-mask,
+ iface-subnet_mask,
+ NI_MAXHOST))
+ log_debug(5, could not read %s/subnet: %d,
+ boot_name, ret);
+
+ memset(boot_content, 0, sizeof(boot_content));
+skip_boot:
+ if (strlen(boot_content))
+ log_debug(5, %s not found, boot_content);
}
Ok. I was wrong about moving this to the iface code. In one case, we
want to know the value used for boot. In another we want to know the
currently used value (if you ran some iscsiadm command to change the
value then the values will not match).
Right, this is true. The iscsiadm command to dump iface values should
only report what's in the iface rec and not from the boot. The boot
values should only be for session resyncs. Let me adjust this to a more
appropriate place.
Should we just move this to a new function. Then in iscsid call it and
copy the values. For iscsid non boot restart, do we want to assume we
want the boot values or the currently used values?
For the non-boot restarts, the boot_xxx params should not be populated.
Hence, it should then just use the currently used values.
--
You received this message because you are subscribed to the Google Groups
open-iscsi group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/open-iscsi?hl=en.