[PATCH 2.6.35] mtd: blktrans: Move device and module ref-counting back to open/release

Maxim Levitsky maximlevitsky at gmail.com
Tue Sep 7 16:54:29 EDT 2010


On Tue, 2010-09-07 at 13:27 +0300, Artem Bityutskiy wrote: 
> On Sun, 2010-09-05 at 16:34 -0700, Kevin Cernekee wrote:
> > On Thu, Jul 22, 2010 at 10:44 AM, Ben Hutchings
> > <bhutchings at solarflare.com> wrote:
> > > commit 048d87199566663e4edc4880df3703c04bcf41d9 "mtd: blktrans: Hotplug
> > > fixes" causes the MTD and the MTD driver module's ref-counts to be
> > > bumped for each block device that is created, whether or not it's
> > > actually in use.
> > >
> > > This means that before removing an MTD or driver module one must first
> > > remove all the associated block devices.  But the block devices will
> > > be removed only when the MTDs themselves are removed, which is no
> > > longer possible.
> > 
> > Just updated to 2.6.36-rc3 and noticed a related issue.  Configuration is:
> 
> Sounds like a regression which should be either fixed or the patch which
> causes this should be reverted. Maxim?

We have a tough issue here.
The way mtd core is built, it assumes that one can always remove an mtd
device, therefore all users must let it go as soon as asked first time.
Its possible to fix that of course, but I'll need to touch a lot of code
I can't test.
Really mtd core wasn't build with hotplug in the mind.
I'll think of something (and you all are welcome to help).

Best regards,
Maxim Levitsky




More information about the linux-mtd mailing list