aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-06-01 13:12:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-06-01 13:12:15 -0400
commit4edebed86690eb8db9af3ab85baf4a34e73266cc (patch)
tree8ab144b08f490f239fa62be52470860c9311664d /fs/ext4/ext4.h
parent51eab603f5c86dd1eae4c525df3e7f7eeab401d6 (diff)
parent5e44f8c374dc4f8eadf61cd18b2c0d46bc87c1b7 (diff)
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull Ext4 updates from Theodore Ts'o: "The major new feature added in this update is Darrick J Wong's metadata checksum feature, which adds crc32 checksums to ext4's metadata fields. There is also the usual set of cleanups and bug fixes." * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (44 commits) ext4: hole-punch use truncate_pagecache_range jbd2: use kmem_cache_zalloc wrapper instead of flag ext4: remove mb_groups before tearing down the buddy_cache ext4: add ext4_mb_unload_buddy in the error path ext4: don't trash state flags in EXT4_IOC_SETFLAGS ext4: let getattr report the right blocks in delalloc+bigalloc ext4: add missing save_error_info() to ext4_error() ext4: add debugging trigger for ext4_error() ext4: protect group inode free counting with group lock ext4: use consistent ssize_t type in ext4_file_write() ext4: fix format flag in ext4_ext_binsearch_idx() ext4: cleanup in ext4_discard_allocated_blocks() ext4: return ENOMEM when mounts fail due to lack of memory ext4: remove redundundant "(char *) bh->b_data" casts ext4: disallow hard-linked directory in ext4_lookup ext4: fix potential integer overflow in alloc_flex_gd() ext4: remove needs_recovery in ext4_mb_init() ext4: force ro mount if ext4_setup_super() fails ext4: fix potential NULL dereference in ext4_free_inodes_counts() ext4/jbd2: add metadata checksumming to the list of supported features ...
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h130
1 files changed, 117 insertions, 13 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index c21b1de51af..cfc4e01b3c8 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -29,6 +29,7 @@
29#include <linux/wait.h> 29#include <linux/wait.h>
30#include <linux/blockgroup_lock.h> 30#include <linux/blockgroup_lock.h>
31#include <linux/percpu_counter.h> 31#include <linux/percpu_counter.h>
32#include <crypto/hash.h>
32#ifdef __KERNEL__ 33#ifdef __KERNEL__
33#include <linux/compat.h> 34#include <linux/compat.h>
34#endif 35#endif
@@ -298,7 +299,9 @@ struct ext4_group_desc
298 __le16 bg_free_inodes_count_lo;/* Free inodes count */ 299 __le16 bg_free_inodes_count_lo;/* Free inodes count */
299 __le16 bg_used_dirs_count_lo; /* Directories count */ 300 __le16 bg_used_dirs_count_lo; /* Directories count */
300 __le16 bg_flags; /* EXT4_BG_flags (INODE_UNINIT, etc) */ 301 __le16 bg_flags; /* EXT4_BG_flags (INODE_UNINIT, etc) */
301 __u32 bg_reserved[2]; /* Likely block/inode bitmap checksum */ 302 __le32 bg_exclude_bitmap_lo; /* Exclude bitmap for snapshots */
303 __le16 bg_block_bitmap_csum_lo;/* crc32c(s_uuid+grp_num+bbitmap) LE */
304 __le16 bg_inode_bitmap_csum_lo;/* crc32c(s_uuid+grp_num+ibitmap) LE */
302 __le16 bg_itable_unused_lo; /* Unused inodes count */ 305 __le16 bg_itable_unused_lo; /* Unused inodes count */
303 __le16 bg_checksum; /* crc16(sb_uuid+group+desc) */ 306 __le16 bg_checksum; /* crc16(sb_uuid+group+desc) */
304 __le32 bg_block_bitmap_hi; /* Blocks bitmap block MSB */ 307 __le32 bg_block_bitmap_hi; /* Blocks bitmap block MSB */
@@ -308,9 +311,19 @@ struct ext4_group_desc
308 __le16 bg_free_inodes_count_hi;/* Free inodes count MSB */ 311 __le16 bg_free_inodes_count_hi;/* Free inodes count MSB */
309 __le16 bg_used_dirs_count_hi; /* Directories count MSB */ 312 __le16 bg_used_dirs_count_hi; /* Directories count MSB */
310 __le16 bg_itable_unused_hi; /* Unused inodes count MSB */ 313 __le16 bg_itable_unused_hi; /* Unused inodes count MSB */
311 __u32 bg_reserved2[3]; 314 __le32 bg_exclude_bitmap_hi; /* Exclude bitmap block MSB */
315 __le16 bg_block_bitmap_csum_hi;/* crc32c(s_uuid+grp_num+bbitmap) BE */
316 __le16 bg_inode_bitmap_csum_hi;/* crc32c(s_uuid+grp_num+ibitmap) BE */
317 __u32 bg_reserved;
312}; 318};
313 319
320#define EXT4_BG_INODE_BITMAP_CSUM_HI_END \
321 (offsetof(struct ext4_group_desc, bg_inode_bitmap_csum_hi) + \
322 sizeof(__le16))
323#define EXT4_BG_BLOCK_BITMAP_CSUM_HI_END \
324 (offsetof(struct ext4_group_desc, bg_block_bitmap_csum_hi) + \
325 sizeof(__le16))
326
314/* 327/*
315 * Structure of a flex block group info 328 * Structure of a flex block group info
316 */ 329 */
@@ -650,7 +663,8 @@ struct ext4_inode {
650 __le16 l_i_file_acl_high; 663 __le16 l_i_file_acl_high;
651 __le16 l_i_uid_high; /* these 2 fields */ 664 __le16 l_i_uid_high; /* these 2 fields */
652 __le16 l_i_gid_high; /* were reserved2[0] */ 665 __le16 l_i_gid_high; /* were reserved2[0] */
653 __u32 l_i_reserved2; 666 __le16 l_i_checksum_lo;/* crc32c(uuid+inum+inode) LE */
667 __le16 l_i_reserved;
654 } linux2; 668 } linux2;
655 struct { 669 struct {
656 __le16 h_i_reserved1; /* Obsoleted fragment number/size which are removed in ext4 */ 670 __le16 h_i_reserved1; /* Obsoleted fragment number/size which are removed in ext4 */
@@ -666,7 +680,7 @@ struct ext4_inode {
666 } masix2; 680 } masix2;
667 } osd2; /* OS dependent 2 */ 681 } osd2; /* OS dependent 2 */
668 __le16 i_extra_isize; 682 __le16 i_extra_isize;
669 __le16 i_pad1; 683 __le16 i_checksum_hi; /* crc32c(uuid+inum+inode) BE */
670 __le32 i_ctime_extra; /* extra Change time (nsec << 2 | epoch) */ 684 __le32 i_ctime_extra; /* extra Change time (nsec << 2 | epoch) */
671 __le32 i_mtime_extra; /* extra Modification time(nsec << 2 | epoch) */ 685 __le32 i_mtime_extra; /* extra Modification time(nsec << 2 | epoch) */
672 __le32 i_atime_extra; /* extra Access time (nsec << 2 | epoch) */ 686 __le32 i_atime_extra; /* extra Access time (nsec << 2 | epoch) */
@@ -768,7 +782,7 @@ do { \
768#define i_gid_low i_gid 782#define i_gid_low i_gid
769#define i_uid_high osd2.linux2.l_i_uid_high 783#define i_uid_high osd2.linux2.l_i_uid_high
770#define i_gid_high osd2.linux2.l_i_gid_high 784#define i_gid_high osd2.linux2.l_i_gid_high
771#define i_reserved2 osd2.linux2.l_i_reserved2 785#define i_checksum_lo osd2.linux2.l_i_checksum_lo
772 786
773#elif defined(__GNU__) 787#elif defined(__GNU__)
774 788
@@ -908,6 +922,9 @@ struct ext4_inode_info {
908 */ 922 */
909 tid_t i_sync_tid; 923 tid_t i_sync_tid;
910 tid_t i_datasync_tid; 924 tid_t i_datasync_tid;
925
926 /* Precomputed uuid+inum+igen checksum for seeding inode checksums */
927 __u32 i_csum_seed;
911}; 928};
912 929
913/* 930/*
@@ -1001,6 +1018,9 @@ extern void ext4_set_bits(void *bm, int cur, int len);
1001#define EXT4_ERRORS_PANIC 3 /* Panic */ 1018#define EXT4_ERRORS_PANIC 3 /* Panic */
1002#define EXT4_ERRORS_DEFAULT EXT4_ERRORS_CONTINUE 1019#define EXT4_ERRORS_DEFAULT EXT4_ERRORS_CONTINUE
1003 1020
1021/* Metadata checksum algorithm codes */
1022#define EXT4_CRC32C_CHKSUM 1
1023
1004/* 1024/*
1005 * Structure of the super block 1025 * Structure of the super block
1006 */ 1026 */
@@ -1087,7 +1107,7 @@ struct ext4_super_block {
1087 __le64 s_mmp_block; /* Block for multi-mount protection */ 1107 __le64 s_mmp_block; /* Block for multi-mount protection */
1088 __le32 s_raid_stripe_width; /* blocks on all data disks (N*stride)*/ 1108 __le32 s_raid_stripe_width; /* blocks on all data disks (N*stride)*/
1089 __u8 s_log_groups_per_flex; /* FLEX_BG group size */ 1109 __u8 s_log_groups_per_flex; /* FLEX_BG group size */
1090 __u8 s_reserved_char_pad; 1110 __u8 s_checksum_type; /* metadata checksum algorithm used */
1091 __le16 s_reserved_pad; 1111 __le16 s_reserved_pad;
1092 __le64 s_kbytes_written; /* nr of lifetime kilobytes written */ 1112 __le64 s_kbytes_written; /* nr of lifetime kilobytes written */
1093 __le32 s_snapshot_inum; /* Inode number of active snapshot */ 1113 __le32 s_snapshot_inum; /* Inode number of active snapshot */
@@ -1113,7 +1133,8 @@ struct ext4_super_block {
1113 __le32 s_usr_quota_inum; /* inode for tracking user quota */ 1133 __le32 s_usr_quota_inum; /* inode for tracking user quota */
1114 __le32 s_grp_quota_inum; /* inode for tracking group quota */ 1134 __le32 s_grp_quota_inum; /* inode for tracking group quota */
1115 __le32 s_overhead_clusters; /* overhead blocks/clusters in fs */ 1135 __le32 s_overhead_clusters; /* overhead blocks/clusters in fs */
1116 __le32 s_reserved[109]; /* Padding to the end of the block */ 1136 __le32 s_reserved[108]; /* Padding to the end of the block */
1137 __le32 s_checksum; /* crc32c(superblock) */
1117}; 1138};
1118 1139
1119#define EXT4_S_ERR_LEN (EXT4_S_ERR_END - EXT4_S_ERR_START) 1140#define EXT4_S_ERR_LEN (EXT4_S_ERR_END - EXT4_S_ERR_START)
@@ -1176,6 +1197,7 @@ struct ext4_sb_info {
1176 struct proc_dir_entry *s_proc; 1197 struct proc_dir_entry *s_proc;
1177 struct kobject s_kobj; 1198 struct kobject s_kobj;
1178 struct completion s_kobj_unregister; 1199 struct completion s_kobj_unregister;
1200 struct super_block *s_sb;
1179 1201
1180 /* Journaling */ 1202 /* Journaling */
1181 struct journal_s *s_journal; 1203 struct journal_s *s_journal;
@@ -1266,6 +1288,12 @@ struct ext4_sb_info {
1266 1288
1267 /* record the last minlen when FITRIM is called. */ 1289 /* record the last minlen when FITRIM is called. */
1268 atomic_t s_last_trim_minblks; 1290 atomic_t s_last_trim_minblks;
1291
1292 /* Reference to checksum algorithm driver via cryptoapi */
1293 struct crypto_shash *s_chksum_driver;
1294
1295 /* Precomputed FS UUID checksum for seeding other checksums */
1296 __u32 s_csum_seed;
1269}; 1297};
1270 1298
1271static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb) 1299static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb)
@@ -1414,6 +1442,12 @@ static inline void ext4_clear_state_flags(struct ext4_inode_info *ei)
1414#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040 1442#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040
1415#define EXT4_FEATURE_RO_COMPAT_QUOTA 0x0100 1443#define EXT4_FEATURE_RO_COMPAT_QUOTA 0x0100
1416#define EXT4_FEATURE_RO_COMPAT_BIGALLOC 0x0200 1444#define EXT4_FEATURE_RO_COMPAT_BIGALLOC 0x0200
1445/*
1446 * METADATA_CSUM also enables group descriptor checksums (GDT_CSUM). When
1447 * METADATA_CSUM is set, group descriptor checksums use the same algorithm as
1448 * all other data structures' checksums. However, the METADATA_CSUM and
1449 * GDT_CSUM bits are mutually exclusive.
1450 */
1417#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM 0x0400 1451#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM 0x0400
1418 1452
1419#define EXT4_FEATURE_INCOMPAT_COMPRESSION 0x0001 1453#define EXT4_FEATURE_INCOMPAT_COMPRESSION 0x0001
@@ -1461,7 +1495,8 @@ static inline void ext4_clear_state_flags(struct ext4_inode_info *ei)
1461 EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE | \ 1495 EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE | \
1462 EXT4_FEATURE_RO_COMPAT_BTREE_DIR |\ 1496 EXT4_FEATURE_RO_COMPAT_BTREE_DIR |\
1463 EXT4_FEATURE_RO_COMPAT_HUGE_FILE |\ 1497 EXT4_FEATURE_RO_COMPAT_HUGE_FILE |\
1464 EXT4_FEATURE_RO_COMPAT_BIGALLOC) 1498 EXT4_FEATURE_RO_COMPAT_BIGALLOC |\
1499 EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)
1465 1500
1466/* 1501/*
1467 * Default values for user and/or group using reserved blocks 1502 * Default values for user and/or group using reserved blocks
@@ -1527,6 +1562,18 @@ struct ext4_dir_entry_2 {
1527}; 1562};
1528 1563
1529/* 1564/*
1565 * This is a bogus directory entry at the end of each leaf block that
1566 * records checksums.
1567 */
1568struct ext4_dir_entry_tail {
1569 __le32 det_reserved_zero1; /* Pretend to be unused */
1570 __le16 det_rec_len; /* 12 */
1571 __u8 det_reserved_zero2; /* Zero name length */
1572 __u8 det_reserved_ft; /* 0xDE, fake file type */
1573 __le32 det_checksum; /* crc32c(uuid+inum+dirblock) */
1574};
1575
1576/*
1530 * Ext4 directory file types. Only the low 3 bits are used. The 1577 * Ext4 directory file types. Only the low 3 bits are used. The
1531 * other bits are reserved for now. 1578 * other bits are reserved for now.
1532 */ 1579 */
@@ -1541,6 +1588,8 @@ struct ext4_dir_entry_2 {
1541 1588
1542#define EXT4_FT_MAX 8 1589#define EXT4_FT_MAX 8
1543 1590
1591#define EXT4_FT_DIR_CSUM 0xDE
1592
1544/* 1593/*
1545 * EXT4_DIR_PAD defines the directory entries boundaries 1594 * EXT4_DIR_PAD defines the directory entries boundaries
1546 * 1595 *
@@ -1609,6 +1658,25 @@ static inline __le16 ext4_rec_len_to_disk(unsigned len, unsigned blocksize)
1609#define DX_HASH_HALF_MD4_UNSIGNED 4 1658#define DX_HASH_HALF_MD4_UNSIGNED 4
1610#define DX_HASH_TEA_UNSIGNED 5 1659#define DX_HASH_TEA_UNSIGNED 5
1611 1660
1661static inline u32 ext4_chksum(struct ext4_sb_info *sbi, u32 crc,
1662 const void *address, unsigned int length)
1663{
1664 struct {
1665 struct shash_desc shash;
1666 char ctx[crypto_shash_descsize(sbi->s_chksum_driver)];
1667 } desc;
1668 int err;
1669
1670 desc.shash.tfm = sbi->s_chksum_driver;
1671 desc.shash.flags = 0;
1672 *(u32 *)desc.ctx = crc;
1673
1674 err = crypto_shash_update(&desc.shash, address, length);
1675 BUG_ON(err);
1676
1677 return *(u32 *)desc.ctx;
1678}
1679
1612#ifdef __KERNEL__ 1680#ifdef __KERNEL__
1613 1681
1614/* hash info structure used by the directory hash */ 1682/* hash info structure used by the directory hash */
@@ -1741,7 +1809,8 @@ struct mmp_struct {
1741 __le16 mmp_check_interval; 1809 __le16 mmp_check_interval;
1742 1810
1743 __le16 mmp_pad1; 1811 __le16 mmp_pad1;
1744 __le32 mmp_pad2[227]; 1812 __le32 mmp_pad2[226];
1813 __le32 mmp_checksum; /* crc32c(uuid+mmp_block) */
1745}; 1814};
1746 1815
1747/* arguments passed to the mmp thread */ 1816/* arguments passed to the mmp thread */
@@ -1784,8 +1853,24 @@ struct mmpd_data {
1784 1853
1785/* bitmap.c */ 1854/* bitmap.c */
1786extern unsigned int ext4_count_free(struct buffer_head *, unsigned); 1855extern unsigned int ext4_count_free(struct buffer_head *, unsigned);
1856void ext4_inode_bitmap_csum_set(struct super_block *sb, ext4_group_t group,
1857 struct ext4_group_desc *gdp,
1858 struct buffer_head *bh, int sz);
1859int ext4_inode_bitmap_csum_verify(struct super_block *sb, ext4_group_t group,
1860 struct ext4_group_desc *gdp,
1861 struct buffer_head *bh, int sz);
1862void ext4_block_bitmap_csum_set(struct super_block *sb, ext4_group_t group,
1863 struct ext4_group_desc *gdp,
1864 struct buffer_head *bh, int sz);
1865int ext4_block_bitmap_csum_verify(struct super_block *sb, ext4_group_t group,
1866 struct ext4_group_desc *gdp,
1867 struct buffer_head *bh, int sz);
1787 1868
1788/* balloc.c */ 1869/* balloc.c */
1870extern void ext4_validate_block_bitmap(struct super_block *sb,
1871 struct ext4_group_desc *desc,
1872 unsigned int block_group,
1873 struct buffer_head *bh);
1789extern unsigned int ext4_block_group(struct super_block *sb, 1874extern unsigned int ext4_block_group(struct super_block *sb,
1790 ext4_fsblk_t blocknr); 1875 ext4_fsblk_t blocknr);
1791extern ext4_grpblk_t ext4_block_group_offset(struct super_block *sb, 1876extern ext4_grpblk_t ext4_block_group_offset(struct super_block *sb,
@@ -1864,7 +1949,7 @@ extern void ext4_end_bitmap_read(struct buffer_head *bh, int uptodate);
1864/* mballoc.c */ 1949/* mballoc.c */
1865extern long ext4_mb_stats; 1950extern long ext4_mb_stats;
1866extern long ext4_mb_max_to_scan; 1951extern long ext4_mb_max_to_scan;
1867extern int ext4_mb_init(struct super_block *, int); 1952extern int ext4_mb_init(struct super_block *);
1868extern int ext4_mb_release(struct super_block *); 1953extern int ext4_mb_release(struct super_block *);
1869extern ext4_fsblk_t ext4_mb_new_blocks(handle_t *, 1954extern ext4_fsblk_t ext4_mb_new_blocks(handle_t *,
1870 struct ext4_allocation_request *, int *); 1955 struct ext4_allocation_request *, int *);
@@ -1936,6 +2021,8 @@ extern long ext4_compat_ioctl(struct file *, unsigned int, unsigned long);
1936extern int ext4_ext_migrate(struct inode *); 2021extern int ext4_ext_migrate(struct inode *);
1937 2022
1938/* namei.c */ 2023/* namei.c */
2024extern int ext4_dirent_csum_verify(struct inode *inode,
2025 struct ext4_dir_entry *dirent);
1939extern int ext4_orphan_add(handle_t *, struct inode *); 2026extern int ext4_orphan_add(handle_t *, struct inode *);
1940extern int ext4_orphan_del(handle_t *, struct inode *); 2027extern int ext4_orphan_del(handle_t *, struct inode *);
1941extern int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash, 2028extern int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
@@ -1950,6 +2037,10 @@ extern int ext4_group_extend(struct super_block *sb,
1950extern int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count); 2037extern int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count);
1951 2038
1952/* super.c */ 2039/* super.c */
2040extern int ext4_superblock_csum_verify(struct super_block *sb,
2041 struct ext4_super_block *es);
2042extern void ext4_superblock_csum_set(struct super_block *sb,
2043 struct ext4_super_block *es);
1953extern void *ext4_kvmalloc(size_t size, gfp_t flags); 2044extern void *ext4_kvmalloc(size_t size, gfp_t flags);
1954extern void *ext4_kvzalloc(size_t size, gfp_t flags); 2045extern void *ext4_kvzalloc(size_t size, gfp_t flags);
1955extern void ext4_kvfree(void *ptr); 2046extern void ext4_kvfree(void *ptr);
@@ -2025,10 +2116,17 @@ extern void ext4_used_dirs_set(struct super_block *sb,
2025 struct ext4_group_desc *bg, __u32 count); 2116 struct ext4_group_desc *bg, __u32 count);
2026extern void ext4_itable_unused_set(struct super_block *sb, 2117extern void ext4_itable_unused_set(struct super_block *sb,
2027 struct ext4_group_desc *bg, __u32 count); 2118 struct ext4_group_desc *bg, __u32 count);
2028extern __le16 ext4_group_desc_csum(struct ext4_sb_info *sbi, __u32 group, 2119extern int ext4_group_desc_csum_verify(struct super_block *sb, __u32 group,
2029 struct ext4_group_desc *gdp);
2030extern int ext4_group_desc_csum_verify(struct ext4_sb_info *sbi, __u32 group,
2031 struct ext4_group_desc *gdp); 2120 struct ext4_group_desc *gdp);
2121extern void ext4_group_desc_csum_set(struct super_block *sb, __u32 group,
2122 struct ext4_group_desc *gdp);
2123
2124static inline int ext4_has_group_desc_csum(struct super_block *sb)
2125{
2126 return EXT4_HAS_RO_COMPAT_FEATURE(sb,
2127 EXT4_FEATURE_RO_COMPAT_GDT_CSUM |
2128 EXT4_FEATURE_RO_COMPAT_METADATA_CSUM);
2129}
2032 2130
2033static inline ext4_fsblk_t ext4_blocks_count(struct ext4_super_block *es) 2131static inline ext4_fsblk_t ext4_blocks_count(struct ext4_super_block *es)
2034{ 2132{
@@ -2225,6 +2323,9 @@ static inline void ext4_unlock_group(struct super_block *sb,
2225 2323
2226static inline void ext4_mark_super_dirty(struct super_block *sb) 2324static inline void ext4_mark_super_dirty(struct super_block *sb)
2227{ 2325{
2326 struct ext4_super_block *es = EXT4_SB(sb)->s_es;
2327
2328 ext4_superblock_csum_set(sb, es);
2228 if (EXT4_SB(sb)->s_journal == NULL) 2329 if (EXT4_SB(sb)->s_journal == NULL)
2229 sb->s_dirt =1; 2330 sb->s_dirt =1;
2230} 2331}
@@ -2314,6 +2415,9 @@ extern int ext4_bio_write_page(struct ext4_io_submit *io,
2314 2415
2315/* mmp.c */ 2416/* mmp.c */
2316extern int ext4_multi_mount_protect(struct super_block *, ext4_fsblk_t); 2417extern int ext4_multi_mount_protect(struct super_block *, ext4_fsblk_t);
2418extern void ext4_mmp_csum_set(struct super_block *sb, struct mmp_struct *mmp);
2419extern int ext4_mmp_csum_verify(struct super_block *sb,
2420 struct mmp_struct *mmp);
2317 2421
2318/* BH_Uninit flag: blocks are allocated but uninitialized on disk */ 2422/* BH_Uninit flag: blocks are allocated but uninitialized on disk */
2319enum ext4_state_bits { 2423enum ext4_state_bits {