Merge tag 'for-4.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs fixes from David Sterba: "We have a few regression fixes for qgroup rescan status tracking and the vm_fault_t conversion that mixed up the error values" * tag 'for-4.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix mount failure when qgroup rescan is in progress Btrfs: fix regression in btrfs_page_mkwrite() from vm_fault_t conversion btrfs: quota: Set rescan progress to (u64)-1 if we hit last leaf
This commit is contained in:
@@ -9005,13 +9005,14 @@ again:
|
||||
|
||||
unlock_extent_cached(io_tree, page_start, page_end, &cached_state);
|
||||
|
||||
out_unlock:
|
||||
if (!ret2) {
|
||||
btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE, true);
|
||||
sb_end_pagefault(inode->i_sb);
|
||||
extent_changeset_free(data_reserved);
|
||||
return VM_FAULT_LOCKED;
|
||||
}
|
||||
|
||||
out_unlock:
|
||||
unlock_page(page);
|
||||
out:
|
||||
btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE, (ret != 0));
|
||||
|
@@ -2680,8 +2680,10 @@ out:
|
||||
free_extent_buffer(scratch_leaf);
|
||||
}
|
||||
|
||||
if (done && !ret)
|
||||
if (done && !ret) {
|
||||
ret = 1;
|
||||
fs_info->qgroup_rescan_progress.objectid = (u64)-1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2784,13 +2786,20 @@ qgroup_rescan_init(struct btrfs_fs_info *fs_info, u64 progress_objectid,
|
||||
|
||||
if (!init_flags) {
|
||||
/* we're resuming qgroup rescan at mount time */
|
||||
if (!(fs_info->qgroup_flags & BTRFS_QGROUP_STATUS_FLAG_RESCAN))
|
||||
if (!(fs_info->qgroup_flags &
|
||||
BTRFS_QGROUP_STATUS_FLAG_RESCAN)) {
|
||||
btrfs_warn(fs_info,
|
||||
"qgroup rescan init failed, qgroup is not enabled");
|
||||
else if (!(fs_info->qgroup_flags & BTRFS_QGROUP_STATUS_FLAG_ON))
|
||||
ret = -EINVAL;
|
||||
} else if (!(fs_info->qgroup_flags &
|
||||
BTRFS_QGROUP_STATUS_FLAG_ON)) {
|
||||
btrfs_warn(fs_info,
|
||||
"qgroup rescan init failed, qgroup rescan is not queued");
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
mutex_lock(&fs_info->qgroup_rescan_lock);
|
||||
|
Reference in New Issue
Block a user