From: brijesh.singh@calsoftinc.com
To: linux-mtd@lists.infradead.org
Subject: UBI Patch: Max Sequence no not updated in scan.c
Date: Fri, 6 Jul 2007 14:30:08 +0530 (IST) [thread overview]
Message-ID: <31331.172.16.0.34.1183712408.squirrel@webmail.calsoftinc.com> (raw)
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 {
/*
next reply other threads:[~2007-07-06 9:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-06 9:00 brijesh.singh [this message]
2007-07-06 9:22 ` UBI Patch: Max Sequence no not updated in scan.c Artem Bityutskiy
2007-07-06 9:46 ` 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=31331.172.16.0.34.1183712408.squirrel@webmail.calsoftinc.com \
--to=brijesh.singh@calsoftinc.com \
--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