diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2012-01-16 15:04:47 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2012-01-16 15:04:47 -0500 |
commit | c9e9f97bdfb64d06e9520f8e4f37674ac21cc9bc (patch) | |
tree | 22d695a7a461068c773b327e5c89a045ade5d8a3 /fs/btrfs/disk-io.c | |
parent | 10ea00f55a07f8f9536d9112b95108a86f700bab (diff) |
Btrfs: add basic restriper infrastructure
Add basic restriper infrastructure: extended balancing ioctl and all
related ioctl data structures, add data structure for tracking
restriper's state to fs_info, etc. The semantics of the old balancing
ioctl are fully preserved.
Explicitly disallow any volume operations when balance is in progress.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index ce9d0fb3627d..190a1b24c902 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -2002,6 +2002,10 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
2002 | init_rwsem(&fs_info->scrub_super_lock); | 2002 | init_rwsem(&fs_info->scrub_super_lock); |
2003 | fs_info->scrub_workers_refcnt = 0; | 2003 | fs_info->scrub_workers_refcnt = 0; |
2004 | 2004 | ||
2005 | spin_lock_init(&fs_info->balance_lock); | ||
2006 | mutex_init(&fs_info->balance_mutex); | ||
2007 | fs_info->balance_ctl = NULL; | ||
2008 | |||
2005 | sb->s_blocksize = 4096; | 2009 | sb->s_blocksize = 4096; |
2006 | sb->s_blocksize_bits = blksize_bits(4096); | 2010 | sb->s_blocksize_bits = blksize_bits(4096); |
2007 | sb->s_bdi = &fs_info->bdi; | 2011 | sb->s_bdi = &fs_info->bdi; |