* [PATCH] [MTD:UBI] Missing scrub when there is a bit-flip
[not found] <1322655222-28348-1-git-send-email-bparekh@nvidia.com>
@ 2011-11-30 12:13 ` Bhavesh Parekh
2011-11-30 12:33 ` Artem Bityutskiy
2011-12-04 14:09 ` Artem Bityutskiy
0 siblings, 2 replies; 5+ messages in thread
From: Bhavesh Parekh @ 2011-11-30 12:13 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd, Bhavesh Parekh
Under some cases, when scrubbing the PEB if we didnot get the lock on
the PEB it fails to scrub. Add that PEB again to the scrub list
Signed-off-by: Bhavesh Parekh <bparekh@nvidia.com>
---
drivers/mtd/ubi/eba.c | 2 +-
drivers/mtd/ubi/ubi.h | 3 +++
drivers/mtd/ubi/wl.c | 5 ++++-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index fb7f19b..fb808d6 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -1033,7 +1033,7 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to,
err = leb_write_trylock(ubi, vol_id, lnum);
if (err) {
dbg_wl("contention on LEB %d:%d, cancel", vol_id, lnum);
- return MOVE_CANCEL_RACE;
+ return MOVE_RETRY;
}
/*
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index dc64c76..15aba00 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -120,6 +120,8 @@ enum {
* PEB
* MOVE_CANCEL_BITFLIPS: canceled because a bit-flip was detected in the
* target PEB
+ * MOVE_RETRY: Retry scrubbing the given PEB, as we didnot got lock last-time on
+ * it
*/
enum {
MOVE_CANCEL_RACE = 1,
@@ -127,6 +129,7 @@ enum {
MOVE_TARGET_RD_ERR,
MOVE_TARGET_WR_ERR,
MOVE_CANCEL_BITFLIPS,
+ MOVE_RETRY,
};
/**
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index 42c684c..277c429 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -795,7 +795,10 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,
protect = 1;
goto out_not_moved;
}
-
+ if (err == MOVE_RETRY) {
+ scrubbing = 1;
+ goto out_not_moved;
+ }
if (err == MOVE_CANCEL_BITFLIPS || err == MOVE_TARGET_WR_ERR ||
err == MOVE_TARGET_RD_ERR) {
/*
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] [MTD:UBI] Missing scrub when there is a bit-flip
2011-11-30 12:13 ` [PATCH] [MTD:UBI] Missing scrub when there is a bit-flip Bhavesh Parekh
@ 2011-11-30 12:33 ` Artem Bityutskiy
2011-12-04 14:09 ` Artem Bityutskiy
1 sibling, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2011-11-30 12:33 UTC (permalink / raw)
To: Bhavesh Parekh; +Cc: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 529 bytes --]
On Wed, 2011-11-30 at 17:43 +0530, Bhavesh Parekh wrote:
> Under some cases, when scrubbing the PEB if we didnot get the lock on
> the PEB it fails to scrub. Add that PEB again to the scrub list
>
> Signed-off-by: Bhavesh Parekh <bparekh@nvidia.com>
I think we need to send it to -stable as well. Could you please confirm
that you verified that this patch solves the issue you reported - I ask
this to make double sure we are sending a good patch to the stable tree.
Thanks!
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [MTD:UBI] Missing scrub when there is a bit-flip
2011-11-30 12:13 ` [PATCH] [MTD:UBI] Missing scrub when there is a bit-flip Bhavesh Parekh
2011-11-30 12:33 ` Artem Bityutskiy
@ 2011-12-04 14:09 ` Artem Bityutskiy
2011-12-05 5:59 ` Bhavesh Parekh
1 sibling, 1 reply; 5+ messages in thread
From: Artem Bityutskiy @ 2011-12-04 14:09 UTC (permalink / raw)
To: Bhavesh Parekh; +Cc: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 442 bytes --]
On Wed, 2011-11-30 at 17:43 +0530, Bhavesh Parekh wrote:
> Under some cases, when scrubbing the PEB if we didnot get the lock on
> the PEB it fails to scrub. Add that PEB again to the scrub list
>
> Signed-off-by: Bhavesh Parekh <bparekh@nvidia.com>
Pushed to ubi-2.6.git with minor amendments, but please, do confirm that
you verify that this patch fixes the issue you described.
Thanks!
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] [MTD:UBI] Missing scrub when there is a bit-flip
2011-12-04 14:09 ` Artem Bityutskiy
@ 2011-12-05 5:59 ` Bhavesh Parekh
2011-12-05 6:51 ` Artem Bityutskiy
0 siblings, 1 reply; 5+ messages in thread
From: Bhavesh Parekh @ 2011-12-05 5:59 UTC (permalink / raw)
To: dedekind1@gmail.com; +Cc: linux-mtd@lists.infradead.org
Artem,
Currently we have K36 setup with most of the critical ubi fixes in it. Verified that this patch fixes the mentioned issue.
Also we have K39 tree and I am planning to verify the this issue in that tree as well after porting the change and fixes from the ubi tree.
Thanks!
Bhavesh
nvpublic
>-----Original Message-----
>From: Artem Bityutskiy [mailto:dedekind1@gmail.com]
>Sent: Sunday, December 04, 2011 7:40 PM
>To: Bhavesh Parekh
>Cc: linux-mtd@lists.infradead.org
>Subject: Re: [PATCH] [MTD:UBI] Missing scrub when there is a bit-flip
>
>* PGP Signed by an unknown key
>
>On Wed, 2011-11-30 at 17:43 +0530, Bhavesh Parekh wrote:
>> Under some cases, when scrubbing the PEB if we didnot get the lock on
>> the PEB it fails to scrub. Add that PEB again to the scrub list
>>
>> Signed-off-by: Bhavesh Parekh <bparekh@nvidia.com>
>
>Pushed to ubi-2.6.git with minor amendments, but please, do confirm that
>you verify that this patch fixes the issue you described.
>
>Thanks!
>
>--
>Best Regards,
>Artem Bityutskiy
>
>* Unknown Key
>* 0x7DC2A2B4
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] [MTD:UBI] Missing scrub when there is a bit-flip
2011-12-05 5:59 ` Bhavesh Parekh
@ 2011-12-05 6:51 ` Artem Bityutskiy
0 siblings, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2011-12-05 6:51 UTC (permalink / raw)
To: Bhavesh Parekh; +Cc: linux-mtd@lists.infradead.org
On Mon, 2011-12-05 at 11:29 +0530, Bhavesh Parekh wrote:
> Artem,
>
> Currently we have K36 setup with most of the critical ubi fixes in it. Verified that this patch fixes the mentioned issue.
> Also we have K39 tree and I am planning to verify the this issue in that tree as well after porting the change and fixes from the ubi tree.
Thanks. I've added CC to stable in the commit message.
Artem.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-12-05 6:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1322655222-28348-1-git-send-email-bparekh@nvidia.com>
2011-11-30 12:13 ` [PATCH] [MTD:UBI] Missing scrub when there is a bit-flip Bhavesh Parekh
2011-11-30 12:33 ` Artem Bityutskiy
2011-12-04 14:09 ` Artem Bityutskiy
2011-12-05 5:59 ` Bhavesh Parekh
2011-12-05 6:51 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).