From 142a80ffc3b537a9c45acd2444a42a77f147c602 Mon Sep 17 00:00:00 2001 From: Ilya Yanok Date: Thu, 13 Nov 2008 19:49:36 +0300 Subject: jffs2: cache data_crc results As we moved data_crc() invocation from jffs2_1pass_build_lists() to jffs2_1pass_read_inode() data_crc is going to be calculated on each inode access. This patch adds caching of data_crc() results. There is no significant improvement in speed (because of flash access caching added in previous patch I think, crc in RAM is really fast) but this patch impacts memory usage -- every b_node structure uses 12 bytes instead of 8. Signed-off-by: Alexey Neyman Signed-off-by: Ilya Yanok --- fs/jffs2/jffs2_private.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/jffs2/jffs2_private.h') diff --git a/fs/jffs2/jffs2_private.h b/fs/jffs2/jffs2_private.h index 3633deaaf8..658b325219 100644 --- a/fs/jffs2/jffs2_private.h +++ b/fs/jffs2/jffs2_private.h @@ -7,6 +7,7 @@ struct b_node { u32 offset; struct b_node *next; + enum { CRC_UNKNOWN = 0, CRC_OK, CRC_BAD } datacrc; }; struct b_list { -- cgit v1.2.1