On 12/05/2012 08:50 AM, Nicholas A. Bellinger wrote:
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 645d90a..1346ee0 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -624,6 +624,8 @@ struct se_dev_stat_grps { }; struct se_device { +#define SE_DEV_LINK_MAGIC 0xfeeddeef + u32 dev_link_magic;
Hmm. I was thinking about extending config_item struct so you would have something to check before using the container_of on it. But after some sleep I decided against it. However this should work, too. The memory within the kernel is always mapped and container_of should be safe to use. Yes, I think this will work.
/* RELATIVE TARGET PORT IDENTIFER Counter */ u16 dev_rpti_counter; /* Used for SAM Task Attribute ordering */ @@ -722,6 +724,8 @@ struct se_port_stat_grps { }; struct se_lun { +#define SE_LUN_LINK_MAGIC 0xffff7771 + u32 lun_link_magic; /* See transport_lun_status_table */ enum transport_lun_status_table lun_status; u32 lun_access;
Sebastian -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html