disk-io.c (1136fa0c07de570dc17858745af8be169d1440ba) disk-io.c (b4be6aefa73c9a6899ef3ba9c5faaa8a66e333ef)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2007 Oracle. All rights reserved.
4 */
5
6#include <linux/fs.h>
7#include <linux/blkdev.h>
8#include <linux/radix-tree.h>

--- 3799 unchanged lines hidden (view full) ---

3808 "failed to check the UUID tree: %d", ret);
3809 close_ctree(fs_info);
3810 return ret;
3811 }
3812 }
3813
3814 set_bit(BTRFS_FS_OPEN, &fs_info->flags);
3815
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2007 Oracle. All rights reserved.
4 */
5
6#include <linux/fs.h>
7#include <linux/blkdev.h>
8#include <linux/radix-tree.h>

--- 3799 unchanged lines hidden (view full) ---

3808 "failed to check the UUID tree: %d", ret);
3809 close_ctree(fs_info);
3810 return ret;
3811 }
3812 }
3813
3814 set_bit(BTRFS_FS_OPEN, &fs_info->flags);
3815
3816 /* Kick the cleaner thread so it'll start deleting snapshots. */
3817 if (test_bit(BTRFS_FS_UNFINISHED_DROPS, &fs_info->flags))
3818 wake_up_process(fs_info->cleaner_kthread);
3819
3816clear_oneshot:
3817 btrfs_clear_oneshot_options(fs_info);
3818 return 0;
3819
3820fail_qgroup:
3821 btrfs_free_qgroup_config(fs_info);
3822fail_trans_kthread:
3823 kthread_stop(fs_info->transaction_kthread);

--- 709 unchanged lines hidden (view full) ---

4533 /*
4534 * We don't want the cleaner to start new transactions, add more delayed
4535 * iputs, etc. while we're closing. We can't use kthread_stop() yet
4536 * because that frees the task_struct, and the transaction kthread might
4537 * still try to wake up the cleaner.
4538 */
4539 kthread_park(fs_info->cleaner_kthread);
4540
3820clear_oneshot:
3821 btrfs_clear_oneshot_options(fs_info);
3822 return 0;
3823
3824fail_qgroup:
3825 btrfs_free_qgroup_config(fs_info);
3826fail_trans_kthread:
3827 kthread_stop(fs_info->transaction_kthread);

--- 709 unchanged lines hidden (view full) ---

4537 /*
4538 * We don't want the cleaner to start new transactions, add more delayed
4539 * iputs, etc. while we're closing. We can't use kthread_stop() yet
4540 * because that frees the task_struct, and the transaction kthread might
4541 * still try to wake up the cleaner.
4542 */
4543 kthread_park(fs_info->cleaner_kthread);
4544
4545 /*
4546 * If we had UNFINISHED_DROPS we could still be processing them, so
4547 * clear that bit and wake up relocation so it can stop.
4548 */
4549 btrfs_wake_unfinished_drop(fs_info);
4550
4541 /* wait for the qgroup rescan worker to stop */
4542 btrfs_qgroup_wait_for_completion(fs_info, false);
4543
4544 /* wait for the uuid_scan task to finish */
4545 down(&fs_info->uuid_tree_rescan_sem);
4546 /* avoid complains from lockdep et al., set sem back to initial state */
4547 up(&fs_info->uuid_tree_rescan_sem);
4548

--- 703 unchanged lines hidden ---
4551 /* wait for the qgroup rescan worker to stop */
4552 btrfs_qgroup_wait_for_completion(fs_info, false);
4553
4554 /* wait for the uuid_scan task to finish */
4555 down(&fs_info->uuid_tree_rescan_sem);
4556 /* avoid complains from lockdep et al., set sem back to initial state */
4557 up(&fs_info->uuid_tree_rescan_sem);
4558

--- 703 unchanged lines hidden ---