Reread node if its crc is wrong
PATCH 1/1 Reread node if its crc is wrong
Patch attached.
Thank you,
Gilles
From 2715a4328f359dab19285e42b4cd2f72f174da3b Mon Sep 17 00:00:00 2001
From: Gilles Casse <[email protected]>
Date: Mon, 24 Aug 2009 15:44:44 +0200
Subject: [PATCH] Reread node if its crc is wrong
Helpful if unexpected errors occured during flash read.
Signed-off-by Gilles Casse <[email protected]>
--- fs/jffs2/nodelist.h | 4 +++ fs/jffs2/read.c | 75 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 51 insertions(+), 28 deletions(-)
fs/jffs2/nodelist.h +4 -0
@@ -301,6 +301,10 @@ static inline int jffs2_blocks_use_vmalloc(struct jffs2_sb_info *c)#define ALLOC_GC 2/* Space requested for GC. Give it or die */ #define ALLOC_NORETRY 3/* For jffs2_write_dnode: On failure, return -EAGAIN instead of retrying */ +#define MAX_FLASH_READ 4/* Number of calls to jffs2_flash_read. +Helpful if corrupted data (crc) have been read */ + +/* How much dirty space before it goes on the very_dirty_list */ #define VERYDIRTY (c, size) ((size) >= ((c)->sector_size / 2))
fs/jffs2/read.c +47 -28
103 lines not on this page · raw message
Signature · 1 line
1.5.6.3