lkml.org 
[lkml]   [2008]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] md: make devices disappear when they are no longer needed.
Tejun Heo wrote:
> Can we then make gendisk hold owner module till it gets released? It
> would be much nicer to write code to if we can keep the regular object
> reference counting across module boundaries and being able to taking
> down a module while devices are active isn't a too important
> requirement. For vast majoerity (ide, scsi, md) one way or the other
> doesn't even matter at all.

If always holding reference is too much of a change, we can do

if (gendisk->fops->disk_release) {
__module_get(gendisk->fops->owner);
gendisk->fops->disk_release(gendisk);
module_put(gendisk->fops->owner);
}
So that both parties - drivers which can happily unregister devices
during exit and drivers which want to do reference counting across
module boundaries - can be happy.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2008-11-24 15:29    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site