diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-29 11:04:05 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-05-13 12:23:53 -0400 |
commit | b137545c44fc0c80fb778abb0c582bda5601e8f8 (patch) | |
tree | fb3da759a3c64587bee8bacf408cf774adb8b09a /fs/ubifs/replay.c | |
parent | cc64f774b4acd4954abe54f5919f50d78aba1e5f (diff) |
UBIFS: introduce a separate structure for budgeting info
This patch separates out all the budgeting-related information
from 'struct ubifs_info' to 'struct ubifs_budg_info'. This way the
code looks a bit cleaner. However, the main driver for this is
that we want to save budgeting information and print it later,
so a separate data structure for this is helpful.
This patch is a preparation for the further debugging output
improvements.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/replay.c')
-rw-r--r-- | fs/ubifs/replay.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index d3d6d365bfc1..c29c4687cc52 100644 --- a/fs/ubifs/replay.c +++ b/fs/ubifs/replay.c | |||
@@ -1065,13 +1065,13 @@ int ubifs_replay_journal(struct ubifs_info *c) | |||
1065 | goto out; | 1065 | goto out; |
1066 | 1066 | ||
1067 | /* | 1067 | /* |
1068 | * UBIFS budgeting calculations use @c->budg_uncommitted_idx variable | 1068 | * UBIFS budgeting calculations use @c->bi.uncommitted_idx variable |
1069 | * to roughly estimate index growth. Things like @c->min_idx_lebs | 1069 | * to roughly estimate index growth. Things like @c->bi.min_idx_lebs |
1070 | * depend on it. This means we have to initialize it to make sure | 1070 | * depend on it. This means we have to initialize it to make sure |
1071 | * budgeting works properly. | 1071 | * budgeting works properly. |
1072 | */ | 1072 | */ |
1073 | c->budg_uncommitted_idx = atomic_long_read(&c->dirty_zn_cnt); | 1073 | c->bi.uncommitted_idx = atomic_long_read(&c->dirty_zn_cnt); |
1074 | c->budg_uncommitted_idx *= c->max_idx_node_sz; | 1074 | c->bi.uncommitted_idx *= c->max_idx_node_sz; |
1075 | 1075 | ||
1076 | ubifs_assert(c->bud_bytes <= c->max_bud_bytes || c->need_recovery); | 1076 | ubifs_assert(c->bud_bytes <= c->max_bud_bytes || c->need_recovery); |
1077 | dbg_mnt("finished, log head LEB %d:%d, max_sqnum %llu, " | 1077 | dbg_mnt("finished, log head LEB %d:%d, max_sqnum %llu, " |