On Thursday April 19, [EMAIL PROTECTED] wrote: > > Right. Sigh. But there is no user of the symlinks. > > I could drop the symlinks completely. Just do not track what names a cache > aliases to? >
Suppose I have a kmem_cache which at different times has different sizes (like, for example, the cache used for 'stripe_head' in md/raid5.c. If I 'grow' and array, I resize that kmem_cache). Suppose that the first time I create it, it has size X, and then someone else creates a cache with size X. The second cache will become an alias for the first. So when the first is destroyed, the name says. Now I try to create another cache with the same name (it is serving the same purpose) but with a different size. It will need to create a new cache, but the name is still in use. Bang! I really think you need to return a different handle to each kmem_cache_create call so that you know which cache is being deleted so you can mangle names correctly. Another option might be to name each cache actually created with a unique name, and then create a symlink for each cache that was asked for (whether it was created or whether a pre-existing cache was used). Then being lazy about deletion shouldn't be a problem. NeilBrown - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/