btrfs: scrub: use GFP_KERNEL on the submission path
Scrub is not on the critical writeback path we don't need to use GFP_NOFS for all allocations. The failures are handled and stats passed back to userspace. Let's use GFP_KERNEL on the paths where everything is ok, ie. setup the global structures and the IO submission paths. Functions that do the repair and fixups still use GFP_NOFS as we might want to skip any other filesystem activity if we encounter an error. This could turn out to be unnecessary, but requires more review compared to the easy cases in this patch. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -802,7 +802,7 @@ static int btrfs_dev_replace_kthread(void *data)
|
||||
struct btrfs_ioctl_dev_replace_args *status_args;
|
||||
u64 progress;
|
||||
|
||||
status_args = kzalloc(sizeof(*status_args), GFP_NOFS);
|
||||
status_args = kzalloc(sizeof(*status_args), GFP_KERNEL);
|
||||
if (status_args) {
|
||||
btrfs_dev_replace_status(fs_info, status_args);
|
||||
progress = status_args->status.progress_1000;
|
||||
|
Reference in New Issue
Block a user