Lines Matching refs:lnum
81 static void ubifs_add_auth_dirt(struct ubifs_info *c, int lnum) in ubifs_add_auth_dirt() argument
84 ubifs_add_dirt(c, lnum, ubifs_auth_node_sz(c)); in ubifs_add_auth_dirt()
100 int err = 0, err1, retries = 0, avail, lnum, offs, squeeze; in reserve_space() local
119 if (wbuf->lnum != -1 && avail >= len) in reserve_space()
126 lnum = ubifs_find_free_space(c, len, &offs, squeeze); in reserve_space()
127 if (lnum >= 0) in reserve_space()
130 err = lnum; in reserve_space()
142 lnum = ubifs_garbage_collect(c, 0); in reserve_space()
143 if (lnum < 0) { in reserve_space()
144 err = lnum; in reserve_space()
166 dbg_jnl("got LEB %d for jhead %s", lnum, dbg_jhead(jhead)); in reserve_space()
169 if (wbuf->lnum != -1 && avail >= len) { in reserve_space()
176 lnum, wbuf->lnum, wbuf->offs + wbuf->used); in reserve_space()
177 err = ubifs_return_leb(c, lnum); in reserve_space()
197 err = ubifs_add_bud_to_log(c, jhead, lnum, offs); in reserve_space()
200 err = ubifs_wbuf_seek_nolock(wbuf, lnum, offs); in reserve_space()
213 err1 = ubifs_return_leb(c, lnum); in reserve_space()
269 int *lnum, int *offs, int sync) in write_head() argument
276 *lnum = c->jheads[jhead].wbuf.lnum; in write_head()
279 dbg_jhead(jhead), *lnum, *offs, len); in write_head()
542 int err, dlen, ilen, len, lnum, ino_offs, dent_offs, orphan_added = 0; in ubifs_jnl_update() local
636 err = write_head(c, BASEHD, dent, len, &lnum, &dent_offs, sync); in ubifs_jnl_update()
647 ubifs_add_auth_dirt(c, lnum); in ubifs_jnl_update()
656 err = ubifs_add_dirt(c, lnum, dlen); in ubifs_jnl_update()
658 err = ubifs_tnc_add_nm(c, &dent_key, lnum, dent_offs, dlen, in ubifs_jnl_update()
671 err = ubifs_tnc_add(c, &ino_key, lnum, ino_offs, ilen, hash_ino); in ubifs_jnl_update()
677 err = ubifs_tnc_add(c, &ino_key, lnum, ino_offs, in ubifs_jnl_update()
727 int err, lnum, offs, compr_type, out_len, compr_len, auth_len; in ubifs_jnl_write_data() local
795 err = write_head(c, DATAHD, data, write_len, &lnum, &offs, 0); in ubifs_jnl_write_data()
806 ubifs_add_auth_dirt(c, lnum); in ubifs_jnl_write_data()
808 err = ubifs_tnc_add(c, key, lnum, offs, dlen, hash); in ubifs_jnl_write_data()
843 int err, lnum, offs; in ubifs_jnl_write_inode() local
934 err = write_head(c, BASEHD, ino_start, write_len, &lnum, &offs, sync); in ubifs_jnl_write_inode()
947 err = ubifs_add_dirt(c, lnum, write_len); in ubifs_jnl_write_inode()
951 ubifs_add_auth_dirt(c, lnum); in ubifs_jnl_write_inode()
954 err = ubifs_tnc_add(c, &key, lnum, offs, ilen, hash); in ubifs_jnl_write_inode()
1060 int err, dlen1, dlen2, lnum, offs, len, plen = UBIFS_INO_NODE_SZ; in ubifs_jnl_xrename() local
1143 err = write_head(c, BASEHD, dent1, len, &lnum, &offs, sync); in ubifs_jnl_xrename()
1154 ubifs_add_auth_dirt(c, lnum); in ubifs_jnl_xrename()
1157 err = ubifs_tnc_add_nm(c, &key, lnum, offs, dlen1, hash_dent1, snd_nm); in ubifs_jnl_xrename()
1163 err = ubifs_tnc_add_nm(c, &key, lnum, offs, dlen2, hash_dent2, fst_nm); in ubifs_jnl_xrename()
1170 err = ubifs_tnc_add(c, &key, lnum, offs, plen, hash_p1); in ubifs_jnl_xrename()
1177 err = ubifs_tnc_add(c, &key, lnum, offs, plen, hash_p2); in ubifs_jnl_xrename()
1225 int err, dlen1, dlen2, ilen, lnum, offs, len, orphan_added = 0; in ubifs_jnl_rename() local
1344 err = write_head(c, BASEHD, dent, len, &lnum, &offs, sync); in ubifs_jnl_rename()
1358 ubifs_add_auth_dirt(c, lnum); in ubifs_jnl_rename()
1361 err = ubifs_tnc_add_nm(c, &key, lnum, offs, dlen1, hash_dent1, new_nm); in ubifs_jnl_rename()
1368 err = ubifs_tnc_add_nm(c, &key, lnum, offs, dlen2, hash_dent2, old_nm); in ubifs_jnl_rename()
1374 err = ubifs_add_dirt(c, lnum, dlen2); in ubifs_jnl_rename()
1387 err = ubifs_tnc_add(c, &key, lnum, offs, ilen, hash_new_inode); in ubifs_jnl_rename()
1394 err = ubifs_tnc_add(c, &key, lnum, offs, plen, hash_old_dir); in ubifs_jnl_rename()
1401 err = ubifs_tnc_add(c, &key, lnum, offs, plen, hash_new_dir); in ubifs_jnl_rename()
1516 int err, dlen, len, lnum, offs, bit, sz, sync = IS_SYNC(inode); in ubifs_jnl_truncate() local
1603 err = write_head(c, BASEHD, ino, len, &lnum, &offs, sync); in ubifs_jnl_truncate()
1610 ubifs_add_auth_dirt(c, lnum); in ubifs_jnl_truncate()
1614 err = ubifs_tnc_add(c, &key, lnum, sz, dlen, hash_dn); in ubifs_jnl_truncate()
1620 err = ubifs_tnc_add(c, &key, lnum, offs, UBIFS_INO_NODE_SZ, hash_ino); in ubifs_jnl_truncate()
1624 err = ubifs_add_dirt(c, lnum, UBIFS_TRUN_NODE_SZ); in ubifs_jnl_truncate()
1675 int err, xlen, hlen, len, lnum, xent_offs, aligned_xlen, write_len; in ubifs_jnl_delete_xattr() local
1727 err = write_head(c, BASEHD, xent, write_len, &lnum, &xent_offs, sync); in ubifs_jnl_delete_xattr()
1732 ubifs_add_auth_dirt(c, lnum); in ubifs_jnl_delete_xattr()
1741 err = ubifs_add_dirt(c, lnum, xlen); in ubifs_jnl_delete_xattr()
1754 err = ubifs_add_dirt(c, lnum, UBIFS_INO_NODE_SZ); in ubifs_jnl_delete_xattr()
1760 err = ubifs_tnc_add(c, &key1, lnum, xent_offs + len - hlen, hlen, hash); in ubifs_jnl_delete_xattr()
1796 int err, len1, len2, aligned_len, aligned_len1, lnum, offs; in ubifs_jnl_change_xattr() local
1833 err = write_head(c, BASEHD, ino, aligned_len, &lnum, &offs, 0); in ubifs_jnl_change_xattr()
1844 ubifs_add_auth_dirt(c, lnum); in ubifs_jnl_change_xattr()
1847 err = ubifs_tnc_add(c, &key, lnum, offs, len1, hash_host); in ubifs_jnl_change_xattr()
1852 err = ubifs_tnc_add(c, &key, lnum, offs + aligned_len1, len2, hash); in ubifs_jnl_change_xattr()