I need to create two sub-directory in /sys/class/fc_host/hostX/ directory. The directories are /sys/class/fc_host/hostX/fcoe for FCoE host attributes and /sys/class/fc_host/hostX/fcoe/statistics for FCoE statistics. I read the kernel documents regarding the kobject.txt as well as sample driver sources (kobject_example.c and kset_example.c) but could not find proper way to do this. The FC transport layer uses host_attributes transport container present in scsi_transport_template to display the FC host attributes and statistics. The transport container has only one attribute_group defined. So looks like I can add only one attribute group. The alternative is to create a new kobject and create a sysfs group. In order to do this I need to know the kobject of the parent directory(i.e /sys/class/fc_host/hostX). Since the hostX directory keeps changing as and when the driver gets unloaded and loaded, I can't use static implementation. Is there a way to know the parent directory for this particular directory. If not what is the best way to do this. Any help is highly appreciated.
Thanks, Giridhar Malavali -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html