<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mtd/ubi/eba.c, branch linux-2.6.27.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.27.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.27.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-07-24T10:36:09Z</updated>
<entry>
<title>UBI: fix checkpatch.pl errors and warnings</title>
<updated>2008-07-24T10:36:09Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2008-07-18T10:19:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9c9ec147709e63e4e8ac6a037c6bb50688ff8e9c'/>
<id>urn:sha1:9c9ec147709e63e4e8ac6a037c6bb50688ff8e9c</id>
<content type='text'>
Just out or curiousity ran checkpatch.pl for whole UBI,
and discovered there are quite a few of stylistic issues.
Fix them.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: bugfix - do not torture PEB needlessly</title>
<updated>2008-07-24T10:34:46Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2008-07-18T09:42:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4d88de4beb6f327dfc7c2221eab532dad5b2bb3e'/>
<id>urn:sha1:4d88de4beb6f327dfc7c2221eab532dad5b2bb3e</id>
<content type='text'>
This is probably a copy-paste bug - we torture the old PEB
in the atomic LEB change function, but we should not do this.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: amend commentaries</title>
<updated>2008-07-24T10:32:56Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2008-07-16T07:25:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=85c6e6e28259e9b58b8984db536c45bc3161f40c'/>
<id>urn:sha1:85c6e6e28259e9b58b8984db536c45bc3161f40c</id>
<content type='text'>
Hch asked not to use "unit" for sub-systems, let it be so.
Also some other commentaries modifications.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: fix LEB locking</title>
<updated>2008-07-24T10:32:56Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2008-06-16T10:35:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=23add7455c42eef63f8719bd268328047d4aed69'/>
<id>urn:sha1:23add7455c42eef63f8719bd268328047d4aed69</id>
<content type='text'>
leb_read_unlock() may be called simultaniously by several tasks.
The would race at the following code:

 up_read(&amp;le-&gt;mutex);
 if (free)
         kfree(le);

And it is possible that one task frees 'le' before the other tasks
do 'up_read()'. Fix this by doing up_read and free inside the
'ubi-&gt;ltree' lock. Below it the oops we had because of this:

