• Home
  • Raw
  • Download

Lines Matching refs:lp

459 int ubifs_garbage_collect_leb(struct ubifs_info *c, struct ubifs_lprops *lp)  in ubifs_garbage_collect_leb()  argument
464 int err = 0, lnum = lp->lnum; in ubifs_garbage_collect_leb()
471 if (lp->free + lp->dirty == c->leb_size) { in ubifs_garbage_collect_leb()
473 dbg_gc("LEB %d is free, return it", lp->lnum); in ubifs_garbage_collect_leb()
474 ubifs_assert(!(lp->flags & LPROPS_INDEX)); in ubifs_garbage_collect_leb()
476 if (lp->free != c->leb_size) { in ubifs_garbage_collect_leb()
485 err = ubifs_change_one_lp(c, lp->lnum, c->leb_size, in ubifs_garbage_collect_leb()
490 err = ubifs_leb_unmap(c, lp->lnum); in ubifs_garbage_collect_leb()
517 lnum, lp->free, lp->dirty); in ubifs_garbage_collect_leb()
553 lnum, lp->free, lp->dirty); in ubifs_garbage_collect_leb()
641 struct ubifs_lprops lp; in ubifs_garbage_collect() local
699 ret = ubifs_find_dirty_leb(c, &lp, min_space, anyway ? 0 : 1); in ubifs_garbage_collect()
707 lp.lnum, lp.free, lp.dirty, lp.free + lp.dirty, in ubifs_garbage_collect()
714 ret = ubifs_garbage_collect_leb(c, &lp); in ubifs_garbage_collect()
723 err = ubifs_return_leb(c, lp.lnum); in ubifs_garbage_collect()
733 dbg_gc("LEB %d freed, return", lp.lnum); in ubifs_garbage_collect()
734 ret = lp.lnum; in ubifs_garbage_collect()
745 dbg_gc("indexing LEB %d freed, continue", lp.lnum); in ubifs_garbage_collect()
751 dbg_gc("LEB %d retained, freed %d bytes", lp.lnum, in ubifs_garbage_collect()
814 ubifs_return_leb(c, lp.lnum); in ubifs_garbage_collect()
832 const struct ubifs_lprops *lp; in ubifs_gc_start_commit() local
842 lp = ubifs_fast_find_freeable(c); in ubifs_gc_start_commit()
843 if (IS_ERR(lp)) { in ubifs_gc_start_commit()
844 err = PTR_ERR(lp); in ubifs_gc_start_commit()
847 if (!lp) in ubifs_gc_start_commit()
849 ubifs_assert(!(lp->flags & LPROPS_TAKEN)); in ubifs_gc_start_commit()
850 ubifs_assert(!(lp->flags & LPROPS_INDEX)); in ubifs_gc_start_commit()
851 err = ubifs_leb_unmap(c, lp->lnum); in ubifs_gc_start_commit()
854 lp = ubifs_change_lp(c, lp, c->leb_size, 0, lp->flags, 0); in ubifs_gc_start_commit()
855 if (IS_ERR(lp)) { in ubifs_gc_start_commit()
856 err = PTR_ERR(lp); in ubifs_gc_start_commit()
859 ubifs_assert(!(lp->flags & LPROPS_TAKEN)); in ubifs_gc_start_commit()
860 ubifs_assert(!(lp->flags & LPROPS_INDEX)); in ubifs_gc_start_commit()
869 lp = ubifs_fast_find_frdi_idx(c); in ubifs_gc_start_commit()
870 if (IS_ERR(lp)) { in ubifs_gc_start_commit()
871 err = PTR_ERR(lp); in ubifs_gc_start_commit()
874 if (!lp) in ubifs_gc_start_commit()
881 ubifs_assert(!(lp->flags & LPROPS_TAKEN)); in ubifs_gc_start_commit()
882 ubifs_assert(lp->flags & LPROPS_INDEX); in ubifs_gc_start_commit()
884 flags = (lp->flags | LPROPS_TAKEN) ^ LPROPS_INDEX; in ubifs_gc_start_commit()
885 lp = ubifs_change_lp(c, lp, c->leb_size, 0, flags, 1); in ubifs_gc_start_commit()
886 if (IS_ERR(lp)) { in ubifs_gc_start_commit()
887 err = PTR_ERR(lp); in ubifs_gc_start_commit()
891 ubifs_assert(lp->flags & LPROPS_TAKEN); in ubifs_gc_start_commit()
892 ubifs_assert(!(lp->flags & LPROPS_INDEX)); in ubifs_gc_start_commit()
893 idx_gc->lnum = lp->lnum; in ubifs_gc_start_commit()