Lines Matching refs:ubifs_info

647 struct ubifs_info;
650 typedef int (*ubifs_lpt_scan_callback)(struct ubifs_info *c,
686 struct ubifs_info *c;
694 int (*sync_callback)(struct ubifs_info *c, int lnum, int free, int pad);
1272 struct ubifs_info { struct
1535 static inline int ubifs_authenticated(const struct ubifs_info *c) in ubifs_authenticated() argument
1540 struct shash_desc *__ubifs_hash_get_desc(const struct ubifs_info *c);
1541 static inline struct shash_desc *ubifs_hash_get_desc(const struct ubifs_info *c) in ubifs_hash_get_desc()
1546 static inline int ubifs_shash_init(const struct ubifs_info *c, in ubifs_shash_init()
1555 static inline int ubifs_shash_update(const struct ubifs_info *c, in ubifs_shash_update()
1570 static inline int ubifs_shash_final(const struct ubifs_info *c, in ubifs_shash_final()
1576 int __ubifs_node_calc_hash(const struct ubifs_info *c, const void *buf,
1578 static inline int ubifs_node_calc_hash(const struct ubifs_info *c, in ubifs_node_calc_hash()
1587 int ubifs_prepare_auth_node(struct ubifs_info *c, void *node,
1599 static inline int ubifs_check_hash(const struct ubifs_info *c, in ubifs_check_hash()
1614 static inline int ubifs_check_hmac(const struct ubifs_info *c, in ubifs_check_hmac()
1621 void ubifs_bad_hash(const struct ubifs_info *c, const void *node,
1624 static inline void ubifs_bad_hash(const struct ubifs_info *c, const void *node, in ubifs_bad_hash()
1628 int __ubifs_node_check_hash(const struct ubifs_info *c, const void *buf,
1630 static inline int ubifs_node_check_hash(const struct ubifs_info *c, in ubifs_node_check_hash()
1639 int ubifs_init_authentication(struct ubifs_info *c);
1640 void __ubifs_exit_authentication(struct ubifs_info *c);
1641 static inline void ubifs_exit_authentication(struct ubifs_info *c) in ubifs_exit_authentication()
1655 static inline u8 *ubifs_branch_hash(struct ubifs_info *c, in ubifs_branch_hash()
1669 static inline void ubifs_copy_hash(const struct ubifs_info *c, const u8 *from, in ubifs_copy_hash()
1676 int __ubifs_node_insert_hmac(const struct ubifs_info *c, void *buf,
1678 static inline int ubifs_node_insert_hmac(const struct ubifs_info *c, void *buf, in ubifs_node_insert_hmac()
1687 int __ubifs_node_verify_hmac(const struct ubifs_info *c, const void *buf,
1689 static inline int ubifs_node_verify_hmac(const struct ubifs_info *c, in ubifs_node_verify_hmac()
1706 static inline int ubifs_auth_node_sz(const struct ubifs_info *c) in ubifs_auth_node_sz()
1713 int ubifs_sb_verify_signature(struct ubifs_info *c,
1715 bool ubifs_hmac_zero(struct ubifs_info *c, const u8 *hmac);
1717 int ubifs_hmac_wkm(struct ubifs_info *c, u8 *hmac);
1719 int __ubifs_shash_copy_state(const struct ubifs_info *c, struct shash_desc *src,
1721 static inline int ubifs_shash_copy_state(const struct ubifs_info *c, in ubifs_shash_copy_state()
1732 void ubifs_ro_mode(struct ubifs_info *c, int err);
1733 int ubifs_leb_read(const struct ubifs_info *c, int lnum, void *buf, int offs,
1735 int ubifs_leb_write(struct ubifs_info *c, int lnum, const void *buf, int offs,
1737 int ubifs_leb_change(struct ubifs_info *c, int lnum, const void *buf, int len);
1738 int ubifs_leb_unmap(struct ubifs_info *c, int lnum);
1739 int ubifs_leb_map(struct ubifs_info *c, int lnum);
1740 int ubifs_is_mapped(const struct ubifs_info *c, int lnum);
1743 int ubifs_wbuf_init(struct ubifs_info *c, struct ubifs_wbuf *wbuf);
1744 int ubifs_read_node(const struct ubifs_info *c, void *buf, int type, int len,
1748 int ubifs_write_node(struct ubifs_info *c, void *node, int len, int lnum,
1750 int ubifs_write_node_hmac(struct ubifs_info *c, void *buf, int len, int lnum,
1752 int ubifs_check_node(const struct ubifs_info *c, const void *buf, int len,
1754 void ubifs_init_node(struct ubifs_info *c, void *buf, int len, int pad);
1755 void ubifs_crc_node(struct ubifs_info *c, void *buf, int len);
1756 void ubifs_prepare_node(struct ubifs_info *c, void *buf, int len, int pad);
1757 int ubifs_prepare_node_hmac(struct ubifs_info *c, void *node, int len,
1759 void ubifs_prep_grp_node(struct ubifs_info *c, void *node, int len, int last);
1760 int ubifs_io_init(struct ubifs_info *c);
1761 void ubifs_pad(const struct ubifs_info *c, void *buf, int pad);
1763 int ubifs_bg_wbufs_sync(struct ubifs_info *c);
1765 int ubifs_sync_wbufs_by_inode(struct ubifs_info *c, struct inode *inode);
1768 struct ubifs_scan_leb *ubifs_scan(const struct ubifs_info *c, int lnum,
1771 int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum,
1773 struct ubifs_scan_leb *ubifs_start_scan(const struct ubifs_info *c, int lnum,
1775 void ubifs_end_scan(const struct ubifs_info *c, struct ubifs_scan_leb *sleb,
1777 int ubifs_add_snod(const struct ubifs_info *c, struct ubifs_scan_leb *sleb,
1779 void ubifs_scanned_corruption(const struct ubifs_info *c, int lnum, int offs,
1783 void ubifs_add_bud(struct ubifs_info *c, struct ubifs_bud *bud);
1784 void ubifs_create_buds_lists(struct ubifs_info *c);
1785 int ubifs_add_bud_to_log(struct ubifs_info *c, int jhead, int lnum, int offs);
1786 struct ubifs_bud *ubifs_search_bud(struct ubifs_info *c, int lnum);
1787 struct ubifs_wbuf *ubifs_get_wbuf(struct ubifs_info *c, int lnum);
1788 int ubifs_log_start_commit(struct ubifs_info *c, int *ltail_lnum);
1789 int ubifs_log_end_commit(struct ubifs_info *c, int new_ltail_lnum);
1790 int ubifs_log_post_commit(struct ubifs_info *c, int old_ltail_lnum);
1791 int ubifs_consolidate_log(struct ubifs_info *c);
1794 int ubifs_jnl_update(struct ubifs_info *c, const struct inode *dir,
1797 int ubifs_jnl_write_data(struct ubifs_info *c, const struct inode *inode,
1799 int ubifs_jnl_write_inode(struct ubifs_info *c, const struct inode *inode);
1800 int ubifs_jnl_delete_inode(struct ubifs_info *c, const struct inode *inode);
1801 int ubifs_jnl_xrename(struct ubifs_info *c, const struct inode *fst_dir,
1807 int ubifs_jnl_rename(struct ubifs_info *c, const struct inode *old_dir,
1814 int ubifs_jnl_truncate(struct ubifs_info *c, const struct inode *inode,
1816 int ubifs_jnl_delete_xattr(struct ubifs_info *c, const struct inode *host,
1818 int ubifs_jnl_change_xattr(struct ubifs_info *c, const struct inode *inode1,
1822 int ubifs_budget_space(struct ubifs_info *c, struct ubifs_budget_req *req);
1823 void ubifs_release_budget(struct ubifs_info *c, struct ubifs_budget_req *req);
1824 void ubifs_release_dirty_inode_budget(struct ubifs_info *c,
1826 int ubifs_budget_inode_op(struct ubifs_info *c, struct inode *inode,
1828 void ubifs_release_ino_dirty(struct ubifs_info *c, struct inode *inode,
1830 void ubifs_cancel_ino_op(struct ubifs_info *c, struct inode *inode,
1832 long long ubifs_get_free_space(struct ubifs_info *c);
1833 long long ubifs_get_free_space_nolock(struct ubifs_info *c);
1834 int ubifs_calc_min_idx_lebs(struct ubifs_info *c);
1835 void ubifs_convert_page_budget(struct ubifs_info *c);
1836 long long ubifs_reported_space(const struct ubifs_info *c, long long free);
1837 long long ubifs_calc_available(const struct ubifs_info *c, int min_idx_lebs);
1840 int ubifs_find_free_space(struct ubifs_info *c, int min_space, int *offs,
1842 int ubifs_find_free_leb_for_idx(struct ubifs_info *c);
1843 int ubifs_find_dirty_leb(struct ubifs_info *c, struct ubifs_lprops *ret_lp,
1845 int ubifs_find_dirty_idx_leb(struct ubifs_info *c);
1846 int ubifs_save_dirty_idx_lnums(struct ubifs_info *c);
1849 int ubifs_lookup_level0(struct ubifs_info *c, const union ubifs_key *key,
1851 int ubifs_tnc_lookup_nm(struct ubifs_info *c, const union ubifs_key *key,
1853 int ubifs_tnc_lookup_dh(struct ubifs_info *c, const union ubifs_key *key,
1855 int ubifs_tnc_locate(struct ubifs_info *c, const union ubifs_key *key,
1857 int ubifs_tnc_add(struct ubifs_info *c, const union ubifs_key *key, int lnum,
1859 int ubifs_tnc_replace(struct ubifs_info *c, const union ubifs_key *key,
1861 int ubifs_tnc_add_nm(struct ubifs_info *c, const union ubifs_key *key,
1864 int ubifs_tnc_remove(struct ubifs_info *c, const union ubifs_key *key);
1865 int ubifs_tnc_remove_nm(struct ubifs_info *c, const union ubifs_key *key,
1867 int ubifs_tnc_remove_dh(struct ubifs_info *c, const union ubifs_key *key,
1869 int ubifs_tnc_remove_range(struct ubifs_info *c, union ubifs_key *from_key,
1871 int ubifs_tnc_remove_ino(struct ubifs_info *c, ino_t inum);
1872 struct ubifs_dent_node *ubifs_tnc_next_ent(struct ubifs_info *c,
1875 void ubifs_tnc_close(struct ubifs_info *c);
1876 int ubifs_tnc_has_node(struct ubifs_info *c, union ubifs_key *key, int level,
1878 int ubifs_dirty_idx_node(struct ubifs_info *c, union ubifs_key *key, int level,
1881 void destroy_old_idx(struct ubifs_info *c);
1882 int is_idx_node_in_tnc(struct ubifs_info *c, union ubifs_key *key, int level,
1884 int insert_old_idx_znode(struct ubifs_info *c, struct ubifs_znode *znode);
1885 int ubifs_tnc_get_bu_keys(struct ubifs_info *c, struct bu_info *bu);
1886 int ubifs_tnc_bulk_read(struct ubifs_info *c, struct bu_info *bu);
1889 struct ubifs_znode *ubifs_tnc_levelorder_next(const struct ubifs_info *c,
1892 int ubifs_search_zbranch(const struct ubifs_info *c,
1896 struct ubifs_znode *ubifs_tnc_postorder_next(const struct ubifs_info *c,
1898 long ubifs_destroy_tnc_subtree(const struct ubifs_info *c,
1900 void ubifs_destroy_tnc_tree(struct ubifs_info *c);
1901 struct ubifs_znode *ubifs_load_znode(struct ubifs_info *c,
1904 int ubifs_tnc_read_node(struct ubifs_info *c, struct ubifs_zbranch *zbr,
1908 int ubifs_tnc_start_commit(struct ubifs_info *c, struct ubifs_zbranch *zroot);
1909 int ubifs_tnc_end_commit(struct ubifs_info *c);
1919 void ubifs_commit_required(struct ubifs_info *c);
1920 void ubifs_request_bg_commit(struct ubifs_info *c);
1921 int ubifs_run_commit(struct ubifs_info *c);
1922 void ubifs_recovery_commit(struct ubifs_info *c);
1923 int ubifs_gc_should_commit(struct ubifs_info *c);
1924 void ubifs_wait_for_commit(struct ubifs_info *c);
1927 int ubifs_compare_master_node(struct ubifs_info *c, void *m1, void *m2);
1928 int ubifs_read_master(struct ubifs_info *c);
1929 int ubifs_write_master(struct ubifs_info *c);
1932 int ubifs_read_superblock(struct ubifs_info *c);
1933 int ubifs_write_sb_node(struct ubifs_info *c, struct ubifs_sb_node *sup);
1934 int ubifs_fixup_free_space(struct ubifs_info *c);
1935 int ubifs_enable_encryption(struct ubifs_info *c);
1938 int ubifs_validate_entry(struct ubifs_info *c,
1940 int ubifs_replay_journal(struct ubifs_info *c);
1943 int ubifs_garbage_collect(struct ubifs_info *c, int anyway);
1944 int ubifs_gc_start_commit(struct ubifs_info *c);
1945 int ubifs_gc_end_commit(struct ubifs_info *c);
1946 void ubifs_destroy_idx_gc(struct ubifs_info *c);
1947 int ubifs_get_idx_gc_leb(struct ubifs_info *c);
1948 int ubifs_garbage_collect_leb(struct ubifs_info *c, struct ubifs_lprops *lp);
1951 int ubifs_add_orphan(struct ubifs_info *c, ino_t inum);
1952 void ubifs_delete_orphan(struct ubifs_info *c, ino_t inum);
1953 int ubifs_orphan_start_commit(struct ubifs_info *c);
1954 int ubifs_orphan_end_commit(struct ubifs_info *c);
1955 int ubifs_mount_orphans(struct ubifs_info *c, int unclean, int read_only);
1956 int ubifs_clear_orphans(struct ubifs_info *c);
1959 int ubifs_calc_lpt_geom(struct ubifs_info *c);
1960 int ubifs_create_dflt_lpt(struct ubifs_info *c, int *main_lebs, int lpt_first,
1962 int ubifs_lpt_init(struct ubifs_info *c, int rd, int wr);
1963 struct ubifs_lprops *ubifs_lpt_lookup(struct ubifs_info *c, int lnum);
1964 struct ubifs_lprops *ubifs_lpt_lookup_dirty(struct ubifs_info *c, int lnum);
1965 int ubifs_lpt_scan_nolock(struct ubifs_info *c, int start_lnum, int end_lnum,
1969 void ubifs_pack_lsave(struct ubifs_info *c, void *buf, int *lsave);
1970 void ubifs_pack_ltab(struct ubifs_info *c, void *buf,
1972 void ubifs_pack_pnode(struct ubifs_info *c, void *buf,
1974 void ubifs_pack_nnode(struct ubifs_info *c, void *buf,
1976 struct ubifs_pnode *ubifs_get_pnode(struct ubifs_info *c,
1978 struct ubifs_nnode *ubifs_get_nnode(struct ubifs_info *c,
1980 struct ubifs_pnode *ubifs_pnode_lookup(struct ubifs_info *c, int i);
1981 int ubifs_read_nnode(struct ubifs_info *c, struct ubifs_nnode *parent, int iip);
1982 void ubifs_add_lpt_dirt(struct ubifs_info *c, int lnum, int dirty);
1983 void ubifs_add_nnode_dirt(struct ubifs_info *c, struct ubifs_nnode *nnode);
1984 uint32_t ubifs_unpack_bits(const struct ubifs_info *c, uint8_t **addr, int *pos, int nrbits);
1985 struct ubifs_nnode *ubifs_first_nnode(struct ubifs_info *c, int *hght);
1987 int ubifs_unpack_nnode(const struct ubifs_info *c, void *buf,
1989 int ubifs_lpt_calc_hash(struct ubifs_info *c, u8 *hash);
1992 int ubifs_lpt_start_commit(struct ubifs_info *c);
1993 int ubifs_lpt_end_commit(struct ubifs_info *c);
1994 int ubifs_lpt_post_commit(struct ubifs_info *c);
1995 void ubifs_lpt_free(struct ubifs_info *c, int wr_only);
1998 const struct ubifs_lprops *ubifs_change_lp(struct ubifs_info *c,
2002 void ubifs_get_lp_stats(struct ubifs_info *c, struct ubifs_lp_stats *lst);
2003 void ubifs_add_to_cat(struct ubifs_info *c, struct ubifs_lprops *lprops,
2005 void ubifs_replace_cat(struct ubifs_info *c, struct ubifs_lprops *old_lprops,
2007 void ubifs_ensure_cat(struct ubifs_info *c, struct ubifs_lprops *lprops);
2008 int ubifs_categorize_lprops(const struct ubifs_info *c,
2010 int ubifs_change_one_lp(struct ubifs_info *c, int lnum, int free, int dirty,
2012 int ubifs_update_one_lp(struct ubifs_info *c, int lnum, int free, int dirty,
2014 int ubifs_read_one_lp(struct ubifs_info *c, int lnum, struct ubifs_lprops *lp);
2015 const struct ubifs_lprops *ubifs_fast_find_free(struct ubifs_info *c);
2016 const struct ubifs_lprops *ubifs_fast_find_empty(struct ubifs_info *c);
2017 const struct ubifs_lprops *ubifs_fast_find_freeable(struct ubifs_info *c);
2018 const struct ubifs_lprops *ubifs_fast_find_frdi_idx(struct ubifs_info *c);
2019 int ubifs_calc_dark(const struct ubifs_info *c, int spc);
2028 struct inode *ubifs_new_inode(struct ubifs_info *c, struct inode *dir,
2043 void ubifs_evict_xattr_inode(struct ubifs_info *c, ino_t xattr_inum);
2048 static inline void ubifs_evict_xattr_inode(struct ubifs_info *c, in ubifs_evict_xattr_inode()
2072 int ubifs_recover_master_node(struct ubifs_info *c);
2073 int ubifs_write_rcvrd_mst_node(struct ubifs_info *c);
2074 struct ubifs_scan_leb *ubifs_recover_leb(struct ubifs_info *c, int lnum,
2076 struct ubifs_scan_leb *ubifs_recover_log_leb(struct ubifs_info *c, int lnum,
2078 int ubifs_recover_inl_heads(struct ubifs_info *c, void *sbuf);
2079 int ubifs_clean_lebs(struct ubifs_info *c, void *sbuf);
2080 int ubifs_rcvry_gc_commit(struct ubifs_info *c);
2081 int ubifs_recover_size_accum(struct ubifs_info *c, union ubifs_key *key,
2083 int ubifs_recover_size(struct ubifs_info *c, bool in_place);
2084 void ubifs_destroy_size_tree(struct ubifs_info *c);
2099 void ubifs_compress(const struct ubifs_info *c, const void *in_buf, int in_len,
2101 int ubifs_decompress(const struct ubifs_info *c, const void *buf, int len,
2107 int ubifs_sysfs_register(struct ubifs_info *c);
2108 void ubifs_sysfs_unregister(struct ubifs_info *c);
2120 struct ubifs_info *c = inode->i_sb->s_fs_info; in ubifs_encrypt()
2128 struct ubifs_info *c = inode->i_sb->s_fs_info; in ubifs_decrypt()
2144 void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...);
2146 void ubifs_err(const struct ubifs_info *c, const char *fmt, ...);
2148 void ubifs_warn(const struct ubifs_info *c, const char *fmt, ...);