Re: [PATCH 1/2] md: make devices disappear when they are no longer needed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux