diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-05-26 01:26:05 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-06-01 05:29:06 -0400 |
commit | 1a0b06997ceca96db9259e537eb935f9fe59a3de (patch) | |
tree | 0428c1bb46987ae0deb05061d74f8c639ac879c8 /fs/ubifs/super.c | |
parent | ab75950b11e74145ffe61376ac073d56645aab8a (diff) |
UBIFS: introduce a "grouped" journal head flag
Journal heads are different in a way how UBIFS writes nodes there. All normal
journal heads receive grouped nodes, while the GC journal heads receives
ungrouped nodes. This patch adds a 'grouped' flag to 'struct ubifs_jhead' which
describes this property.
This patch is a preparation to a further recovery fix.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 1ab0d22e4c94..1e40db740da9 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -811,15 +811,18 @@ static int alloc_wbufs(struct ubifs_info *c) | |||
811 | 811 | ||
812 | c->jheads[i].wbuf.sync_callback = &bud_wbuf_callback; | 812 | c->jheads[i].wbuf.sync_callback = &bud_wbuf_callback; |
813 | c->jheads[i].wbuf.jhead = i; | 813 | c->jheads[i].wbuf.jhead = i; |
814 | c->jheads[i].grouped = 1; | ||
814 | } | 815 | } |
815 | 816 | ||
816 | c->jheads[BASEHD].wbuf.dtype = UBI_SHORTTERM; | 817 | c->jheads[BASEHD].wbuf.dtype = UBI_SHORTTERM; |
817 | /* | 818 | /* |
818 | * Garbage Collector head likely contains long-term data and | 819 | * Garbage Collector head likely contains long-term data and |
819 | * does not need to be synchronized by timer. | 820 | * does not need to be synchronized by timer. Also GC head nodes are |
821 | * not grouped. | ||
820 | */ | 822 | */ |
821 | c->jheads[GCHD].wbuf.dtype = UBI_LONGTERM; | 823 | c->jheads[GCHD].wbuf.dtype = UBI_LONGTERM; |
822 | c->jheads[GCHD].wbuf.no_timer = 1; | 824 | c->jheads[GCHD].wbuf.no_timer = 1; |
825 | c->jheads[GCHD].grouped = 0; | ||
823 | 826 | ||
824 | return 0; | 827 | return 0; |
825 | } | 828 | } |