public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* mtd device for rootfs with kernel 2.4.18
@ 2002-04-03 13:45 Armin Schindler
  2002-04-03 13:53 ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Armin Schindler @ 2002-04-03 13:45 UTC (permalink / raw)
  To: linux-mtd

Hi,

I hope someone can help with the following :

- MTD Partitions
  (mtd from CVS about 2 weeks ago, no changes in the important
  parts since then)
- JFFS2 as root filesystem on one mtd partition
  (JFFS2 from CVS jffs2-2_4-branch)
- Kernel 2.4.18

The problem is, when the kernel tries to mount the rootfs, it just
hangs. This is because it waits for a semaphore s_umount of the
superblock structure.

This semaphore was introduced in kernel 2.4.4 (I believe) and is
down during the loop for fs_types in fs/super.c. It is still down,
when blkdev_put() is called, where the mtdblock's release function
is called. This release function calls invalidate_device() which also
calls other functions where the s_umount semaphore is "downed" too.

I'm not that familiar with the mount-rootfs or the mtdblock code to
propose a patch here. 
Maybe moving the up_write(&sb->s_umount); before the blkdev_put()
would be a solution, but I don't know the impact...

Or did I overlook something here ?

Thanx,
Armin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mtd device for rootfs with kernel 2.4.18
  2002-04-03 13:45 mtd device for rootfs with kernel 2.4.18 Armin Schindler
@ 2002-04-03 13:53 ` David Woodhouse
  2002-04-03 14:21   ` Armin Schindler
  0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2002-04-03 13:53 UTC (permalink / raw)
  To: Armin Schindler; +Cc: linux-mtd

acs@sysgo.de said:
>  Or did I overlook something here ? 

Yes. The mailing list archives.

--
dwmw2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mtd device for rootfs with kernel 2.4.18
  2002-04-03 13:53 ` David Woodhouse
@ 2002-04-03 14:21   ` Armin Schindler
  2002-04-03 14:31     ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Armin Schindler @ 2002-04-03 14:21 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

Okay, the call to invalidate_device(), which causes the semaphore
problem, was removed from the release function in nftlcore.c.

Is it safe to do the same from the release function in mtdblock.c ?
If yes, why was it added ?

Armin 

On Wed, 3 Apr 2002, David Woodhouse wrote:
> 
> acs@sysgo.de said:
> >  Or did I overlook something here ? 
> 
> Yes. The mailing list archives.
> 
> --
> dwmw2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mtd device for rootfs with kernel 2.4.18
  2002-04-03 14:21   ` Armin Schindler
@ 2002-04-03 14:31     ` David Woodhouse
  2002-04-03 14:39       ` Armin Schindler
  0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2002-04-03 14:31 UTC (permalink / raw)
  To: Armin Schindler; +Cc: linux-mtd

acs@sysgo.de said:
> Okay, the call to invalidate_device(), which causes the semaphore
> problem, was removed from the release function in nftlcore.c.

> Is it safe to do the same from the release function in mtdblock.c ? If
> yes, why was it added ? 

It should never have been there in the first place. It was removed from 
mtdblock.c in CVS last year, and that fix is in 2.4.18-pre5.

--
dwmw2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mtd device for rootfs with kernel 2.4.18
  2002-04-03 14:31     ` David Woodhouse
@ 2002-04-03 14:39       ` Armin Schindler
  2002-04-03 14:40         ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Armin Schindler @ 2002-04-03 14:39 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

On Wed, 3 Apr 2002, David Woodhouse wrote:
> acs@sysgo.de said:
> > Okay, the call to invalidate_device(), which causes the semaphore
> > problem, was removed from the release function in nftlcore.c.
> 
> > Is it safe to do the same from the release function in mtdblock.c ? If
> > yes, why was it added ? 
> 
> It should never have been there in the first place. It was removed from 
> mtdblock.c in CVS last year, and that fix is in 2.4.18-pre5.

Okay, thanx.
Just wondering, in CVS HEAD it is still there ? Or is this only
meant for 2.5 ?

Armin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mtd device for rootfs with kernel 2.4.18
  2002-04-03 14:39       ` Armin Schindler
@ 2002-04-03 14:40         ` David Woodhouse
  0 siblings, 0 replies; 6+ messages in thread
From: David Woodhouse @ 2002-04-03 14:40 UTC (permalink / raw)
  To: Armin Schindler; +Cc: linux-mtd

acs@sysgo.de said:
> Just wondering, in CVS HEAD it is still there ? Or is this only meant
> for 2.5 ? 

It was removed from CVS HEAD in November last year, and hasn't returned.

--
dwmw2

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-04-03 14:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-03 13:45 mtd device for rootfs with kernel 2.4.18 Armin Schindler
2002-04-03 13:53 ` David Woodhouse
2002-04-03 14:21   ` Armin Schindler
2002-04-03 14:31     ` David Woodhouse
2002-04-03 14:39       ` Armin Schindler
2002-04-03 14:40         ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox