[systemd-devel] How to use libudev to monitor for /sys/firmware/iscsi_boot*?
Hi: I am trying to figure out how to use libudev to monitor for new iSCSI boot targets. For Emulex CNA cards, a new directory gets created of the form /sys/firmware/iscsi_bootN. I am new to libudev, but it looks like it's set up to monitor for new devices. Can I use it to monitor for non-device events? There must be some better way than polling. Thanks. -- Lee Duncan ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to use libudev to monitor for /sys/firmware/iscsi_boot*?
On Fri, Dec 05, 2014 at 11:51:16AM -0800, Lee Duncan wrote: Hi: I am trying to figure out how to use libudev to monitor for new iSCSI boot targets. For Emulex CNA cards, a new directory gets created of the form /sys/firmware/iscsi_bootN. Really? That's horrid, what kernel driver is doing that? I am new to libudev, but it looks like it's set up to monitor for new devices. Can I use it to monitor for non-device events? There must be some better way than polling. Yes, go kick some kernel developers to do this properly, which does not mean using raw kobjects. If you want, I will be glad to do that, just point me at them... thanks, greg k-h ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to use libudev to monitor for /sys/firmware/iscsi_boot*?
On 12/05/2014 01:14 PM, Greg KH wrote: On Fri, Dec 05, 2014 at 11:51:16AM -0800, Lee Duncan wrote: Hi: I am trying to figure out how to use libudev to monitor for new iSCSI boot targets. For Emulex CNA cards, a new directory gets created of the form /sys/firmware/iscsi_bootN. Really? That's horrid, what kernel driver is doing that? Why is it horrid? drivers/scsi/iscsi_boot_sysfs.c does that, and it looks like it's been doing it for quite a while. The code in open-iscsi that looks for firmware iSCSI boot targets knows to look in both /sys/firmware/iscsi_boot%d, and in /sys/firmware/ibft. iBFT is actually the standard, but many iSCSI CNA cards don't follow the standard. I am new to libudev, but it looks like it's set up to monitor for new devices. Can I use it to monitor for non-device events? There must be some better way than polling. Yes, go kick some kernel developers to do this properly, which does not mean using raw kobjects. If you want, I will be glad to do that, just point me at them... Feel free to kick away, though I'm still not sure why (or who). The '/sys/firmware' subsystem seems like a good place to me for iSCSI CNA cards to place their firmware target information. But I obviously have much to learn about it. And, for the record, I believe you are saying that my interpretation of libudev was right: it's not the tool to detect new iSCSI boot target presence, at least using the current /sys/firmware/iscsi_boot%d architecture. Correct? thanks, greg k-h . -- Lee Duncan ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to use libudev to monitor for /sys/firmware/iscsi_boot*?
On Fri, Dec 05, 2014 at 01:42:29PM -0800, Lee Duncan wrote: On 12/05/2014 01:14 PM, Greg KH wrote: On Fri, Dec 05, 2014 at 11:51:16AM -0800, Lee Duncan wrote: Hi: I am trying to figure out how to use libudev to monitor for new iSCSI boot targets. For Emulex CNA cards, a new directory gets created of the form /sys/firmware/iscsi_bootN. Really? That's horrid, what kernel driver is doing that? Why is it horrid? drivers/scsi/iscsi_boot_sysfs.c does that, and it looks like it's been doing it for quite a while. The code in open-iscsi that looks for firmware iSCSI boot targets knows to look in both /sys/firmware/iscsi_boot%d, and in /sys/firmware/ibft. iBFT is actually the standard, but many iSCSI CNA cards don't follow the standard. Why is this a firmware thing at all? These are devices, and attributes for different devices, how are they related to firmware like ACPI and PnP? I am new to libudev, but it looks like it's set up to monitor for new devices. Can I use it to monitor for non-device events? There must be some better way than polling. Yes, go kick some kernel developers to do this properly, which does not mean using raw kobjects. If you want, I will be glad to do that, just point me at them... Feel free to kick away, though I'm still not sure why (or who). The '/sys/firmware' subsystem seems like a good place to me for iSCSI CNA cards to place their firmware target information. But I obviously have much to learn about it. And, for the record, I believe you are saying that my interpretation of libudev was right: it's not the tool to detect new iSCSI boot target presence, at least using the current /sys/firmware/iscsi_boot%d architecture. Correct? That is correct, and that is why it's not a good idea for the kernel to be placing code in such a location where no tool will ever be able to see it. It is making your life harder than it has to be, but now that it is in that location, the odds of being able to move it out is slim. greg k-h ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel