diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-11-09 10:12:06 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-01-03 15:09:45 +0100 |
commit | 54230013d41fb6eb231755dfec8615db9dcfb020 (patch) | |
tree | 892e00575744e71a77b27b6104bcd23fa56fb59c /fs/btrfs/ctree.h | |
parent | 6dbdd578cd4fcb88ad9e57777a140e3349323e28 (diff) |
btrfs: get rid of root->orphan_cleanup_state
Now that we don't care about the stage of the orphan_cleanup_state,
simply replace it with a bit on ->state to make sure we don't call the
orphan cleanup every time we wander into this root.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 1f2a50c22b61..004cf3f67ce5 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -511,11 +511,6 @@ struct btrfs_discard_ctl { atomic64_t discard_bytes_saved; }; -enum btrfs_orphan_cleanup_state { - ORPHAN_CLEANUP_STARTED = 1, - ORPHAN_CLEANUP_DONE = 2, -}; - void btrfs_init_async_reclaim_work(struct btrfs_fs_info *fs_info); /* fs_info */ @@ -1110,6 +1105,8 @@ enum { BTRFS_ROOT_HAS_LOG_TREE, /* Qgroup flushing is in progress */ BTRFS_ROOT_QGROUP_FLUSHING, + /* We started the orphan cleanup for this root. */ + BTRFS_ROOT_ORPHAN_CLEANUP, }; /* @@ -1178,8 +1175,6 @@ struct btrfs_root { spinlock_t log_extents_lock[2]; struct list_head logged_list[2]; - int orphan_cleanup_state; - spinlock_t inode_lock; /* red-black tree that keeps track of in-memory inodes */ struct rb_root inode_tree; |