Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374865
b: refs/heads/master
c: f42a34b
h: refs/heads/master
i:
  374863: 664ad5e
v: v3
  • Loading branch information
Miao Xie authored and Josef Bacik committed May 6, 2013
1 parent e85a705 commit 5fcd4b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f7f82b81d2c297a5864dcfd0a205917d3e753aba
refs/heads/master: f42a34b2f10c411ef45f247f3000ed03ba4e80c0
10 changes: 7 additions & 3 deletions trunk/fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1191,11 +1191,14 @@ static void btrfs_resize_thread_pool(struct btrfs_fs_info *fs_info,
new_pool_size);
}

static inline void btrfs_remount_prepare(struct btrfs_fs_info *fs_info,
unsigned long old_opts, int flags)
static inline void btrfs_remount_prepare(struct btrfs_fs_info *fs_info)
{
set_bit(BTRFS_FS_STATE_REMOUNTING, &fs_info->fs_state);
}

static inline void btrfs_remount_begin(struct btrfs_fs_info *fs_info,
unsigned long old_opts, int flags)
{
if (btrfs_raw_test_opt(old_opts, AUTO_DEFRAG) &&
(!btrfs_raw_test_opt(fs_info->mount_opt, AUTO_DEFRAG) ||
(flags & MS_RDONLY))) {
Expand Down Expand Up @@ -1236,14 +1239,15 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
unsigned int old_metadata_ratio = fs_info->metadata_ratio;
int ret;

btrfs_remount_prepare(fs_info, old_opts, *flags);
btrfs_remount_prepare(fs_info);

ret = btrfs_parse_options(root, data);
if (ret) {
ret = -EINVAL;
goto restore;
}

btrfs_remount_begin(fs_info, old_opts, *flags);
btrfs_resize_thread_pool(fs_info,
fs_info->thread_pool_size, old_thread_pool_size);

Expand Down

0 comments on commit 5fcd4b6

Please sign in to comment.