linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Clements <Paul.Clements@SteelEye.com>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH 2.5.68] eliminate deprecated MOD_INC_USE_COUNT/MOD_DEC_USE_COUNT in md.c
Date: Wed, 23 Apr 2003 12:07:17 -0400	[thread overview]
Message-ID: <3EA6BA35.3A5F25CF@SteelEye.com> (raw)
In-Reply-To: 16037.55226.267006.507998@notabene.cse.unsw.edu.au

Neil Brown wrote:
> On Tuesday April 22, Paul.Clements@SteelEye.com wrote:
> > Following is a simple patch to remove deprecated MOD_INC_USE_COUNT from
> > md.c.
> >
> > If it looks good, please apply.
> 
> I don't think it is that easy.

Well, I think that it's safe to remove the MOD_INC_USE_COUNT...here's
why:

We're protected while a device is open (by the infrastructure in the
block layer that takes a module reference when an md device is opened
and keeps it until the device is closed).

So, while any ioctl is being done, there's an md device open...and...the
ioctls are currently the only way to activate md devices (autorun,
RUN_ARRAY, etc.). 

Now, none of these ioctls will succeed (activate a device) unless there
is an underlying raid personality module (raid0, raid1, et al.) for the
array already loaded. The underlying raid modules also take module
references against md, so by the time a device is activated, md is
already pinned into memory...

So we're safe from every angle...the MOD_INC_USE_COUNT/MOD_DEC_USE_COUNT
appears to have been superfluous in the first place...(at least with the
way 2.5 kernel module refs work)

--
Paul

  reply	other threads:[~2003-04-23 16:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-22 19:19 [PATCH 2.5.68] eliminate deprecated MOD_INC_USE_COUNT/MOD_DEC_USE_COUNT in md.c Paul Clements
2003-04-23  0:00 ` Neil Brown
2003-04-23 16:07   ` Paul Clements [this message]
2003-05-02  5:02     ` Neil Brown
2003-05-02 22:00       ` Paul Clements
2003-05-09 21:19         ` Daniel McNeil
2003-05-10  4:16           ` Paul Clements
2003-05-12  7:13             ` Paul Clements
2003-05-12 18:23               ` Daniel McNeil
2003-04-23 17:52   ` [PATCH 2.5.68] eliminate interdependency between fs/partitions and md driver and enable persistent superblocks/raidautorun with modular md Paul Clements

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=3EA6BA35.3A5F25CF@SteelEye.com \
    --to=paul.clements@steeleye.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).