diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-12 18:03:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-12 18:03:21 -0400 |
commit | a5adcfcad55d5f034b33f79f1a873229d1e77b24 (patch) | |
tree | e9548efcccb8f5ed3e120b0ca36ad04de116cdb7 /fs/ext4/ext4.h | |
parent | 2b0a80b0d0bb0a3db74588279bf851b28c6c4705 (diff) | |
parent | 0df6f46995a9fc92a6b9e591428e77527dd9609a (diff) |
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 updates from Ted Ts'o:
"A large number of bug fixes and cleanups.
One new feature to allow users to more easily find the jbd2 journal
thread for a particular ext4 file system"
* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (25 commits)
jbd2: jbd2_get_transaction does not need to return a value
jbd2: fix invalid descriptor block checksum
ext4: fix bigalloc cluster freeing when hole punching under load
ext4: add sysfs attr /sys/fs/ext4/<disk>/journal_task
ext4: Change debugging support help prefix from EXT4 to Ext4
ext4: fix compile error when using BUFFER_TRACE
jbd2: fix compile warning when using JBUFFER_TRACE
ext4: fix some error pointer dereferences
ext4: annotate more implicit fall throughs
ext4: annotate implicit fall throughs
ext4: don't update s_rev_level if not required
jbd2: fold jbd2_superblock_csum_{verify,set} into their callers
jbd2: fix race when writing superblock
ext4: fix crash during online resizing
ext4: disallow files with EXT4_JOURNAL_DATA_FL from EXT4_IOC_SWAP_BOOT
ext4: add mask of ext4 flags to swap
ext4: update quota information while swapping boot loader inode
ext4: cleanup pagecache before swap i_data
ext4: fix check of inode in swap_inode_boot_loader
ext4: unlock unused_pages timely when doing writeback
...
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 5012ddb6daf9..82ffdacdc7fa 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -425,6 +425,9 @@ struct flex_groups { | |||
425 | /* Flags that are appropriate for non-directories/regular files. */ | 425 | /* Flags that are appropriate for non-directories/regular files. */ |
426 | #define EXT4_OTHER_FLMASK (EXT4_NODUMP_FL | EXT4_NOATIME_FL) | 426 | #define EXT4_OTHER_FLMASK (EXT4_NODUMP_FL | EXT4_NOATIME_FL) |
427 | 427 | ||
428 | /* The only flags that should be swapped */ | ||
429 | #define EXT4_FL_SHOULD_SWAP (EXT4_HUGE_FILE_FL | EXT4_EXTENTS_FL) | ||
430 | |||
428 | /* Mask out flags that are inappropriate for the given type of inode. */ | 431 | /* Mask out flags that are inappropriate for the given type of inode. */ |
429 | static inline __u32 ext4_mask_flags(umode_t mode, __u32 flags) | 432 | static inline __u32 ext4_mask_flags(umode_t mode, __u32 flags) |
430 | { | 433 | { |
@@ -1661,6 +1664,8 @@ static inline void ext4_clear_state_flags(struct ext4_inode_info *ei) | |||
1661 | #define EXT4_FEATURE_INCOMPAT_INLINE_DATA 0x8000 /* data in inode */ | 1664 | #define EXT4_FEATURE_INCOMPAT_INLINE_DATA 0x8000 /* data in inode */ |
1662 | #define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000 | 1665 | #define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000 |
1663 | 1666 | ||
1667 | extern void ext4_update_dynamic_rev(struct super_block *sb); | ||
1668 | |||
1664 | #define EXT4_FEATURE_COMPAT_FUNCS(name, flagname) \ | 1669 | #define EXT4_FEATURE_COMPAT_FUNCS(name, flagname) \ |
1665 | static inline bool ext4_has_feature_##name(struct super_block *sb) \ | 1670 | static inline bool ext4_has_feature_##name(struct super_block *sb) \ |
1666 | { \ | 1671 | { \ |
@@ -1669,6 +1674,7 @@ static inline bool ext4_has_feature_##name(struct super_block *sb) \ | |||
1669 | } \ | 1674 | } \ |
1670 | static inline void ext4_set_feature_##name(struct super_block *sb) \ | 1675 | static inline void ext4_set_feature_##name(struct super_block *sb) \ |
1671 | { \ | 1676 | { \ |
1677 | ext4_update_dynamic_rev(sb); \ | ||
1672 | EXT4_SB(sb)->s_es->s_feature_compat |= \ | 1678 | EXT4_SB(sb)->s_es->s_feature_compat |= \ |
1673 | cpu_to_le32(EXT4_FEATURE_COMPAT_##flagname); \ | 1679 | cpu_to_le32(EXT4_FEATURE_COMPAT_##flagname); \ |
1674 | } \ | 1680 | } \ |
@@ -1686,6 +1692,7 @@ static inline bool ext4_has_feature_##name(struct super_block *sb) \ | |||
1686 | } \ | 1692 | } \ |
1687 | static inline void ext4_set_feature_##name(struct super_block *sb) \ | 1693 | static inline void ext4_set_feature_##name(struct super_block *sb) \ |
1688 | { \ | 1694 | { \ |
1695 | ext4_update_dynamic_rev(sb); \ | ||
1689 | EXT4_SB(sb)->s_es->s_feature_ro_compat |= \ | 1696 | EXT4_SB(sb)->s_es->s_feature_ro_compat |= \ |
1690 | cpu_to_le32(EXT4_FEATURE_RO_COMPAT_##flagname); \ | 1697 | cpu_to_le32(EXT4_FEATURE_RO_COMPAT_##flagname); \ |
1691 | } \ | 1698 | } \ |
@@ -1703,6 +1710,7 @@ static inline bool ext4_has_feature_##name(struct super_block *sb) \ | |||
1703 | } \ | 1710 | } \ |
1704 | static inline void ext4_set_feature_##name(struct super_block *sb) \ | 1711 | static inline void ext4_set_feature_##name(struct super_block *sb) \ |
1705 | { \ | 1712 | { \ |
1713 | ext4_update_dynamic_rev(sb); \ | ||
1706 | EXT4_SB(sb)->s_es->s_feature_incompat |= \ | 1714 | EXT4_SB(sb)->s_es->s_feature_incompat |= \ |
1707 | cpu_to_le32(EXT4_FEATURE_INCOMPAT_##flagname); \ | 1715 | cpu_to_le32(EXT4_FEATURE_INCOMPAT_##flagname); \ |
1708 | } \ | 1716 | } \ |
@@ -2666,7 +2674,6 @@ do { \ | |||
2666 | 2674 | ||
2667 | #endif | 2675 | #endif |
2668 | 2676 | ||
2669 | extern void ext4_update_dynamic_rev(struct super_block *sb); | ||
2670 | extern int ext4_update_compat_feature(handle_t *handle, struct super_block *sb, | 2677 | extern int ext4_update_compat_feature(handle_t *handle, struct super_block *sb, |
2671 | __u32 compat); | 2678 | __u32 compat); |
2672 | extern int ext4_update_rocompat_feature(handle_t *handle, | 2679 | extern int ext4_update_rocompat_feature(handle_t *handle, |