diff options
author | KaiGai Kohei <kaigai@ak.jp.nec.com> | 2006-06-10 21:35:15 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-06-27 11:16:26 -0400 |
commit | c9f700f840bd481b3e01fcad1ba8da01794a6726 (patch) | |
tree | 786f4a6a3f3a2d619ae4230a62f95361fcd3245a /fs/jffs2/malloc.c | |
parent | 6d4f8224d4ee065e0e3186cc554468d735e6015d (diff) |
[JFFS2][XATTR] using 'delete marker' for xdatum/xref deletion
- When xdatum is removed, a new xdatum with 'delete marker' is
written. (version==0xffffffff means 'delete marker')
- When xref is removed, a new xref with 'delete marker' is written.
(odd-numbered xseqno means 'delete marker')
- delete_xattr_(datum/xref)_delay() are new deletion functions
are added. We can only use them if we can detect the target
obsolete xdatum/xref as a orphan or errir one.
(e.g when inode deletion, or detecting crc error)
[1/3] jffs2-xattr-v6-01-delete_marker.patch
Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/malloc.c')
-rw-r--r-- | fs/jffs2/malloc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/jffs2/malloc.c b/fs/jffs2/malloc.c index 4889d0700c0e..8310c95478e9 100644 --- a/fs/jffs2/malloc.c +++ b/fs/jffs2/malloc.c | |||
@@ -291,6 +291,7 @@ struct jffs2_xattr_datum *jffs2_alloc_xattr_datum(void) | |||
291 | 291 | ||
292 | memset(xd, 0, sizeof(struct jffs2_xattr_datum)); | 292 | memset(xd, 0, sizeof(struct jffs2_xattr_datum)); |
293 | xd->class = RAWNODE_CLASS_XATTR_DATUM; | 293 | xd->class = RAWNODE_CLASS_XATTR_DATUM; |
294 | xd->node = (void *)xd; | ||
294 | INIT_LIST_HEAD(&xd->xindex); | 295 | INIT_LIST_HEAD(&xd->xindex); |
295 | return xd; | 296 | return xd; |
296 | } | 297 | } |
@@ -309,6 +310,7 @@ struct jffs2_xattr_ref *jffs2_alloc_xattr_ref(void) | |||
309 | 310 | ||
310 | memset(ref, 0, sizeof(struct jffs2_xattr_ref)); | 311 | memset(ref, 0, sizeof(struct jffs2_xattr_ref)); |
311 | ref->class = RAWNODE_CLASS_XATTR_REF; | 312 | ref->class = RAWNODE_CLASS_XATTR_REF; |
313 | ref->node = (void *)ref; | ||
312 | return ref; | 314 | return ref; |
313 | } | 315 | } |
314 | 316 | ||