ubifs.h (553dea4dd531562688ba01c641c7f8fc7abaaf8c) ubifs.h (17c2f9f85c896b48a5d74a9155d99ec5b241a0e6)
1/*
2 * This file is part of UBIFS.
3 *
4 * Copyright (C) 2006-2008 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by
8 * the Free Software Foundation.

--- 896 unchanged lines hidden (view full) ---

905struct ubifs_mount_opts {
906 unsigned int unmount_mode:2;
907 unsigned int bulk_read:2;
908 unsigned int chk_data_crc:2;
909 unsigned int override_compr:1;
910 unsigned int compr_type:2;
911};
912
1/*
2 * This file is part of UBIFS.
3 *
4 * Copyright (C) 2006-2008 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by
8 * the Free Software Foundation.

--- 896 unchanged lines hidden (view full) ---

905struct ubifs_mount_opts {
906 unsigned int unmount_mode:2;
907 unsigned int bulk_read:2;
908 unsigned int chk_data_crc:2;
909 unsigned int override_compr:1;
910 unsigned int compr_type:2;
911};
912
913struct ubifs_debug_info;
914
913/**
914 * struct ubifs_info - UBIFS file-system description data structure
915 * (per-superblock).
916 * @vfs_sb: VFS @struct super_block object
917 * @bdi: backing device info object to make VFS happy and disable read-ahead
918 *
919 * @highest_inum: highest used inode number
920 * @max_sqnum: current global sequence number

--- 46 unchanged lines hidden (view full) ---

967 * @ileb_len: length of data in ileb_buf
968 * @ihead_lnum: LEB number of index head
969 * @ihead_offs: offset of index head
970 * @ilebs: pre-allocated index LEBs
971 * @ileb_cnt: number of pre-allocated index LEBs
972 * @ileb_nxt: next pre-allocated index LEBs
973 * @old_idx: tree of index nodes obsoleted since the last commit start
974 * @bottom_up_buf: a buffer which is used by 'dirty_cow_bottom_up()' in tnc.c
915/**
916 * struct ubifs_info - UBIFS file-system description data structure
917 * (per-superblock).
918 * @vfs_sb: VFS @struct super_block object
919 * @bdi: backing device info object to make VFS happy and disable read-ahead
920 *
921 * @highest_inum: highest used inode number
922 * @max_sqnum: current global sequence number

--- 46 unchanged lines hidden (view full) ---

969 * @ileb_len: length of data in ileb_buf
970 * @ihead_lnum: LEB number of index head
971 * @ihead_offs: offset of index head
972 * @ilebs: pre-allocated index LEBs
973 * @ileb_cnt: number of pre-allocated index LEBs
974 * @ileb_nxt: next pre-allocated index LEBs
975 * @old_idx: tree of index nodes obsoleted since the last commit start
976 * @bottom_up_buf: a buffer which is used by 'dirty_cow_bottom_up()' in tnc.c
975 * @new_ihead_lnum: used by debugging to check ihead_lnum
976 * @new_ihead_offs: used by debugging to check ihead_offs
977 *
978 * @mst_node: master node
979 * @mst_offs: offset of valid master node
980 * @mst_mutex: protects the master node area, @mst_node, and @mst_offs
981 *
982 * @max_bu_buf_len: maximum bulk-read buffer length
983 * @bu_mutex: protects the pre-allocated bulk-read buffer and @c->bu
984 * @bu: pre-allocated bulk-read information

--- 167 unchanged lines hidden (view full) ---

1152 * @replaying: set to %1 during journal replay
1153 * @unclean_leb_list: LEBs to recover when mounting ro to rw
1154 * @rcvrd_mst_node: recovered master node to write when mounting ro to rw
1155 * @size_tree: inode size information for recovery
1156 * @remounting_rw: set while remounting from ro to rw (sb flags have MS_RDONLY)
1157 * @always_chk_crc: always check CRCs (while mounting and remounting rw)
1158 * @mount_opts: UBIFS-specific mount options
1159 *
977 *
978 * @mst_node: master node
979 * @mst_offs: offset of valid master node
980 * @mst_mutex: protects the master node area, @mst_node, and @mst_offs
981 *
982 * @max_bu_buf_len: maximum bulk-read buffer length
983 * @bu_mutex: protects the pre-allocated bulk-read buffer and @c->bu
984 * @bu: pre-allocated bulk-read information

--- 167 unchanged lines hidden (view full) ---

1152 * @replaying: set to %1 during journal replay
1153 * @unclean_leb_list: LEBs to recover when mounting ro to rw
1154 * @rcvrd_mst_node: recovered master node to write when mounting ro to rw
1155 * @size_tree: inode size information for recovery
1156 * @remounting_rw: set while remounting from ro to rw (sb flags have MS_RDONLY)
1157 * @always_chk_crc: always check CRCs (while mounting and remounting rw)
1158 * @mount_opts: UBIFS-specific mount options
1159 *
1160 * @dbg_buf: a buffer of LEB size used for debugging purposes
1161 * @old_zroot: old index root - used by 'dbg_check_old_index()'
1162 * @old_zroot_level: old index root level - used by 'dbg_check_old_index()'
1163 * @old_zroot_sqnum: old index root sqnum - used by 'dbg_check_old_index()'
1164 * @failure_mode: failure mode for recovery testing
1165 * @fail_delay: 0=>don't delay, 1=>delay a time, 2=>delay a number of calls
1166 * @fail_timeout: time in jiffies when delay of failure mode expires
1167 * @fail_cnt: current number of calls to failure mode I/O functions
1168 * @fail_cnt_max: number of calls by which to delay failure mode
1160 * @dbg: debugging-related information
1169 */
1170struct ubifs_info {
1171 struct super_block *vfs_sb;
1172 struct backing_dev_info bdi;
1173
1174 ino_t highest_inum;
1175 unsigned long long max_sqnum;
1176 unsigned long long cmt_no;

--- 39 unchanged lines hidden (view full) ---

1216 int ileb_len;
1217 int ihead_lnum;
1218 int ihead_offs;
1219 int *ilebs;
1220 int ileb_cnt;
1221 int ileb_nxt;
1222 struct rb_root old_idx;
1223 int *bottom_up_buf;
1161 */
1162struct ubifs_info {
1163 struct super_block *vfs_sb;
1164 struct backing_dev_info bdi;
1165
1166 ino_t highest_inum;
1167 unsigned long long max_sqnum;
1168 unsigned long long cmt_no;

--- 39 unchanged lines hidden (view full) ---

1208 int ileb_len;
1209 int ihead_lnum;
1210 int ihead_offs;
1211 int *ilebs;
1212 int ileb_cnt;
1213 int ileb_nxt;
1214 struct rb_root old_idx;
1215 int *bottom_up_buf;
1224#ifdef CONFIG_UBIFS_FS_DEBUG
1225 int new_ihead_lnum;
1226 int new_ihead_offs;
1227#endif
1228
1229 struct ubifs_mst_node *mst_node;
1230 int mst_offs;
1231 struct mutex mst_mutex;
1232
1233 int max_bu_buf_len;
1234 struct mutex bu_mutex;
1235 struct bu_info bu;

--- 158 unchanged lines hidden (view full) ---

1394 struct list_head unclean_leb_list;
1395 struct ubifs_mst_node *rcvrd_mst_node;
1396 struct rb_root size_tree;
1397 int remounting_rw;
1398 int always_chk_crc;
1399 struct ubifs_mount_opts mount_opts;
1400
1401#ifdef CONFIG_UBIFS_FS_DEBUG
1216
1217 struct ubifs_mst_node *mst_node;
1218 int mst_offs;
1219 struct mutex mst_mutex;
1220
1221 int max_bu_buf_len;
1222 struct mutex bu_mutex;
1223 struct bu_info bu;

--- 158 unchanged lines hidden (view full) ---

1382 struct list_head unclean_leb_list;
1383 struct ubifs_mst_node *rcvrd_mst_node;
1384 struct rb_root size_tree;
1385 int remounting_rw;
1386 int always_chk_crc;
1387 struct ubifs_mount_opts mount_opts;
1388
1389#ifdef CONFIG_UBIFS_FS_DEBUG
1402 void *dbg_buf;
1403 struct ubifs_zbranch old_zroot;
1404 int old_zroot_level;
1405 unsigned long long old_zroot_sqnum;
1406 int failure_mode;
1407 int fail_delay;
1408 unsigned long fail_timeout;
1409 unsigned int fail_cnt;
1410 unsigned int fail_cnt_max;
1411 long long chk_lpt_sz;
1412 long long chk_lpt_sz2;
1413 long long chk_lpt_wastage;
1414 int chk_lpt_lebs;
1415 int new_nhead_lnum;
1416 int new_nhead_offs;
1390 struct ubifs_debug_info *dbg;
1417#endif
1418};
1419
1420extern struct list_head ubifs_infos;
1421extern spinlock_t ubifs_infos_lock;
1422extern atomic_long_t ubifs_clean_zn_cnt;
1423extern struct kmem_cache *ubifs_inode_slab;
1424extern struct super_operations ubifs_super_operations;

--- 311 unchanged lines hidden ---
1391#endif
1392};
1393
1394extern struct list_head ubifs_infos;
1395extern spinlock_t ubifs_infos_lock;
1396extern atomic_long_t ubifs_clean_zn_cnt;
1397extern struct kmem_cache *ubifs_inode_slab;
1398extern struct super_operations ubifs_super_operations;

--- 311 unchanged lines hidden ---