diff options
author | Wang Shilong <wshilong@ddn.com> | 2018-05-12 18:39:40 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-05-12 18:39:40 +0300 |
commit | db79e6d1fb1f715c961bd880101362e07369de23 (patch) | |
tree | c2030b521e7fdb8c82f39830975d6ab97c76afc2 /fs/ext4/ext4.h | |
parent | 0db9fdeb347c10f64b679577f2640c9e35ea5a30 (diff) | |
download | linux-db79e6d1fb1f715c961bd880101362e07369de23.tar.xz |
ext4: add new ext4_mark_group_bitmap_corrupted() helper
Since there are many places to set inode/block bitmap
corrupt bit, add a new helper for it, which will make
codes more clear.
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index a42e71203e53..fa52b7dd4542 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -2530,6 +2530,9 @@ extern int ext4_alloc_flex_bg_array(struct super_block *sb, ext4_group_t ngroup); extern const char *ext4_decode_error(struct super_block *sb, int errno, char nbuf[16]); +extern void ext4_mark_group_bitmap_corrupted(struct super_block *sb, + ext4_group_t block_group, + unsigned int flags); extern __printf(4, 5) void __ext4_error(struct super_block *, const char *, unsigned int, @@ -2857,6 +2860,10 @@ struct ext4_group_info { #define EXT4_GROUP_INFO_WAS_TRIMMED_BIT 1 #define EXT4_GROUP_INFO_BBITMAP_CORRUPT_BIT 2 #define EXT4_GROUP_INFO_IBITMAP_CORRUPT_BIT 3 +#define EXT4_GROUP_INFO_BBITMAP_CORRUPT \ + (1 << EXT4_GROUP_INFO_BBITMAP_CORRUPT_BIT) +#define EXT4_GROUP_INFO_IBITMAP_CORRUPT \ + (1 << EXT4_GROUP_INFO_IBITMAP_CORRUPT_BIT) #define EXT4_MB_GRP_NEED_INIT(grp) \ (test_bit(EXT4_GROUP_INFO_NEED_INIT_BIT, &((grp)->bb_state))) |