summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/nodelist.h
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-21 00:02:06 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-21 00:02:06 +0100
commit6171586a7ae5198988774e8480631e8d15f65dfe (patch)
treeeef74bde60005c4e39c0c213030b27cb07a5c236 /fs/jffs2/nodelist.h
parentfb9fbbcc9389edabb172ac1b6419c01e32046787 (diff)
downloadop-kernel-dev-6171586a7ae5198988774e8480631e8d15f65dfe.zip
op-kernel-dev-6171586a7ae5198988774e8480631e8d15f65dfe.tar.gz
[JFFS2] Correct handling of JFFS2_FEATURE_RWCOMPAT_COPY nodes.
We should preserve these when we come to garbage collect them, not let them get erased. Use jffs2_garbage_collect_pristine() for this, and make sure the summary code copes -- just refrain from writing a summary for any block which contains a node we don't understand. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/nodelist.h')
-rw-r--r--fs/jffs2/nodelist.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h
index bac4ec3..1f5d5b0 100644
--- a/fs/jffs2/nodelist.h
+++ b/fs/jffs2/nodelist.h
@@ -97,6 +97,11 @@ struct jffs2_raw_node_ref
#define ref_obsolete(ref) (((ref)->flash_offset & 3) == REF_OBSOLETE)
#define mark_ref_normal(ref) do { (ref)->flash_offset = ref_offset(ref) | REF_NORMAL; } while(0)
+/* NB: REF_PRISTINE for an inode-less node (ref->next_in_ino == NULL) indicates
+ it is an unknown node of type JFFS2_NODETYPE_RWCOMPAT_COPY, so it'll get
+ copied. If you need to do anything different to GC inode-less nodes, then
+ you need to modify gc.c accordingly. */
+
/* For each inode in the filesystem, we need to keep a record of
nlink, because it would be a PITA to scan the whole directory tree
at read_inode() time to calculate it, and to keep sufficient information
OpenPOWER on IntegriCloud