diff options
author | James Morris <jmorris@namei.org> | 2009-02-05 19:01:45 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-02-05 19:01:45 -0500 |
commit | cb5629b10d64a8006622ce3a52bc887d91057d69 (patch) | |
tree | 7c06d8f30783115e3384721046258ce615b129c5 /fs/ubifs/ubifs.h | |
parent | 8920d5ad6ba74ae8ab020e90cc4d976980e68701 (diff) | |
parent | f01d1d546abb2f4028b5299092f529eefb01253a (diff) |
Merge branch 'master' into next
Conflicts:
fs/namei.c
Manually merged per:
diff --cc fs/namei.c
index 734f2b5,bbc15c2..0000000
--- a/fs/namei.c
+++ b/fs/namei.c
@@@ -860,9 -848,8 +849,10 @@@ static int __link_path_walk(const char
nd->flags |= LOOKUP_CONTINUE;
err = exec_permission_lite(inode);
if (err == -EAGAIN)
- err = vfs_permission(nd, MAY_EXEC);
+ err = inode_permission(nd->path.dentry->d_inode,
+ MAY_EXEC);
+ if (!err)
+ err = ima_path_check(&nd->path, MAY_EXEC);
if (err)
break;
@@@ -1525,14 -1506,9 +1509,14 @@@ int may_open(struct path *path, int acc
flag &= ~O_TRUNC;
}
- error = vfs_permission(nd, acc_mode);
+ error = inode_permission(inode, acc_mode);
if (error)
return error;
+
- error = ima_path_check(&nd->path,
++ error = ima_path_check(path,
+ acc_mode & (MAY_READ | MAY_WRITE | MAY_EXEC));
+ if (error)
+ return error;
/*
* An append-only file must be opened in append mode for writing.
*/
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'fs/ubifs/ubifs.h')
-rw-r--r-- | fs/ubifs/ubifs.h | 137 |
1 files changed, 66 insertions, 71 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index 46b172560a06..039a68bee29a 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -63,6 +63,14 @@ | |||
63 | #define SQNUM_WARN_WATERMARK 0xFFFFFFFF00000000ULL | 63 | #define SQNUM_WARN_WATERMARK 0xFFFFFFFF00000000ULL |
64 | #define SQNUM_WATERMARK 0xFFFFFFFFFF000000ULL | 64 | #define SQNUM_WATERMARK 0xFFFFFFFFFF000000ULL |
65 | 65 | ||
66 | /* | ||
67 | * Minimum amount of LEBs reserved for the index. At present the index needs at | ||
68 | * least 2 LEBs: one for the index head and one for in-the-gaps method (which | ||
69 | * currently does not cater for the index head and so excludes it from | ||
70 | * consideration). | ||
71 | */ | ||
72 | #define MIN_INDEX_LEBS 2 | ||
73 | |||
66 | /* Minimum amount of data UBIFS writes to the flash */ | 74 | /* Minimum amount of data UBIFS writes to the flash */ |
67 | #define MIN_WRITE_SZ (UBIFS_DATA_NODE_SZ + 8) | 75 | #define MIN_WRITE_SZ (UBIFS_DATA_NODE_SZ + 8) |
68 | 76 | ||
@@ -386,12 +394,12 @@ struct ubifs_inode { | |||
386 | unsigned int dirty:1; | 394 | unsigned int dirty:1; |
387 | unsigned int xattr:1; | 395 | unsigned int xattr:1; |
388 | unsigned int bulk_read:1; | 396 | unsigned int bulk_read:1; |
397 | unsigned int compr_type:2; | ||
389 | struct mutex ui_mutex; | 398 | struct mutex ui_mutex; |
390 | spinlock_t ui_lock; | 399 | spinlock_t ui_lock; |
391 | loff_t synced_i_size; | 400 | loff_t synced_i_size; |
392 | loff_t ui_size; | 401 | loff_t ui_size; |
393 | int flags; | 402 | int flags; |
394 | int compr_type; | ||
395 | pgoff_t last_page_read; | 403 | pgoff_t last_page_read; |
396 | pgoff_t read_in_a_row; | 404 | pgoff_t read_in_a_row; |
397 | int data_len; | 405 | int data_len; |
@@ -418,9 +426,9 @@ struct ubifs_unclean_leb { | |||
418 | * LEB properties flags. | 426 | * LEB properties flags. |
419 | * | 427 | * |
420 | * LPROPS_UNCAT: not categorized | 428 | * LPROPS_UNCAT: not categorized |
421 | * LPROPS_DIRTY: dirty > 0, not index | 429 | * LPROPS_DIRTY: dirty > free, dirty >= @c->dead_wm, not index |
422 | * LPROPS_DIRTY_IDX: dirty + free > UBIFS_CH_SZ and index | 430 | * LPROPS_DIRTY_IDX: dirty + free > @c->min_idx_node_sze and index |
423 | * LPROPS_FREE: free > 0, not empty, not index | 431 | * LPROPS_FREE: free > 0, dirty < @c->dead_wm, not empty, not index |
424 | * LPROPS_HEAP_CNT: number of heaps used for storing categorized LEBs | 432 | * LPROPS_HEAP_CNT: number of heaps used for storing categorized LEBs |
425 | * LPROPS_EMPTY: LEB is empty, not taken | 433 | * LPROPS_EMPTY: LEB is empty, not taken |
426 | * LPROPS_FREEABLE: free + dirty == leb_size, not index, not taken | 434 | * LPROPS_FREEABLE: free + dirty == leb_size, not index, not taken |
@@ -473,8 +481,8 @@ struct ubifs_lprops { | |||
473 | struct ubifs_lpt_lprops { | 481 | struct ubifs_lpt_lprops { |
474 | int free; | 482 | int free; |
475 | int dirty; | 483 | int dirty; |
476 | unsigned tgc : 1; | 484 | unsigned tgc:1; |
477 | unsigned cmt : 1; | 485 | unsigned cmt:1; |
478 | }; | 486 | }; |
479 | 487 | ||
480 | /** | 488 | /** |
@@ -482,24 +490,26 @@ struct ubifs_lpt_lprops { | |||
482 | * @empty_lebs: number of empty LEBs | 490 | * @empty_lebs: number of empty LEBs |
483 | * @taken_empty_lebs: number of taken LEBs | 491 | * @taken_empty_lebs: number of taken LEBs |
484 | * @idx_lebs: number of indexing LEBs | 492 | * @idx_lebs: number of indexing LEBs |
485 | * @total_free: total free space in bytes | 493 | * @total_free: total free space in bytes (includes all LEBs) |
486 | * @total_dirty: total dirty space in bytes | 494 | * @total_dirty: total dirty space in bytes (includes all LEBs) |
487 | * @total_used: total used space in bytes (includes only data LEBs) | 495 | * @total_used: total used space in bytes (does not include index LEBs) |
488 | * @total_dead: total dead space in bytes (includes only data LEBs) | 496 | * @total_dead: total dead space in bytes (does not include index LEBs) |
489 | * @total_dark: total dark space in bytes (includes only data LEBs) | 497 | * @total_dark: total dark space in bytes (does not include index LEBs) |
498 | * | ||
499 | * The @taken_empty_lebs field counts the LEBs that are in the transient state | ||
500 | * of having been "taken" for use but not yet written to. @taken_empty_lebs is | ||
501 | * needed to account correctly for @gc_lnum, otherwise @empty_lebs could be | ||
502 | * used by itself (in which case 'unused_lebs' would be a better name). In the | ||
503 | * case of @gc_lnum, it is "taken" at mount time or whenever a LEB is retained | ||
504 | * by GC, but unlike other empty LEBs that are "taken", it may not be written | ||
505 | * straight away (i.e. before the next commit start or unmount), so either | ||
506 | * @gc_lnum must be specially accounted for, or the current approach followed | ||
507 | * i.e. count it under @taken_empty_lebs. | ||
490 | * | 508 | * |
491 | * N.B. total_dirty and total_used are different to other total_* fields, | 509 | * @empty_lebs includes @taken_empty_lebs. |
492 | * because they account _all_ LEBs, not just data LEBs. | ||
493 | * | 510 | * |
494 | * 'taken_empty_lebs' counts the LEBs that are in the transient state of having | 511 | * @total_used, @total_dead and @total_dark fields do not account indexing |
495 | * been 'taken' for use but not yet written to. 'taken_empty_lebs' is needed | 512 | * LEBs. |
496 | * to account correctly for gc_lnum, otherwise 'empty_lebs' could be used | ||
497 | * by itself (in which case 'unused_lebs' would be a better name). In the case | ||
498 | * of gc_lnum, it is 'taken' at mount time or whenever a LEB is retained by GC, | ||
499 | * but unlike other empty LEBs that are 'taken', it may not be written straight | ||
500 | * away (i.e. before the next commit start or unmount), so either gc_lnum must | ||
501 | * be specially accounted for, or the current approach followed i.e. count it | ||
502 | * under 'taken_empty_lebs'. | ||
503 | */ | 513 | */ |
504 | struct ubifs_lp_stats { | 514 | struct ubifs_lp_stats { |
505 | int empty_lebs; | 515 | int empty_lebs; |
@@ -893,15 +903,25 @@ struct ubifs_orphan { | |||
893 | /** | 903 | /** |
894 | * struct ubifs_mount_opts - UBIFS-specific mount options information. | 904 | * struct ubifs_mount_opts - UBIFS-specific mount options information. |
895 | * @unmount_mode: selected unmount mode (%0 default, %1 normal, %2 fast) | 905 | * @unmount_mode: selected unmount mode (%0 default, %1 normal, %2 fast) |
896 | * @bulk_read: enable bulk-reads | 906 | * @bulk_read: enable/disable bulk-reads (%0 default, %1 disabe, %2 enable) |
897 | * @chk_data_crc: check CRCs when reading data nodes | 907 | * @chk_data_crc: enable/disable CRC data checking when reading data nodes |
908 | * (%0 default, %1 disabe, %2 enable) | ||
909 | * @override_compr: override default compressor (%0 - do not override and use | ||
910 | * superblock compressor, %1 - override and use compressor | ||
911 | * specified in @compr_type) | ||
912 | * @compr_type: compressor type to override the superblock compressor with | ||
913 | * (%UBIFS_COMPR_NONE, etc) | ||
898 | */ | 914 | */ |
899 | struct ubifs_mount_opts { | 915 | struct ubifs_mount_opts { |
900 | unsigned int unmount_mode:2; | 916 | unsigned int unmount_mode:2; |
901 | unsigned int bulk_read:2; | 917 | unsigned int bulk_read:2; |
902 | unsigned int chk_data_crc:2; | 918 | unsigned int chk_data_crc:2; |
919 | unsigned int override_compr:1; | ||
920 | unsigned int compr_type:2; | ||
903 | }; | 921 | }; |
904 | 922 | ||
923 | struct ubifs_debug_info; | ||
924 | |||
905 | /** | 925 | /** |
906 | * struct ubifs_info - UBIFS file-system description data structure | 926 | * struct ubifs_info - UBIFS file-system description data structure |
907 | * (per-superblock). | 927 | * (per-superblock). |
@@ -941,11 +961,11 @@ struct ubifs_mount_opts { | |||
941 | * @cs_lock: commit state lock | 961 | * @cs_lock: commit state lock |
942 | * @cmt_wq: wait queue to sleep on if the log is full and a commit is running | 962 | * @cmt_wq: wait queue to sleep on if the log is full and a commit is running |
943 | * | 963 | * |
944 | * @fast_unmount: do not run journal commit before un-mounting | ||
945 | * @big_lpt: flag that LPT is too big to write whole during commit | 964 | * @big_lpt: flag that LPT is too big to write whole during commit |
946 | * @no_chk_data_crc: do not check CRCs when reading data nodes (except during | 965 | * @no_chk_data_crc: do not check CRCs when reading data nodes (except during |
947 | * recovery) | 966 | * recovery) |
948 | * @bulk_read: enable bulk-reads | 967 | * @bulk_read: enable bulk-reads |
968 | * @default_compr: default compression algorithm (%UBIFS_COMPR_LZO, etc) | ||
949 | * | 969 | * |
950 | * @tnc_mutex: protects the Tree Node Cache (TNC), @zroot, @cnext, @enext, and | 970 | * @tnc_mutex: protects the Tree Node Cache (TNC), @zroot, @cnext, @enext, and |
951 | * @calc_idx_sz | 971 | * @calc_idx_sz |
@@ -963,8 +983,6 @@ struct ubifs_mount_opts { | |||
963 | * @ileb_nxt: next pre-allocated index LEBs | 983 | * @ileb_nxt: next pre-allocated index LEBs |
964 | * @old_idx: tree of index nodes obsoleted since the last commit start | 984 | * @old_idx: tree of index nodes obsoleted since the last commit start |
965 | * @bottom_up_buf: a buffer which is used by 'dirty_cow_bottom_up()' in tnc.c | 985 | * @bottom_up_buf: a buffer which is used by 'dirty_cow_bottom_up()' in tnc.c |
966 | * @new_ihead_lnum: used by debugging to check ihead_lnum | ||
967 | * @new_ihead_offs: used by debugging to check ihead_offs | ||
968 | * | 986 | * |
969 | * @mst_node: master node | 987 | * @mst_node: master node |
970 | * @mst_offs: offset of valid master node | 988 | * @mst_offs: offset of valid master node |
@@ -986,7 +1004,6 @@ struct ubifs_mount_opts { | |||
986 | * @main_lebs: count of LEBs in the main area | 1004 | * @main_lebs: count of LEBs in the main area |
987 | * @main_first: first LEB of the main area | 1005 | * @main_first: first LEB of the main area |
988 | * @main_bytes: main area size in bytes | 1006 | * @main_bytes: main area size in bytes |
989 | * @default_compr: default compression algorithm (%UBIFS_COMPR_LZO, etc) | ||
990 | * | 1007 | * |
991 | * @key_hash_type: type of the key hash | 1008 | * @key_hash_type: type of the key hash |
992 | * @key_hash: direntry key hash function | 1009 | * @key_hash: direntry key hash function |
@@ -1149,15 +1166,7 @@ struct ubifs_mount_opts { | |||
1149 | * @always_chk_crc: always check CRCs (while mounting and remounting rw) | 1166 | * @always_chk_crc: always check CRCs (while mounting and remounting rw) |
1150 | * @mount_opts: UBIFS-specific mount options | 1167 | * @mount_opts: UBIFS-specific mount options |
1151 | * | 1168 | * |
1152 | * @dbg_buf: a buffer of LEB size used for debugging purposes | 1169 | * @dbg: debugging-related information |
1153 | * @old_zroot: old index root - used by 'dbg_check_old_index()' | ||
1154 | * @old_zroot_level: old index root level - used by 'dbg_check_old_index()' | ||
1155 | * @old_zroot_sqnum: old index root sqnum - used by 'dbg_check_old_index()' | ||
1156 | * @failure_mode: failure mode for recovery testing | ||
1157 | * @fail_delay: 0=>don't delay, 1=>delay a time, 2=>delay a number of calls | ||
1158 | * @fail_timeout: time in jiffies when delay of failure mode expires | ||
1159 | * @fail_cnt: current number of calls to failure mode I/O functions | ||
1160 | * @fail_cnt_max: number of calls by which to delay failure mode | ||
1161 | */ | 1170 | */ |
1162 | struct ubifs_info { | 1171 | struct ubifs_info { |
1163 | struct super_block *vfs_sb; | 1172 | struct super_block *vfs_sb; |
@@ -1192,10 +1201,10 @@ struct ubifs_info { | |||
1192 | spinlock_t cs_lock; | 1201 | spinlock_t cs_lock; |
1193 | wait_queue_head_t cmt_wq; | 1202 | wait_queue_head_t cmt_wq; |
1194 | 1203 | ||
1195 | unsigned int fast_unmount:1; | ||
1196 | unsigned int big_lpt:1; | 1204 | unsigned int big_lpt:1; |
1197 | unsigned int no_chk_data_crc:1; | 1205 | unsigned int no_chk_data_crc:1; |
1198 | unsigned int bulk_read:1; | 1206 | unsigned int bulk_read:1; |
1207 | unsigned int default_compr:2; | ||
1199 | 1208 | ||
1200 | struct mutex tnc_mutex; | 1209 | struct mutex tnc_mutex; |
1201 | struct ubifs_zbranch zroot; | 1210 | struct ubifs_zbranch zroot; |
@@ -1212,10 +1221,6 @@ struct ubifs_info { | |||
1212 | int ileb_nxt; | 1221 | int ileb_nxt; |
1213 | struct rb_root old_idx; | 1222 | struct rb_root old_idx; |
1214 | int *bottom_up_buf; | 1223 | int *bottom_up_buf; |
1215 | #ifdef CONFIG_UBIFS_FS_DEBUG | ||
1216 | int new_ihead_lnum; | ||
1217 | int new_ihead_offs; | ||
1218 | #endif | ||
1219 | 1224 | ||
1220 | struct ubifs_mst_node *mst_node; | 1225 | struct ubifs_mst_node *mst_node; |
1221 | int mst_offs; | 1226 | int mst_offs; |
@@ -1237,7 +1242,6 @@ struct ubifs_info { | |||
1237 | int main_lebs; | 1242 | int main_lebs; |
1238 | int main_first; | 1243 | int main_first; |
1239 | long long main_bytes; | 1244 | long long main_bytes; |
1240 | int default_compr; | ||
1241 | 1245 | ||
1242 | uint8_t key_hash_type; | 1246 | uint8_t key_hash_type; |
1243 | uint32_t (*key_hash)(const char *str, int len); | 1247 | uint32_t (*key_hash)(const char *str, int len); |
@@ -1315,8 +1319,8 @@ struct ubifs_info { | |||
1315 | void *sbuf; | 1319 | void *sbuf; |
1316 | struct list_head idx_gc; | 1320 | struct list_head idx_gc; |
1317 | int idx_gc_cnt; | 1321 | int idx_gc_cnt; |
1318 | volatile int gc_seq; | 1322 | int gc_seq; |
1319 | volatile int gced_lnum; | 1323 | int gced_lnum; |
1320 | 1324 | ||
1321 | struct list_head infos_list; | 1325 | struct list_head infos_list; |
1322 | struct mutex umount_mutex; | 1326 | struct mutex umount_mutex; |
@@ -1391,21 +1395,7 @@ struct ubifs_info { | |||
1391 | struct ubifs_mount_opts mount_opts; | 1395 | struct ubifs_mount_opts mount_opts; |
1392 | 1396 | ||
1393 | #ifdef CONFIG_UBIFS_FS_DEBUG | 1397 | #ifdef CONFIG_UBIFS_FS_DEBUG |
1394 | void *dbg_buf; | 1398 | struct ubifs_debug_info *dbg; |
1395 | struct ubifs_zbranch old_zroot; | ||
1396 | int old_zroot_level; | ||
1397 | unsigned long long old_zroot_sqnum; | ||
1398 | int failure_mode; | ||
1399 | int fail_delay; | ||
1400 | unsigned long fail_timeout; | ||
1401 | unsigned int fail_cnt; | ||
1402 | unsigned int fail_cnt_max; | ||
1403 | long long chk_lpt_sz; | ||
1404 | long long chk_lpt_sz2; | ||
1405 | long long chk_lpt_wastage; | ||
1406 | int chk_lpt_lebs; | ||
1407 | int new_nhead_lnum; | ||
1408 | int new_nhead_offs; | ||
1409 | #endif | 1399 | #endif |
1410 | }; | 1400 | }; |
1411 | 1401 | ||
@@ -1413,13 +1403,13 @@ extern struct list_head ubifs_infos; | |||
1413 | extern spinlock_t ubifs_infos_lock; | 1403 | extern spinlock_t ubifs_infos_lock; |
1414 | extern atomic_long_t ubifs_clean_zn_cnt; | 1404 | extern atomic_long_t ubifs_clean_zn_cnt; |
1415 | extern struct kmem_cache *ubifs_inode_slab; | 1405 | extern struct kmem_cache *ubifs_inode_slab; |
1416 | extern struct super_operations ubifs_super_operations; | 1406 | extern const struct super_operations ubifs_super_operations; |
1417 | extern struct address_space_operations ubifs_file_address_operations; | 1407 | extern const struct address_space_operations ubifs_file_address_operations; |
1418 | extern struct file_operations ubifs_file_operations; | 1408 | extern const struct file_operations ubifs_file_operations; |
1419 | extern struct inode_operations ubifs_file_inode_operations; | 1409 | extern const struct inode_operations ubifs_file_inode_operations; |
1420 | extern struct file_operations ubifs_dir_operations; | 1410 | extern const struct file_operations ubifs_dir_operations; |
1421 | extern struct inode_operations ubifs_dir_inode_operations; | 1411 | extern const struct inode_operations ubifs_dir_inode_operations; |
1422 | extern struct inode_operations ubifs_symlink_inode_operations; | 1412 | extern const struct inode_operations ubifs_symlink_inode_operations; |
1423 | extern struct backing_dev_info ubifs_backing_dev_info; | 1413 | extern struct backing_dev_info ubifs_backing_dev_info; |
1424 | extern struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT]; | 1414 | extern struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT]; |
1425 | 1415 | ||
@@ -1436,7 +1426,7 @@ int ubifs_read_node_wbuf(struct ubifs_wbuf *wbuf, void *buf, int type, int len, | |||
1436 | int ubifs_write_node(struct ubifs_info *c, void *node, int len, int lnum, | 1426 | int ubifs_write_node(struct ubifs_info *c, void *node, int len, int lnum, |
1437 | int offs, int dtype); | 1427 | int offs, int dtype); |
1438 | int ubifs_check_node(const struct ubifs_info *c, const void *buf, int lnum, | 1428 | int ubifs_check_node(const struct ubifs_info *c, const void *buf, int lnum, |
1439 | int offs, int quiet, int chk_crc); | 1429 | int offs, int quiet, int must_chk_crc); |
1440 | void ubifs_prepare_node(struct ubifs_info *c, void *buf, int len, int pad); | 1430 | void ubifs_prepare_node(struct ubifs_info *c, void *buf, int len, int pad); |
1441 | void ubifs_prep_grp_node(struct ubifs_info *c, void *node, int len, int last); | 1431 | void ubifs_prep_grp_node(struct ubifs_info *c, void *node, int len, int last); |
1442 | int ubifs_io_init(struct ubifs_info *c); | 1432 | int ubifs_io_init(struct ubifs_info *c); |
@@ -1503,9 +1493,10 @@ void ubifs_release_ino_dirty(struct ubifs_info *c, struct inode *inode, | |||
1503 | void ubifs_cancel_ino_op(struct ubifs_info *c, struct inode *inode, | 1493 | void ubifs_cancel_ino_op(struct ubifs_info *c, struct inode *inode, |
1504 | struct ubifs_budget_req *req); | 1494 | struct ubifs_budget_req *req); |
1505 | long long ubifs_get_free_space(struct ubifs_info *c); | 1495 | long long ubifs_get_free_space(struct ubifs_info *c); |
1496 | long long ubifs_get_free_space_nolock(struct ubifs_info *c); | ||
1506 | int ubifs_calc_min_idx_lebs(struct ubifs_info *c); | 1497 | int ubifs_calc_min_idx_lebs(struct ubifs_info *c); |
1507 | void ubifs_convert_page_budget(struct ubifs_info *c); | 1498 | void ubifs_convert_page_budget(struct ubifs_info *c); |
1508 | long long ubifs_reported_space(const struct ubifs_info *c, uint64_t free); | 1499 | long long ubifs_reported_space(const struct ubifs_info *c, long long free); |
1509 | long long ubifs_calc_available(const struct ubifs_info *c, int min_idx_lebs); | 1500 | long long ubifs_calc_available(const struct ubifs_info *c, int min_idx_lebs); |
1510 | 1501 | ||
1511 | /* find.c */ | 1502 | /* find.c */ |
@@ -1611,6 +1602,7 @@ void ubifs_delete_orphan(struct ubifs_info *c, ino_t inum); | |||
1611 | int ubifs_orphan_start_commit(struct ubifs_info *c); | 1602 | int ubifs_orphan_start_commit(struct ubifs_info *c); |
1612 | int ubifs_orphan_end_commit(struct ubifs_info *c); | 1603 | int ubifs_orphan_end_commit(struct ubifs_info *c); |
1613 | int ubifs_mount_orphans(struct ubifs_info *c, int unclean, int read_only); | 1604 | int ubifs_mount_orphans(struct ubifs_info *c, int unclean, int read_only); |
1605 | int ubifs_clear_orphans(struct ubifs_info *c); | ||
1614 | 1606 | ||
1615 | /* lpt.c */ | 1607 | /* lpt.c */ |
1616 | int ubifs_calc_lpt_geom(struct ubifs_info *c); | 1608 | int ubifs_calc_lpt_geom(struct ubifs_info *c); |
@@ -1639,6 +1631,9 @@ void ubifs_add_lpt_dirt(struct ubifs_info *c, int lnum, int dirty); | |||
1639 | void ubifs_add_nnode_dirt(struct ubifs_info *c, struct ubifs_nnode *nnode); | 1631 | void ubifs_add_nnode_dirt(struct ubifs_info *c, struct ubifs_nnode *nnode); |
1640 | uint32_t ubifs_unpack_bits(uint8_t **addr, int *pos, int nrbits); | 1632 | uint32_t ubifs_unpack_bits(uint8_t **addr, int *pos, int nrbits); |
1641 | struct ubifs_nnode *ubifs_first_nnode(struct ubifs_info *c, int *hght); | 1633 | struct ubifs_nnode *ubifs_first_nnode(struct ubifs_info *c, int *hght); |
1634 | /* Needed only in debugging code in lpt_commit.c */ | ||
1635 | int ubifs_unpack_nnode(const struct ubifs_info *c, void *buf, | ||
1636 | struct ubifs_nnode *nnode); | ||
1642 | 1637 | ||
1643 | /* lpt_commit.c */ | 1638 | /* lpt_commit.c */ |
1644 | int ubifs_lpt_start_commit(struct ubifs_info *c); | 1639 | int ubifs_lpt_start_commit(struct ubifs_info *c); |
@@ -1651,7 +1646,7 @@ const struct ubifs_lprops *ubifs_change_lp(struct ubifs_info *c, | |||
1651 | const struct ubifs_lprops *lp, | 1646 | const struct ubifs_lprops *lp, |
1652 | int free, int dirty, int flags, | 1647 | int free, int dirty, int flags, |
1653 | int idx_gc_cnt); | 1648 | int idx_gc_cnt); |
1654 | void ubifs_get_lp_stats(struct ubifs_info *c, struct ubifs_lp_stats *stats); | 1649 | void ubifs_get_lp_stats(struct ubifs_info *c, struct ubifs_lp_stats *lst); |
1655 | void ubifs_add_to_cat(struct ubifs_info *c, struct ubifs_lprops *lprops, | 1650 | void ubifs_add_to_cat(struct ubifs_info *c, struct ubifs_lprops *lprops, |
1656 | int cat); | 1651 | int cat); |
1657 | void ubifs_replace_cat(struct ubifs_info *c, struct ubifs_lprops *old_lprops, | 1652 | void ubifs_replace_cat(struct ubifs_info *c, struct ubifs_lprops *old_lprops, |
@@ -1714,7 +1709,7 @@ long ubifs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg); | |||
1714 | 1709 | ||
1715 | /* compressor.c */ | 1710 | /* compressor.c */ |
1716 | int __init ubifs_compressors_init(void); | 1711 | int __init ubifs_compressors_init(void); |
1717 | void __exit ubifs_compressors_exit(void); | 1712 | void ubifs_compressors_exit(void); |
1718 | void ubifs_compress(const void *in_buf, int in_len, void *out_buf, int *out_len, | 1713 | void ubifs_compress(const void *in_buf, int in_len, void *out_buf, int *out_len, |
1719 | int *compr_type); | 1714 | int *compr_type); |
1720 | int ubifs_decompress(const void *buf, int len, void *out, int *out_len, | 1715 | int ubifs_decompress(const void *buf, int len, void *out, int *out_len, |