BUG: spinlock bad magic on CPU#0, integck/7504
BUG: unable to handle kernel paging request at 6b6b6c4f
IP: [&lt;c0211221&gt;] spin_bug+0x5c/0xdb
*pde = 00000000 Oops: 0000 [#1] PREEMPT SMP Modules linked in: ubifs ubi nandsim nand nand_ids nand_ecc video output

Pid: 7504, comm: integck Not tainted (2.6.26-rc3ubifs26 #8)
EIP: 0060:[&lt;c0211221&gt;] EFLAGS: 00010002 CPU: 0
EIP is at spin_bug+0x5c/0xdb
EAX: 00000032 EBX: 6b6b6b6b ECX: 6b6b6b6b EDX: f7f7ce30
ESI: f76491dc EDI: c044f51f EBP: e8a736cc ESP: e8a736a8
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process integck (pid: 7504, ti=e8a72000 task=f7f7ce30 task.ti=e8a72000)
Stack: c044f754 c044f51f 00000000 f7f7d024 00001d50 00000001 f76491dc 00000296       f6df50e0 e8a736d8 c02112f0 f76491dc e8a736e8 c039157a f7d9e830 f76491d8       e8a7370c c020b975 f76491dc 00000296 f76491f8 00000000 f76491d8 00000000 Call Trace:
[&lt;c02112f0&gt;] ? _raw_spin_unlock+0x50/0x7c
[&lt;c039157a&gt;] ? _spin_unlock_irqrestore+0x20/0x58
[&lt;c020b975&gt;] ? rwsem_wake+0x4b/0x122
[&lt;c0390e0a&gt;] ? call_rwsem_wake+0xa/0xc
[&lt;c0139ee7&gt;] ? up_read+0x28/0x31
[&lt;f8873b3c&gt;] ? leb_read_unlock+0x73/0x7b [ubi]
[&lt;f88742a3&gt;] ? ubi_eba_read_leb+0x195/0x2b0 [ubi]
[&lt;f8872a04&gt;] ? ubi_leb_read+0xaf/0xf8 [ubi]

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: fix memory leak</title>
<updated>2008-07-24T10:32:54Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2008-06-04T13:48:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=abc5e92262d87f9c5c628492bffc55f81c7dcb80'/>
<id>urn:sha1:abc5e92262d87f9c5c628492bffc55f81c7dcb80</id>
<content type='text'>
ubi_free_volume() function sets ubi-&gt;volumes[] to NULL, so
ubi_eba_close() is useless, it does not free what has to be freed.
So zap it and free vol-&gt;eba_tbl at the volume release function.

Pointed-out-by: Adrian Hunter &lt;ext-adrian.hunter@nokia.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: avoid unnecessary division operations</title>
<updated>2008-07-24T10:32:54Z</updated>
<author>
<name>Kyungmin Park</name>
</author>
<published>2008-05-22T01:32:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cadb40ccc16a26a738f1cbc963e35b21edd93e79'/>
<id>urn:sha1:cadb40ccc16a26a738f1cbc963e35b21edd93e79</id>
<content type='text'>
UBI already checks that @min io size is the power of 2 at io_init.
It is save to use bit operations then.

Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: handle zero-length case</title>
<updated>2008-01-25T14:41:25Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2008-01-24T15:56:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=60c031531a85b3580f66c2530f9b2802adcad4df'/>
<id>urn:sha1:60c031531a85b3580f66c2530f9b2802adcad4df</id>
<content type='text'>
ubi_eba_atomic_leb_change() has to just map the LEB to a free PEB
if data length is zero.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: add layout volume information</title>
<updated>2008-01-25T14:41:25Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2008-01-24T09:23:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=91f2d53cd75a8fa3557246af965155208c4c69a7'/>
<id>urn:sha1:91f2d53cd75a8fa3557246af965155208c4c69a7</id>
<content type='text'>
Add more information about layout volume to make userspace tools
use the macros instead of constants. Also rename UBI_LAYOUT_VOL_ID
to make it consistent with other macros.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: add auto-resize feature</title>
<updated>2008-01-25T14:41:24Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2008-01-16T13:44:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4ccf8cffa963c7b5bdc6d455ea9417084ee49aa8'/>
<id>urn:sha1:4ccf8cffa963c7b5bdc6d455ea9417084ee49aa8</id>
<content type='text'>
The problem: NAND flashes have different amount of initial bad physical
eraseblocks (marked as bad by the manufacturer). For example, for 256MiB
Samsung OneNAND flash there might be from 0 to 40 bad initial eraseblocks,
which is about 2%. When UBI is used as the base system, one needs to know
the exact amount of good physical eraseblocks, because this number is
needed to create the UBI image which is put to the devices during
production. But this number is not know, which forces us to use the
minimum number of good physical eraseblocks. And UBI additionally
reserves some percentage of physical eraseblocks for bad block handling
(default is 1%), so we have 1-3% of PEBs reserved at the end, depending
on the amount of initial bad PEBs. But it is desired to always have
1% (or more, depending on the configuration).

Solution: this patch adds an "auto-resize" flag to the volume table.
The volume which has the "auto-resize" flag will automatically be re-sized
(enlarged) on the first UBI initialization. UBI clears the flag when
the volume is re-sized. Only one volume may have the "auto-resize" flag.

So, the production UBI image may have one volume with "auto-resize"
flag set, and its size is automatically adjusted on the first boot
of the device.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>UBI: get rid of ubi_ltree_slab</title>
<updated>2008-01-25T14:41:24Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2008-01-16T10:11:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b9a06623d9d0c6dff758d525ceb0d9e2bba8f7d6'/>
<id>urn:sha1:b9a06623d9d0c6dff758d525ceb0d9e2bba8f7d6</id>
<content type='text'>
This slab cache is not really needed since the number of objects
is low and the constructor does not make much sense because we
allocate oblects when doint I/O, which is way slower then allocation.

Suggested-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
</feed>
