[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: module references
From: |
Marco Gerards |
Subject: |
Re: module references |
Date: |
Wed, 23 Nov 2005 13:33:54 +0100 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Hollis Blanchard <address@hidden> writes:
> Right now I'm getting a lot of these:
> ../fs/affs.c: In function `grub_mod_init':
> ../fs/affs.c:556: warning: unused parameter `mod'
> ... in fact, one for every GRUB_MOD_INIT in fs/ and partmap/, it seems.
Right. `my_mod' is used by the filesystems, but not used from INIT.
> This led me to examine the module reference counting system. Most
> filesystems don't do anything more than set a "my_mod" global
> variable, and never use it. fat.c, on the other hand, seems to
> actually be trying to use a refcount.
They do use it. When opening a file the reference is increased so the
user can't remove the filesystem module until the file is closed. If
this is not implemented this way, it's a bug.
> Are modules ever automatically unloaded? When? If so, we need a lot
> more reference counting. If not, we've got some unnecessary complexity
> we should remove.
It's done so you can not remove a module that is in use by GRUB or
another module. For example when you open a file for a long time.
--
Marco
- module references, Hollis Blanchard, 2005/11/22
- Re: module references,
Marco Gerards <=