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/master.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/master.c')
-rw-r--r-- | fs/ubifs/master.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ubifs/master.c b/fs/ubifs/master.c index 21f47afdacff..278c2382e8c2 100644 --- a/fs/ubifs/master.c +++ b/fs/ubifs/master.c | |||
@@ -148,7 +148,7 @@ static int validate_master(const struct ubifs_info *c) | |||
148 | } | 148 | } |
149 | 149 | ||
150 | main_sz = (long long)c->main_lebs * c->leb_size; | 150 | main_sz = (long long)c->main_lebs * c->leb_size; |
151 | if (c->old_idx_sz & 7 || c->old_idx_sz >= main_sz) { | 151 | if (c->bi.old_idx_sz & 7 || c->bi.old_idx_sz >= main_sz) { |
152 | err = 9; | 152 | err = 9; |
153 | goto out; | 153 | goto out; |
154 | } | 154 | } |
@@ -218,7 +218,7 @@ static int validate_master(const struct ubifs_info *c) | |||
218 | } | 218 | } |
219 | 219 | ||
220 | if (c->lst.total_dead + c->lst.total_dark + | 220 | if (c->lst.total_dead + c->lst.total_dark + |
221 | c->lst.total_used + c->old_idx_sz > main_sz) { | 221 | c->lst.total_used + c->bi.old_idx_sz > main_sz) { |
222 | err = 21; | 222 | err = 21; |
223 | goto out; | 223 | goto out; |
224 | } | 224 | } |
@@ -286,7 +286,7 @@ int ubifs_read_master(struct ubifs_info *c) | |||
286 | c->gc_lnum = le32_to_cpu(c->mst_node->gc_lnum); | 286 | c->gc_lnum = le32_to_cpu(c->mst_node->gc_lnum); |
287 | c->ihead_lnum = le32_to_cpu(c->mst_node->ihead_lnum); | 287 | c->ihead_lnum = le32_to_cpu(c->mst_node->ihead_lnum); |
288 | c->ihead_offs = le32_to_cpu(c->mst_node->ihead_offs); | 288 | c->ihead_offs = le32_to_cpu(c->mst_node->ihead_offs); |
289 | c->old_idx_sz = le64_to_cpu(c->mst_node->index_size); | 289 | c->bi.old_idx_sz = le64_to_cpu(c->mst_node->index_size); |
290 | c->lpt_lnum = le32_to_cpu(c->mst_node->lpt_lnum); | 290 | c->lpt_lnum = le32_to_cpu(c->mst_node->lpt_lnum); |
291 | c->lpt_offs = le32_to_cpu(c->mst_node->lpt_offs); | 291 | c->lpt_offs = le32_to_cpu(c->mst_node->lpt_offs); |
292 | c->nhead_lnum = le32_to_cpu(c->mst_node->nhead_lnum); | 292 | c->nhead_lnum = le32_to_cpu(c->mst_node->nhead_lnum); |
@@ -305,7 +305,7 @@ int ubifs_read_master(struct ubifs_info *c) | |||
305 | c->lst.total_dead = le64_to_cpu(c->mst_node->total_dead); | 305 | c->lst.total_dead = le64_to_cpu(c->mst_node->total_dead); |
306 | c->lst.total_dark = le64_to_cpu(c->mst_node->total_dark); | 306 | c->lst.total_dark = le64_to_cpu(c->mst_node->total_dark); |
307 | 307 | ||
308 | c->calc_idx_sz = c->old_idx_sz; | 308 | c->calc_idx_sz = c->bi.old_idx_sz; |
309 | 309 | ||
310 | if (c->mst_node->flags & cpu_to_le32(UBIFS_MST_NO_ORPHS)) | 310 | if (c->mst_node->flags & cpu_to_le32(UBIFS_MST_NO_ORPHS)) |
311 | c->no_orphs = 1; | 311 | c->no_orphs = 1; |