public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Kyungmin Park <kyungmin.park@samsung.com>
Cc: linux-mtd@lists.infradead.org, haver@vnet.ibm.com,
	'Marteo Tim' <tim.marteo@gmail.com>
Subject: Re: how to use jff2 on UBI layer?
Date: Thu, 20 Jul 2006 11:45:58 +0200	[thread overview]
Message-ID: <20060720094558.GA30897@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <004601c6aba6$14554050$c7a3580a@swcenter.sec.samsung.co.kr>

On Thu, 20 July 2006 11:42:01 +0900, Kyungmin Park wrote:
> 
> Is there any easy way?
> 
> It's too dificult to mount jffs2 on ubi

As of now, it is impossible, sorry.  UBI exports an interface
completely different from MTD, so JFFS2 cannot work on UBI.  What I
used was a glue layer, called gluebi, that converts the UBI interface
into an MTD interface.  But in its current form, that is still
unacceptable, so I'm working on changing the code.

<details>

Right now, gluebi exports a function for jffs2 to find a device by
name.  This function tries UBI first and - if it finds one, exports
the UBI as an MTD for jffs2 to use.  Now you have an mtd and can also
see in via /proc/mtd, open the mtdblock or mtdchar devices for it,
etc.

When you unmount, the usage count drops to zero and the MTD device
gets removed.  No longer do you see a trace in /proc/mtd or can you
open mtdblock or mtdchar devices.

Unless you opened one of the devices while jffs2 was mounted.  Then
the usage count stays up and you can continue to use the device.

And if this happens, please don't think about mounting the same device
again, as gluebi would create a _second_ MTD for the same UBI.
Welcome to the world of pain.


As the above clearly is nothing to be proud of, I'm currently working
on opening an MTD device for every UBI volume.  This requires to deal
with reference counting in two places, MTD and UBI, and many
interesting race conditions.  It also found me wondering why we need
to do the refcounting in two places at all, but that's another story.

</details>

Jörn

-- 
There's nothing better for promoting creativity in a medium than
making an audience feel "Hmm ­ I could do better than that!"
-- Douglas Adams in a slashdot interview

  reply	other threads:[~2006-07-20  9:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-10  2:50 how to use jff2 on UBI layer? Marteo Tim
2006-07-10 13:01 ` Frank Haverkamp
2006-07-12  2:21   ` Tim Marteo
2006-07-20  2:42   ` Kyungmin Park
2006-07-20  9:45     ` Jörn Engel [this message]
2006-07-21  6:42       ` Frank Haverkamp
2006-07-21  7:59         ` Jörn Engel
2006-07-24 10:46       ` Artem B. Bityutskiy
2006-07-24 11:40         ` Jörn Engel
2006-07-26 16:52           ` Artem B. Bityutskiy
2006-07-27 12:54           ` Artem B. Bityutskiy
2006-07-30 19:28             ` Josh Boyer
2006-07-31  7:21               ` Artem B. Bityutskiy
2006-07-31  7:43                 ` Artem B. Bityutskiy
2006-07-31  9:29                   ` Frank Haverkamp
2006-07-31 13:52                   ` Josh Boyer
2006-07-31  8:09               ` Artem B. Bityutskiy

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=20060720094558.GA30897@wohnheim.fh-wedel.de \
    --to=joern@wohnheim.fh-wedel.de \
    --cc=haver@vnet.ibm.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tim.marteo@gmail.com \
    /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