On Sat, 1 Mar 2008, Ian Kent wrote:I've spent several weeks on this now and I'm having considerable difficulty with the expire function. First, I think using a raw netlink implementation defeats the point of using this approach at all due to increased complexity. So I've used the generic netlink facility and the libnl library for user space. While the complexity on the kernel side is acceptable that isn't the case in user space, the code for the library to issue mount point control commands has more than doubled in size and is still not working for mount point expiration. This has been made more difficult because libnl isn't thread safe, but I have overcome this limitation for everything but the expire function, I now can't determine whether the problem I have with receiving multicast messages, possibly out of order, on individual netlink sockets opened specifically for this purpose, is due to this or is something I'm doing wrong. The generic netlink implementation allows only one message to be in flight at a time. But my expire selects an expire candidate (if possible), sends a request to the daemon to do the umount, obtains the result status and returns this as the result to the original expire request. Consequently, I need to spawn a kernel thread to do this and return, then listen for the matching multicast message containing the result. I don't particularly like spawning a thread to do this because it opens the possibility of orphaned threads which introduces other difficulties cleaning them up if the user space application goes away or misbehaves. But I'm also having problems catching the multicast messages. This works fine in normal operation but fails badly when I have multiple concurrent expires happening, such as when shutting down the daemon with several hundred active mounts. I can't avoid the fact that netlink doesn't provide the same functionality as the ioctl interface and clearly isn't meant to. So, the question is, what are the criteria to use for deciding that a netlink based implementation isn't appropriate because I think I'm well past it now? Comments please. Ian -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Linus Torvalds | Linux 2.6.27-rc8 |
| James Bottomley | Re: Integration of SCST in the mainstream Linux kernel |
| Greg KH | Linux 2.6.25.10 |
git: | |
| Sverre Rabbelier | Git vs Monotone |
| Robert Collins | Re: VCS comparison table |
| Junio C Hamano | Re: git-diff on touched files: bug or feature? |
| Linus Torvalds | Re: [PATCH] Avoid running lstat(2) on the same cache entry. |
| Steve Shockley | Re: Real men don't attack straw men |
| chefren | Re: [Fwd: Open-Hardware] |
| ropers | Re: About Xen: maybe a reiterative question but .. |
| Leon Dippenaar | New tcp stack attack |
| David Miller | Re: [GIT]: Networking |
| Jeff Garzik | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Ilpo Järvinen | Re: [bug] stuck localhost TCP connections, v2.6.26-rc3+ |
| Sangtae Ha | Re: A Linux TCP SACK Question |
