diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-05-23 06:30:52 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-05-23 06:30:52 -0400 |
commit | 712673339a0d085358fd1cd3a6477cc7979bb69f (patch) | |
tree | b2e268685e3cbba19a4adb2a47d853e4e461fcfc /fs/btrfs/disk-io.c | |
parent | aa2dfb372a2a647beedac163ce6f8b0fcbefac29 (diff) | |
parent | 8628764e1a5e1998a42b9713e9edea7753653d01 (diff) |
Merge branch 'for-chris' of git://git.kernel.org/pub/scm/linux/kernel/git/arne/btrfs-unstable-arne into inode_numbers
Conflicts:
fs/btrfs/Makefile
fs/btrfs/ctree.h
fs/btrfs/volumes.h
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index a2eb3a3755db..29a2475b9b14 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1654,6 +1654,17 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1654 | } | 1654 | } |
1655 | btrfs_init_delayed_root(fs_info->delayed_root); | 1655 | btrfs_init_delayed_root(fs_info->delayed_root); |
1656 | 1656 | ||
1657 | mutex_init(&fs_info->scrub_lock); | ||
1658 | atomic_set(&fs_info->scrubs_running, 0); | ||
1659 | atomic_set(&fs_info->scrub_pause_req, 0); | ||
1660 | atomic_set(&fs_info->scrubs_paused, 0); | ||
1661 | atomic_set(&fs_info->scrub_cancel_req, 0); | ||
1662 | init_waitqueue_head(&fs_info->scrub_pause_wait); | ||
1663 | init_rwsem(&fs_info->scrub_super_lock); | ||
1664 | fs_info->scrub_workers_refcnt = 0; | ||
1665 | btrfs_init_workers(&fs_info->scrub_workers, "scrub", | ||
1666 | fs_info->thread_pool_size, &fs_info->generic_worker); | ||
1667 | |||
1657 | sb->s_blocksize = 4096; | 1668 | sb->s_blocksize = 4096; |
1658 | sb->s_blocksize_bits = blksize_bits(4096); | 1669 | sb->s_blocksize_bits = blksize_bits(4096); |
1659 | sb->s_bdi = &fs_info->bdi; | 1670 | sb->s_bdi = &fs_info->bdi; |
@@ -2488,6 +2499,7 @@ int close_ctree(struct btrfs_root *root) | |||
2488 | fs_info->closing = 1; | 2499 | fs_info->closing = 1; |
2489 | smp_mb(); | 2500 | smp_mb(); |
2490 | 2501 | ||
2502 | btrfs_scrub_cancel(root); | ||
2491 | btrfs_put_block_group_cache(fs_info); | 2503 | btrfs_put_block_group_cache(fs_info); |
2492 | 2504 | ||
2493 | /* | 2505 | /* |