aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2011-11-09 07:44:05 -0500
committerStefan Behrens <sbehrens@giantdisaster.de>2011-12-21 13:14:17 -0500
commit21adbd5cbb5344a3fca6bb7ddb2ab6cb03c44546 (patch)
tree208c3ab6ad8bb35937b21c4d54e45e46d99557ff /fs/btrfs/ctree.h
parentf11e4d7f533249ddfa110116200c5c3a509f9218 (diff)
Btrfs: integrate integrity check module into btrfs
This is the last part of the patch series. It modifies the btrfs code to use the integrity check module if configured to do so with the define BTRFS_FS_CHECK_INTEGRITY. If this define is not set, the only effective change is that code is added that handles the mount option to activate the integrity check. If the mount option is set and the define BTRFS_FS_CHECK_INTEGRITY is not set, that code complains in the log and the mount fails with EINVAL. Add the mount option to activate the usage of the integrity check code. Add invocation of btrfs integrity check code init and cleanup function on mount and umount, respectively. Add hook to call btrfs integrity check code version of submit_bh/submit_bio. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 67385033323d..39f6188688e6 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -971,7 +971,7 @@ struct btrfs_fs_info {
971 * is required instead of the faster short fsync log commits 971 * is required instead of the faster short fsync log commits
972 */ 972 */
973 u64 last_trans_log_full_commit; 973 u64 last_trans_log_full_commit;
974 unsigned long mount_opt:20; 974 unsigned long mount_opt:21;
975 unsigned long compress_type:4; 975 unsigned long compress_type:4;
976 u64 max_inline; 976 u64 max_inline;
977 u64 alloc_start; 977 u64 alloc_start;
@@ -1155,6 +1155,10 @@ struct btrfs_fs_info {
1155 int scrub_workers_refcnt; 1155 int scrub_workers_refcnt;
1156 struct btrfs_workers scrub_workers; 1156 struct btrfs_workers scrub_workers;
1157 1157
1158#ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
1159 u32 check_integrity_print_mask;
1160#endif
1161
1158 /* filesystem state */ 1162 /* filesystem state */
1159 u64 fs_state; 1163 u64 fs_state;
1160 1164
@@ -1413,6 +1417,8 @@ struct btrfs_ioctl_defrag_range_args {
1413#define BTRFS_MOUNT_AUTO_DEFRAG (1 << 16) 1417#define BTRFS_MOUNT_AUTO_DEFRAG (1 << 16)
1414#define BTRFS_MOUNT_INODE_MAP_CACHE (1 << 17) 1418#define BTRFS_MOUNT_INODE_MAP_CACHE (1 << 17)
1415#define BTRFS_MOUNT_RECOVERY (1 << 18) 1419#define BTRFS_MOUNT_RECOVERY (1 << 18)
1420#define BTRFS_MOUNT_CHECK_INTEGRITY (1 << 19)
1421#define BTRFS_MOUNT_CHECK_INTEGRITY_INCLUDING_EXTENT_DATA (1 << 20)
1416 1422
1417#define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt) 1423#define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt)
1418#define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt) 1424#define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt)