mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
Merge tag 'for-7.0-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs fixes from David Sterba: - fix logging of new dentries when logging parent directory and there are conflicting inodes (e.g. deleted directory) - avoid taking big device lock for zone setup, this is not necessary during mount - tune message verbosity when auto-reclaiming zones when low on space - fix slightly misleading message of root item check * tag 'for-7.0-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: tree-checker: fix misleading root drop_level error message btrfs: log new dentries when logging parent dir of a conflicting inode btrfs: don't take device_list_mutex when querying zone info btrfs: pass 'verbose' parameter to btrfs_relocate_block_group
This commit is contained in:
@@ -1284,7 +1284,7 @@ static int check_root_item(struct extent_buffer *leaf, struct btrfs_key *key,
|
||||
}
|
||||
if (unlikely(btrfs_root_drop_level(&ri) >= BTRFS_MAX_LEVEL)) {
|
||||
generic_err(leaf, slot,
|
||||
"invalid root level, have %u expect [0, %u]",
|
||||
"invalid root drop_level, have %u expect [0, %u]",
|
||||
btrfs_root_drop_level(&ri), BTRFS_MAX_LEVEL - 1);
|
||||
return -EUCLEAN;
|
||||
}
|
||||
|
||||
@@ -6195,6 +6195,7 @@ static int log_conflicting_inodes(struct btrfs_trans_handle *trans,
|
||||
struct btrfs_root *root,
|
||||
struct btrfs_log_ctx *ctx)
|
||||
{
|
||||
const bool orig_log_new_dentries = ctx->log_new_dentries;
|
||||
int ret = 0;
|
||||
|
||||
/*
|
||||
@@ -6256,7 +6257,11 @@ static int log_conflicting_inodes(struct btrfs_trans_handle *trans,
|
||||
* dir index key range logged for the directory. So we
|
||||
* must make sure the deletion is recorded.
|
||||
*/
|
||||
ctx->log_new_dentries = false;
|
||||
ret = btrfs_log_inode(trans, inode, LOG_INODE_ALL, ctx);
|
||||
if (!ret && ctx->log_new_dentries)
|
||||
ret = log_new_dir_dentries(trans, inode, ctx);
|
||||
|
||||
btrfs_add_delayed_iput(inode);
|
||||
if (ret)
|
||||
break;
|
||||
@@ -6291,6 +6296,7 @@ static int log_conflicting_inodes(struct btrfs_trans_handle *trans,
|
||||
break;
|
||||
}
|
||||
|
||||
ctx->log_new_dentries = orig_log_new_dentries;
|
||||
ctx->logging_conflict_inodes = false;
|
||||
if (ret)
|
||||
free_conflicting_inodes(ctx);
|
||||
|
||||
@@ -3587,7 +3587,7 @@ int btrfs_relocate_chunk(struct btrfs_fs_info *fs_info, u64 chunk_offset, bool v
|
||||
|
||||
/* step one, relocate all the extents inside this chunk */
|
||||
btrfs_scrub_pause(fs_info);
|
||||
ret = btrfs_relocate_block_group(fs_info, chunk_offset, true);
|
||||
ret = btrfs_relocate_block_group(fs_info, chunk_offset, verbose);
|
||||
btrfs_scrub_continue(fs_info);
|
||||
if (ret) {
|
||||
/*
|
||||
|
||||
@@ -337,7 +337,10 @@ int btrfs_get_dev_zone_info_all_devices(struct btrfs_fs_info *fs_info)
|
||||
if (!btrfs_fs_incompat(fs_info, ZONED))
|
||||
return 0;
|
||||
|
||||
mutex_lock(&fs_devices->device_list_mutex);
|
||||
/*
|
||||
* No need to take the device_list mutex here, we're still in the mount
|
||||
* path and devices cannot be added to or removed from the list yet.
|
||||
*/
|
||||
list_for_each_entry(device, &fs_devices->devices, dev_list) {
|
||||
/* We can skip reading of zone info for missing devices */
|
||||
if (!device->bdev)
|
||||
@@ -347,7 +350,6 @@ int btrfs_get_dev_zone_info_all_devices(struct btrfs_fs_info *fs_info)
|
||||
if (ret)
|
||||
break;
|
||||
}
|
||||
mutex_unlock(&fs_devices->device_list_mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user