You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
@@ -796,16 +796,16 @@ int ubifs_tnc_start_commit(struct ubifs_info *c, struct ubifs_zbranch *zroot)
|
||||
spin_lock(&c->space_lock);
|
||||
/*
|
||||
* Although we have not finished committing yet, update size of the
|
||||
* committed index ('c->old_idx_sz') and zero out the index growth
|
||||
* committed index ('c->bi.old_idx_sz') and zero out the index growth
|
||||
* budget. It is OK to do this now, because we've reserved all the
|
||||
* space which is needed to commit the index, and it is save for the
|
||||
* budgeting subsystem to assume the index is already committed,
|
||||
* even though it is not.
|
||||
*/
|
||||
ubifs_assert(c->min_idx_lebs == ubifs_calc_min_idx_lebs(c));
|
||||
c->old_idx_sz = c->calc_idx_sz;
|
||||
c->budg_uncommitted_idx = 0;
|
||||
c->min_idx_lebs = ubifs_calc_min_idx_lebs(c);
|
||||
ubifs_assert(c->bi.min_idx_lebs == ubifs_calc_min_idx_lebs(c));
|
||||
c->bi.old_idx_sz = c->calc_idx_sz;
|
||||
c->bi.uncommitted_idx = 0;
|
||||
c->bi.min_idx_lebs = ubifs_calc_min_idx_lebs(c);
|
||||
spin_unlock(&c->space_lock);
|
||||
mutex_unlock(&c->tnc_mutex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user