From: Richard Weinberger <richard@nod.at>
To: john smith <wempwer@gmail.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: Is ubiattach alone somehow damaging a partition?
Date: Wed, 9 Mar 2016 22:00:14 +0100 [thread overview]
Message-ID: <56E08EDE.80909@nod.at> (raw)
In-Reply-To: <CAKmQUfZT+S5--mQntpUrZWR4gk4YcoXChN5254hixYtrT5JFYw@mail.gmail.com>
Am 09.03.2016 um 21:52 schrieb john smith:
> On 3/9/16, Richard Weinberger <richard.weinberger@gmail.com> wrote:
>> Are both mtd1 and mtd2 supposed to carry UBI?
>> I'm not rally sure what you are trying to do...
>
> Hmm... probably not as kernel booting command does not contain
> anything similar to this:
>
> root=ubi:rootfs rootfstype=ubifs ubi.mtd=flash1.rootfs0
>
> However, I just thought that I can use ubiattach to be able to mount
> any given mtd device. I was looking for a way to get access to a
> currently not used mtd device. If ubiattach is suitable for this,
> then what may be?
>
>> If you ask UBI to attach to an mtd it will write to it.
>
> Where exactly? In do_attach() there is only open(), ioctl() and
> close() called. Where will writing take place?
We need to clarify some bits first.
UBI is kind of a volume manager on top of MTD. It offers also wear leveling
and other NAND related stuff.
Think of an LVM for flash.
Attaching and MTD to UBI means instantiating UBI and making the data
stored by UBI available.
UBI volumes can be used by high level users. The most prominent user is UBIFS.
A filesystem on top of UBI.
If you attach an MTD, UBI owns it and is obligated to write the metadata and/or
erase blocks.
For the gory details see drivers/mtd/ubi/attach.c.
So, what exactly is the expected result and what happens?
I'm still not sure what you are trying to do.
Thanks,
//richard
next prev parent reply other threads:[~2016-03-09 21:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 10:43 Is ubiattach alone somehow damaging a partition? john smith
2016-03-09 18:55 ` Richard Weinberger
2016-03-09 20:52 ` john smith
2016-03-09 21:00 ` Richard Weinberger [this message]
2016-03-10 9:05 ` Artem 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=56E08EDE.80909@nod.at \
--to=richard@nod.at \
--cc=linux-mtd@lists.infradead.org \
--cc=wempwer@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