diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-05-15 05:05:54 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-05-16 03:31:40 -0400 |
commit | debf12d54182b324a01c4276b003669c94b7b531 (patch) | |
tree | 972640a41690e8946bd89636765cbaa6a5aa63f5 /fs/ubifs/ubifs.h | |
parent | 074bcb9b5ce698bd7b02ddb469da9cba21fe83fd (diff) |
UBIFS: substitute the replay tree with a replay list
This patch simplifies replay even further - it removes the replay tree and
adds the replay list instead. Indeed, we just do not need to use a tree here -
all we need to do is to add all nodes to the list and then sort it. Using
RB-tree is an overkill - more code and slower. And since we replay buds in
order, we expect the nodes to follow in _mostly_ sorted order, so the merge
sort becomes much cheaper in average than an RB-tree.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/ubifs.h')
-rw-r--r-- | fs/ubifs/ubifs.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index 26a7ebe56d2e..a2f9d4e3519f 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -1205,7 +1205,6 @@ struct ubifs_debug_info; | |||
1205 | * @replaying: %1 during journal replay | 1205 | * @replaying: %1 during journal replay |
1206 | * @mounting: %1 while mounting | 1206 | * @mounting: %1 while mounting |
1207 | * @remounting_rw: %1 while re-mounting from R/O mode to R/W mode | 1207 | * @remounting_rw: %1 while re-mounting from R/O mode to R/W mode |
1208 | * @replay_tree: temporary tree used during journal replay | ||
1209 | * @replay_list: temporary list used during journal replay | 1208 | * @replay_list: temporary list used during journal replay |
1210 | * @replay_buds: list of buds to replay | 1209 | * @replay_buds: list of buds to replay |
1211 | * @cs_sqnum: sequence number of first node in the log (commit start node) | 1210 | * @cs_sqnum: sequence number of first node in the log (commit start node) |
@@ -1435,7 +1434,6 @@ struct ubifs_info { | |||
1435 | unsigned int replaying:1; | 1434 | unsigned int replaying:1; |
1436 | unsigned int mounting:1; | 1435 | unsigned int mounting:1; |
1437 | unsigned int remounting_rw:1; | 1436 | unsigned int remounting_rw:1; |
1438 | struct rb_root replay_tree; | ||
1439 | struct list_head replay_list; | 1437 | struct list_head replay_list; |
1440 | struct list_head replay_buds; | 1438 | struct list_head replay_buds; |
1441 | unsigned long long cs_sqnum; | 1439 | unsigned long long cs_sqnum; |