diff options
author | Stefan Behrens <sbehrens@giantdisaster.de> | 2011-11-09 13:44:05 +0100 |
---|---|---|
committer | Stefan Behrens <sbehrens@giantdisaster.de> | 2011-12-21 19:14:17 +0100 |
commit | 21adbd5cbb5344a3fca6bb7ddb2ab6cb03c44546 (patch) | |
tree | 208c3ab6ad8bb35937b21c4d54e45e46d99557ff /fs/btrfs/volumes.c | |
parent | f11e4d7f533249ddfa110116200c5c3a509f9218 (diff) | |
download | kernel_goldelico_gta04-21adbd5cbb5344a3fca6bb7ddb2ab6cb03c44546.zip kernel_goldelico_gta04-21adbd5cbb5344a3fca6bb7ddb2ab6cb03c44546.tar.gz kernel_goldelico_gta04-21adbd5cbb5344a3fca6bb7ddb2ab6cb03c44546.tar.bz2 |
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/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index f4b839f..821334f 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -32,6 +32,7 @@ #include "print-tree.h" #include "volumes.h" #include "async-thread.h" +#include "check-integrity.h" static int init_first_rw_device(struct btrfs_trans_handle *trans, struct btrfs_root *root, @@ -246,7 +247,7 @@ loop_lock: sync_pending = 0; } - submit_bio(cur->bi_rw, cur); + btrfsic_submit_bio(cur->bi_rw, cur); num_run++; batch_run++; if (need_resched()) @@ -3304,7 +3305,7 @@ static noinline int schedule_bio(struct btrfs_root *root, /* don't bother with additional async steps for reads, right now */ if (!(rw & REQ_WRITE)) { bio_get(bio); - submit_bio(rw, bio); + btrfsic_submit_bio(rw, bio); bio_put(bio); return 0; } @@ -3399,7 +3400,7 @@ int btrfs_map_bio(struct btrfs_root *root, int rw, struct bio *bio, if (async_submit) schedule_bio(root, dev, rw, bio); else - submit_bio(rw, bio); + btrfsic_submit_bio(rw, bio); } else { bio->bi_bdev = root->fs_info->fs_devices->latest_bdev; bio->bi_sector = logical >> 9; |