From: Artem Bityutskiy <dedekind@infradead.org>
To: John Smith <john@arrows.demon.co.uk>
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBI: Cannot create static volumes when FTL is enabled
Date: Sat, 05 May 2007 16:40:30 +0300 [thread overview]
Message-ID: <1178372430.3659.124.camel@sauron> (raw)
In-Reply-To: <1178366098.3659.93.camel@sauron>
On Sat, 2007-05-05 at 14:54 +0300, Artem Bityutskiy wrote:
> On Sat, 2007-05-05 at 14:39 +0300, Artem Bityutskiy wrote:
> > So you see that dynamic volumes are mapped to the MTD device model quite
> > nicely: mtd device size = volume size.
> >
> > Size of static volumes depends on how much data you put there. And since
> > MTD infrastructure assumes that MTD device sizes are stable, there is no
> > good and nice way to emulate MTD devices on top of static volumes,
> > unless MTD subsystem is somehow re-designed.
> >
> > But anyway, you have found a bug. I am going to disable MTD device
> > emulation for static volumes.
>
> Although it still would be nice to have MTD device emulation for static
> volumes. May be we have the same semantics as dynamic volumes if they
> are used via gluebi. It needs more thinking.
Well, after thinking more I have fixed this. Now we set emulated mtd
device size to data size if the volume is static.
I.e., when you create a static volume, its size is zero:
# ubimkvol -d0 -n0 -Nvol1 -s60MiB -t static
# cat /sys/class/ubi/ubi0_0/data_bytes
# 0
# cat /proc/mtd
# dev: size erasesize name
# mtd0: 08000000 00004000 "NAND simulator partition 0"
# mtd1: 00000000 00003e00 "vol1"
# ubiupdatevol -d 0 -n 0 small_file_72_bytes
# cat /sys/class/ubi/ubi0_0/data_bytes
# 72
# cat /proc/mtd
# dev: size erasesize name
# mtd0: 08000000 00004000 "NAND simulator partition 0"
# mtd1: 00000048 00003e00 "vol1"
I've committed the fix to git://git.infradead.org/~dedekind/ubi-2.6.git.
Or see
http://git.infradead.org/?p=users/dedekind/ubi-2.6.git;a=commit;h=962f24709f91fe0634b3faa3cac915c66357a239
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
prev parent reply other threads:[~2007-05-05 13:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-04 22:22 UBI: Cannot create static volumes when FTL is enabled John Smith
2007-05-05 11:39 ` Artem Bityutskiy
2007-05-05 11:54 ` Artem Bityutskiy
2007-05-05 13:40 ` Artem Bityutskiy [this message]
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=1178372430.3659.124.camel@sauron \
--to=dedekind@infradead.org \
--cc=john@arrows.demon.co.uk \
--cc=linux-mtd@lists.infradead.org \
/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