[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <492AB98C.7030105@suse.de>
Date: Mon, 24 Nov 2008 23:26:20 +0900
From: Tejun Heo <teheo@...e.de>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: Neil Brown <neilb@...e.de>, linux-kernel@...r.kernel.org,
linux-raid@...r.kernel.org, Doug Ledford <dledford@...hat.com>,
Greg KH <greg@...ah.com>, Jens Axboe <jens.axboe@...cle.com>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists