On Tue, Jul 24, 2007 at 08:35:16AM +0200, Hannes Reinecke wrote: > Guido Guenther wrote: > > I give up on git-send-email - it always fools me. Nevertheless this one > > fixes the described bug of paths coming back as different block > > devices: > > > > Keep a list of sysfs devices for sysfs_device_get() so uev_trigger() can look > > up the necessary information for proper path removal in case of a 'remove' > > uevent - the sysfs files in the filesystem might be long gone at this point. > > > > This also plugs a memory leak where we'd malloc space for the same sysfs device > > over and over again for every processed uevent. > > > Hmm. But now we're running into the opposite trap: memory for a block device once > existing will never be freed. So over time we're likely to become a memory hog. So far we did not free any memory _and_ we would end up allocating memory for every path that comes back up over and over again. > Better it would be to remove the sysfs device from the cache once we're done > with it. Fair enough, we won't need the information then anyway. Thanks, -- Guido -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel