.. | .. |
---|
553 | 553 | * |
---|
554 | 554 | * It's not paranoia if the Murphy's Law really *is* out to get you. :-) |
---|
555 | 555 | */ |
---|
556 | | -#define TEST_FLAG_VALUE(FLAG) (EXT4_##FLAG##_FL == (1 << EXT4_INODE_##FLAG)) |
---|
| 556 | +#define TEST_FLAG_VALUE(FLAG) (EXT4_##FLAG##_FL == (1U << EXT4_INODE_##FLAG)) |
---|
557 | 557 | #define CHECK_FLAG_VALUE(FLAG) BUILD_BUG_ON(!TEST_FLAG_VALUE(FLAG)) |
---|
558 | 558 | |
---|
559 | 559 | static inline void ext4_check_flag_values(void) |
---|
.. | .. |
---|
980 | 980 | * where the second inode has larger inode number |
---|
981 | 981 | * than the first |
---|
982 | 982 | * I_DATA_SEM_QUOTA - Used for quota inodes only |
---|
| 983 | + * I_DATA_SEM_EA - Used for ea_inodes only |
---|
983 | 984 | */ |
---|
984 | 985 | enum { |
---|
985 | 986 | I_DATA_SEM_NORMAL = 0, |
---|
986 | 987 | I_DATA_SEM_OTHER, |
---|
987 | 988 | I_DATA_SEM_QUOTA, |
---|
| 989 | + I_DATA_SEM_EA |
---|
988 | 990 | }; |
---|
989 | 991 | |
---|
990 | 992 | |
---|
.. | .. |
---|
1535 | 1537 | atomic_t s_bal_success; /* we found long enough chunks */ |
---|
1536 | 1538 | atomic_t s_bal_allocated; /* in blocks */ |
---|
1537 | 1539 | atomic_t s_bal_ex_scanned; /* total extents scanned */ |
---|
| 1540 | + atomic_t s_bal_groups_scanned; /* number of groups scanned */ |
---|
1538 | 1541 | atomic_t s_bal_goals; /* goal hits */ |
---|
1539 | 1542 | atomic_t s_bal_breaks; /* too long searches */ |
---|
1540 | 1543 | atomic_t s_bal_2orders; /* 2^order hits */ |
---|
1541 | | - spinlock_t s_bal_lock; |
---|
1542 | | - unsigned long s_mb_buddies_generated; |
---|
1543 | | - unsigned long long s_mb_generation_time; |
---|
| 1544 | + atomic64_t s_bal_cX_groups_considered[4]; |
---|
| 1545 | + atomic64_t s_bal_cX_hits[4]; |
---|
| 1546 | + atomic64_t s_bal_cX_failed[4]; /* cX loop didn't find blocks */ |
---|
| 1547 | + atomic_t s_mb_buddies_generated; /* number of buddies generated */ |
---|
| 1548 | + atomic64_t s_mb_generation_time; |
---|
1544 | 1549 | atomic_t s_mb_lost_chunks; |
---|
1545 | 1550 | atomic_t s_mb_preallocated; |
---|
1546 | 1551 | atomic_t s_mb_discarded; |
---|
.. | .. |
---|
1575 | 1580 | struct task_struct *s_mmp_tsk; |
---|
1576 | 1581 | |
---|
1577 | 1582 | /* record the last minlen when FITRIM is called. */ |
---|
1578 | | - atomic_t s_last_trim_minblks; |
---|
| 1583 | + unsigned long s_last_trim_minblks; |
---|
1579 | 1584 | |
---|
1580 | 1585 | /* Reference to checksum algorithm driver via cryptoapi */ |
---|
1581 | 1586 | struct crypto_shash *s_chksum_driver; |
---|
.. | .. |
---|
2591 | 2596 | extern struct ext4_group_desc * ext4_get_group_desc(struct super_block * sb, |
---|
2592 | 2597 | ext4_group_t block_group, |
---|
2593 | 2598 | struct buffer_head ** bh); |
---|
| 2599 | +extern struct ext4_group_info *ext4_get_group_info(struct super_block *sb, |
---|
| 2600 | + ext4_group_t group); |
---|
2594 | 2601 | extern int ext4_should_retry_alloc(struct super_block *sb, int *retries); |
---|
2595 | 2602 | |
---|
2596 | 2603 | extern struct buffer_head *ext4_read_block_bitmap_nowait(struct super_block *sb, |
---|
.. | .. |
---|
2830 | 2837 | extern const struct seq_operations ext4_mb_seq_groups_ops; |
---|
2831 | 2838 | extern long ext4_mb_stats; |
---|
2832 | 2839 | extern long ext4_mb_max_to_scan; |
---|
| 2840 | +extern int ext4_seq_mb_stats_show(struct seq_file *seq, void *offset); |
---|
2833 | 2841 | extern int ext4_mb_init(struct super_block *); |
---|
2834 | 2842 | extern int ext4_mb_release(struct super_block *); |
---|
2835 | 2843 | extern ext4_fsblk_t ext4_mb_new_blocks(handle_t *, |
---|
.. | .. |
---|
2887 | 2895 | typedef enum { |
---|
2888 | 2896 | EXT4_IGET_NORMAL = 0, |
---|
2889 | 2897 | EXT4_IGET_SPECIAL = 0x0001, /* OK to iget a system inode */ |
---|
2890 | | - EXT4_IGET_HANDLE = 0x0002 /* Inode # is from a handle */ |
---|
| 2898 | + EXT4_IGET_HANDLE = 0x0002, /* Inode # is from a handle */ |
---|
| 2899 | + EXT4_IGET_BAD = 0x0004, /* Allow to iget a bad inode */ |
---|
| 2900 | + EXT4_IGET_EA_INODE = 0x0008 /* Inode should contain an EA value */ |
---|
2891 | 2901 | } ext4_iget_flags; |
---|
2892 | 2902 | |
---|
2893 | 2903 | extern struct inode *__ext4_iget(struct super_block *sb, unsigned long ino, |
---|
.. | .. |
---|
3003 | 3013 | extern void ext4_mark_group_bitmap_corrupted(struct super_block *sb, |
---|
3004 | 3014 | ext4_group_t block_group, |
---|
3005 | 3015 | unsigned int flags); |
---|
| 3016 | +extern unsigned int ext4_num_base_meta_blocks(struct super_block *sb, |
---|
| 3017 | + ext4_group_t block_group); |
---|
3006 | 3018 | |
---|
3007 | 3019 | extern __printf(6, 7) |
---|
3008 | 3020 | void __ext4_error(struct super_block *, const char *, unsigned int, int, __u64, |
---|
.. | .. |
---|
3237 | 3249 | { |
---|
3238 | 3250 | raw_inode->i_size_lo = cpu_to_le32(i_size); |
---|
3239 | 3251 | raw_inode->i_size_high = cpu_to_le32(i_size >> 32); |
---|
3240 | | -} |
---|
3241 | | - |
---|
3242 | | -static inline |
---|
3243 | | -struct ext4_group_info *ext4_get_group_info(struct super_block *sb, |
---|
3244 | | - ext4_group_t group) |
---|
3245 | | -{ |
---|
3246 | | - struct ext4_group_info **grp_info; |
---|
3247 | | - long indexv, indexh; |
---|
3248 | | - BUG_ON(group >= EXT4_SB(sb)->s_groups_count); |
---|
3249 | | - indexv = group >> (EXT4_DESC_PER_BLOCK_BITS(sb)); |
---|
3250 | | - indexh = group & ((EXT4_DESC_PER_BLOCK(sb)) - 1); |
---|
3251 | | - grp_info = sbi_array_rcu_deref(EXT4_SB(sb), s_group_info, indexv); |
---|
3252 | | - return grp_info[indexh]; |
---|
3253 | 3252 | } |
---|
3254 | 3253 | |
---|
3255 | 3254 | /* |
---|
.. | .. |
---|
3524 | 3523 | unsigned int blocksize); |
---|
3525 | 3524 | extern int ext4_handle_dirty_dirblock(handle_t *handle, struct inode *inode, |
---|
3526 | 3525 | struct buffer_head *bh); |
---|
3527 | | -extern int __ext4_unlink(handle_t *handle, struct inode *dir, const struct qstr *d_name, |
---|
3528 | | - struct inode *inode); |
---|
| 3526 | +extern int __ext4_unlink(struct inode *dir, const struct qstr *d_name, |
---|
| 3527 | + struct inode *inode, struct dentry *dentry); |
---|
3529 | 3528 | extern int __ext4_link(struct inode *dir, struct inode *inode, |
---|
3530 | 3529 | struct dentry *dentry); |
---|
3531 | 3530 | |
---|
.. | .. |
---|
3574 | 3573 | unsigned int count); |
---|
3575 | 3574 | extern int ext4_check_blockref(const char *, unsigned int, |
---|
3576 | 3575 | struct inode *, __le32 *, unsigned int); |
---|
| 3576 | +extern int ext4_sb_block_valid(struct super_block *sb, struct inode *inode, |
---|
| 3577 | + ext4_fsblk_t start_blk, unsigned int count); |
---|
| 3578 | + |
---|
3577 | 3579 | |
---|
3578 | 3580 | /* extents.c */ |
---|
3579 | 3581 | struct ext4_ext_path; |
---|