~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to fs/ubifs/tnc_commit.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
377
377
                                c->gap_lebs = NULL;
378
378
                                return err;
379
379
                        }
380
 
                        if (!dbg_force_in_the_gaps_enabled) {
 
380
                        if (dbg_force_in_the_gaps_enabled()) {
381
381
                                /*
382
382
                                 * Do not print scary warnings if the debugging
383
383
                                 * option which forces in-the-gaps is enabled.
384
384
                                 */
385
 
                                ubifs_err("out of space");
386
 
                                spin_lock(&c->space_lock);
387
 
                                dbg_dump_budg(c);
388
 
                                spin_unlock(&c->space_lock);
 
385
                                ubifs_warn("out of space");
 
386
                                dbg_dump_budg(c, &c->bi);
389
387
                                dbg_dump_lprops(c);
390
388
                        }
391
389
                        /* Try to commit anyway */
796
794
        spin_lock(&c->space_lock);
797
795
        /*
798
796
         * Although we have not finished committing yet, update size of the
799
 
         * committed index ('c->old_idx_sz') and zero out the index growth
 
797
         * committed index ('c->bi.old_idx_sz') and zero out the index growth
800
798
         * budget. It is OK to do this now, because we've reserved all the
801
799
         * space which is needed to commit the index, and it is save for the
802
800
         * budgeting subsystem to assume the index is already committed,
803
801
         * even though it is not.
804
802
         */
805
 
        ubifs_assert(c->min_idx_lebs == ubifs_calc_min_idx_lebs(c));
806
 
        c->old_idx_sz = c->calc_idx_sz;
807
 
        c->budg_uncommitted_idx = 0;
808
 
        c->min_idx_lebs = ubifs_calc_min_idx_lebs(c);
 
803
        ubifs_assert(c->bi.min_idx_lebs == ubifs_calc_min_idx_lebs(c));
 
804
        c->bi.old_idx_sz = c->calc_idx_sz;
 
805
        c->bi.uncommitted_idx = 0;
 
806
        c->bi.min_idx_lebs = ubifs_calc_min_idx_lebs(c);
809
807
        spin_unlock(&c->space_lock);
810
808
        mutex_unlock(&c->tnc_mutex);
811
809