diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-21 13:49:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-21 13:49:22 -0400 |
commit | 07be1337b9e8bfcd855c6e9175b5066a30ac609b (patch) | |
tree | e40ad01dc89f6eb17d461939b809fea3387fc2a5 /fs/btrfs/relocation.c | |
parent | 63d222b9d277c4d7bf08afd1631a7f8e327a825c (diff) | |
parent | c315ef8d9db7f1a0ebd023a395ebdfde1c68057e (diff) |
Merge branch 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs updates from Chris Mason:
"This has our merge window series of cleanups and fixes. These target
a wide range of issues, but do include some important fixes for
qgroups, O_DIRECT, and fsync handling. Jeff Mahoney moved around a
few definitions to make them easier for userland to consume.
Also whiteout support is included now that issues with overlayfs have
been cleared up.
I have one more fix pending for page faults during btrfs_copy_from_user,
but I wanted to get this bulk out the door first"
* 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (90 commits)
btrfs: fix memory leak during RAID 5/6 device replacement
Btrfs: add semaphore to synchronize direct IO writes with fsync
Btrfs: fix race between block group relocation and nocow writes
Btrfs: fix race between fsync and direct IO writes for prealloc extents
Btrfs: fix number of transaction units for renames with whiteout
Btrfs: pin logs earlier when doing a rename exchange operation
Btrfs: unpin logs if rename exchange operation fails
Btrfs: fix inode leak on failure to setup whiteout inode in rename
btrfs: add support for RENAME_EXCHANGE and RENAME_WHITEOUT
Btrfs: pin log earlier when renaming
Btrfs: unpin log if rename operation fails
Btrfs: don't do unnecessary delalloc flushes when relocating
Btrfs: don't wait for unrelated IO to finish before relocation
Btrfs: fix empty symlink after creating symlink and fsync parent dir
Btrfs: fix for incorrect directory entries after fsync log replay
btrfs: build fixup for qgroup_account_snapshot
btrfs: qgroup: Fix qgroup accounting when creating snapshot
Btrfs: fix fspath error deallocation
btrfs: make find_workspace warn if there are no workspaces
btrfs: make find_workspace always succeed
...
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 08ef890deca6..1cfd35cfac76 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
@@ -2418,7 +2418,7 @@ again: | |||
2418 | } | 2418 | } |
2419 | out: | 2419 | out: |
2420 | if (ret) { | 2420 | if (ret) { |
2421 | btrfs_std_error(root->fs_info, ret, NULL); | 2421 | btrfs_handle_fs_error(root->fs_info, ret, NULL); |
2422 | if (!list_empty(&reloc_roots)) | 2422 | if (!list_empty(&reloc_roots)) |
2423 | free_reloc_roots(&reloc_roots); | 2423 | free_reloc_roots(&reloc_roots); |
2424 | 2424 | ||
@@ -4254,12 +4254,11 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start) | |||
4254 | btrfs_info(extent_root->fs_info, "relocating block group %llu flags %llu", | 4254 | btrfs_info(extent_root->fs_info, "relocating block group %llu flags %llu", |
4255 | rc->block_group->key.objectid, rc->block_group->flags); | 4255 | rc->block_group->key.objectid, rc->block_group->flags); |
4256 | 4256 | ||
4257 | ret = btrfs_start_delalloc_roots(fs_info, 0, -1); | 4257 | btrfs_wait_block_group_reservations(rc->block_group); |
4258 | if (ret < 0) { | 4258 | btrfs_wait_nocow_writers(rc->block_group); |
4259 | err = ret; | 4259 | btrfs_wait_ordered_roots(fs_info, -1, |
4260 | goto out; | 4260 | rc->block_group->key.objectid, |
4261 | } | 4261 | rc->block_group->key.offset); |
4262 | btrfs_wait_ordered_roots(fs_info, -1); | ||
4263 | 4262 | ||
4264 | while (1) { | 4263 | while (1) { |
4265 | mutex_lock(&fs_info->cleaner_mutex); | 4264 | mutex_lock(&fs_info->cleaner_mutex); |