public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* UBI Patch: Max Sequence no not updated in scan.c
@ 2007-07-06  9:00 brijesh.singh
  2007-07-06  9:22 ` Artem Bityutskiy
  2007-07-06  9:46 ` Artem Bityutskiy
  0 siblings, 2 replies; 3+ messages in thread
From: brijesh.singh @ 2007-07-06  9:00 UTC (permalink / raw)
  To: linux-mtd

Hi,I came across problem of having two leb with same sequence no.This
happens when we continuously write one block again and again and reboot
machine before background thread erases those blocks.
The problem here was,when we find two blocks with same sequence no,we take
the higher one,but we were not updating max seq no,so next block may have
the same seqnum.
This patch solves this problem.


Signed-off-by: Brijesh Singh <brijesh.s.singh@gmail.com>

Index: mtd-2.6/drivers/mtd/ubi/scan.c
===================================================================
--- mtd-2.6.orig/drivers/mtd/ubi/scan.c	2007-07-04 16:58:43.000000000 +0530
+++ mtd-2.6/drivers/mtd/ubi/scan.c	2007-07-06 13:57:53.000000000 +0530
@@ -510,6 +510,9 @@
 				sv->last_data_size =
 					ubi32_to_cpu(vid_hdr->data_size);

+			if (si->max_sqnum < sqnum)
+				si->max_sqnum = sqnum;
+
 			return 0;
 		} else {
 			/*

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-06  9:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-06  9:00 UBI Patch: Max Sequence no not updated in scan.c brijesh.singh
2007-07-06  9:22 ` Artem Bityutskiy
2007-07-06  9:46 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox