All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Gerards <metgerards@student.han.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: module references
Date: Wed, 23 Nov 2005 13:33:54 +0100	[thread overview]
Message-ID: <87acfv1r2l.fsf@student.han.nl> (raw)
In-Reply-To: <4bf7a326c787c00b52f64b301ebfacdd@penguinppc.org> (Hollis Blanchard's message of "Tue, 22 Nov 2005 20:58:40 -0600")

Hollis Blanchard <hollis@penguinppc.org> 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




  reply	other threads:[~2005-11-23 12:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-23  2:58 module references Hollis Blanchard
2005-11-23 12:33 ` Marco Gerards [this message]
2005-11-23 22:46   ` Hollis Blanchard
2005-11-24  6:23     ` Vesa Jääskeläinen
2005-11-24  7:28       ` Marco Gerards
2005-11-24  7:57         ` Vesa Jääskeläinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87acfv1r2l.fsf@student.han.nl \
    --to=metgerards@student.han.nl \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.