Skip to contentSkip to conversation

UBI: take 2

PATCH In review Artem Bityutskiy 3 participants 5 messages Nov 29, 2006 – Dec 1, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 UBI: take 2

This is take 2 of the previous mail with David's comments in mind.

Hello Andrew,

we have announced UBI several months ago in the MTD mailing list. It was successfully used in our setup and we've got positive feedback.

In short, it is kind of LVM layer but for flash (MTD) devices which hides flash devices complexities like bad eraseblocks (on NANDs) and wear. The documentation is available at the MTD web site:
http://www.linux-mtd.infradead.org/doc/ubi.html
http://www.linux-mtd.infradead.org/faq/ubi.html

The source code is available at the UBI GIT tree:
git://git.infradead.org/ubi-2.6.git

The UBI GIT tree is based upon the mtd-2.6.git
(git://git.infradead.org/mtd-2.6.git)

There is also an 'mtd' branch available in the UBI GIT which contains the current mtd-2.6.git. So that you can use git-diff mtd and have UBI patches.

There is also web interface to the git trees available:
UBI: http://git.infradead.org/?p=ubi-2.6.git;a=summary
MTD: http://git.infradead.org/?p=mtd-2.6.git;a=summary

Plain patches may be found at
http://linux-mtd.infradead.org/~dedekind/ubi/

Please, include the patches to your tree.

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)
#1 lore raw
Quoted 7 lines · On Wed, 29 Nov 2006 20:17:26 +0200 Artem Bityutskiy <[email protected]>…

This is take 2 of the previous mail with David's comments in mind.

Hello Andrew,

we have announced UBI several months ago in the MTD mailing list. It was successfully used in our setup and we've got positive feedback.

Quoted 8 lines

In short, it is kind of LVM layer but for flash (MTD) devices which hides flash devices complexities like bad eraseblocks (on NANDs) and wear. The documentation is available at the MTD web site:
http://www.linux-mtd.infradead.org/doc/ubi.html
http://www.linux-mtd.infradead.org/faq/ubi.html

The source code is available at the UBI GIT tree:
git://git.infradead.org/ubi-2.6.git

Got that, thanks. It needs a bit of help:

drivers/mtd/ubi/cdev.c renamed from drivers/mtd/ubi/cdev.c~git-ubi-fix +1 -1
@@ -1185,7 +1185,7 @@ static ssize_t vol_cdev_direct_write(str
 			 len, vol_id, lnum, off);
 
 		err = ubi_eba_write_leb(ubi, vol_id, lnum, tbuf, off, len,
-					UBI_DATA_UNKNOWN, &written, 0, NULL);
+					UBI_DATA_UNKNOWN, &written, NULL);
 		if (unlikely(err)) {
 			count -= written;
 			*offp += written;

_

#2 lore raw
Quoted 17 lines · Andrew Morton
Quoted 3 lines

The source code is available at the UBI GIT tree:
git://git.infradead.org/ubi-2.6.git

Got that, thanks. It needs a bit of help:

drivers/mtd/ubi/cdev.c renamed from drivers/mtd/ubi/cdev.c~git-ubi-fix +1 -1
@@ -1185,7 +1185,7 @@ static ssize_t vol_cdev_direct_write(str
 			 len, vol_id, lnum, off);
 
 		err = ubi_eba_write_leb(ubi, vol_id, lnum, tbuf, off, len,
-					UBI_DATA_UNKNOWN, &written, 0, NULL);
+					UBI_DATA_UNKNOWN, &written, NULL);
 		if (unlikely(err)) {
 			count -= written;
 			*offp += written;
Quoted 1 line

_

Nice catch. Odd that gcc doesn't throw a warning on my system with it being like that.

  CC      drivers/mtd/ubi/badeb.o
  CC      drivers/mtd/ubi/upd.o
  CC      drivers/mtd/ubi/sysfs.o
  CC      drivers/mtd/ubi/cdev.o
  CC      drivers/mtd/ubi/uif.o
  CC      drivers/mtd/ubi/vtbl.o
  CC      drivers/mtd/ubi/volmgmt.o
  CC      drivers/mtd/ubi/eba.o

Anyway, we'll get the patch into the tree ASAP.

josh

#3 lore raw

Thank you Andrew,

Quoted 6 lines · Josh Boyer

drivers/mtd/ubi/cdev.c static ssize_t vol_cdev_direct_write(str · line 1188

Quoted 3 lines · Andrew Morton
drivers/mtd/ubi/cdev.c renamed from drivers/mtd/ubi/cdev.c~git-ubi-fix +1 -1
 		err = ubi_eba_write_leb(ubi, vol_id, lnum, tbuf, off, len,
-					UBI_DATA_UNKNOWN, &written, 0, NULL);
+					UBI_DATA_UNKNOWN, &written, NULL);

Nice catch. Odd that gcc doesn't throw a warning on my system with it being like that.

Because this piece of code is for debugging purposes only and it is usually disabled. You probably haven't ever enabled it.

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)
#4 lore raw
In reply to Andrew Morton

Hello Andrew,

drivers/mtd/ubi/cdev.c static ssize_t vol_cdev_direct_write(str · line 1188

Quoted 8 lines · Andrew Morton
drivers/mtd/ubi/cdev.c renamed from drivers/mtd/ubi/cdev.c~git-ubi-fix +1 -1
@@ -1185,7 +1185,7 @@ static ssize_t vol_cdev_direct_write(str
 			 len, vol_id, lnum, off);
 
 		err = ubi_eba_write_leb(ubi, vol_id, lnum, tbuf, off, len,
-					UBI_DATA_UNKNOWN, &written, 0, NULL);
+					UBI_DATA_UNKNOWN, &written, NULL);

I have re-based the ubi-2.6.git tree, my apologies for this. I hope I have not caused you many troubles by this.

I also I have applied your fix.

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)