qgroup.c (232796df8c1437c41d308d161007f0715bac0a54) qgroup.c (29cbcf401793f4e2c871c846edc2191731df2c41)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2011 STRATO. All rights reserved.
4 */
5
6#include <linux/sched.h>
7#include <linux/pagemap.h>
8#include <linux/writeback.h>

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

3156/*
3157 * returns < 0 on error, 0 when more leafs are to be scanned.
3158 * returns 1 when done.
3159 */
3160static int qgroup_rescan_leaf(struct btrfs_trans_handle *trans,
3161 struct btrfs_path *path)
3162{
3163 struct btrfs_fs_info *fs_info = trans->fs_info;
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2011 STRATO. All rights reserved.
4 */
5
6#include <linux/sched.h>
7#include <linux/pagemap.h>
8#include <linux/writeback.h>

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

3156/*
3157 * returns < 0 on error, 0 when more leafs are to be scanned.
3158 * returns 1 when done.
3159 */
3160static int qgroup_rescan_leaf(struct btrfs_trans_handle *trans,
3161 struct btrfs_path *path)
3162{
3163 struct btrfs_fs_info *fs_info = trans->fs_info;
3164 struct btrfs_root *extent_root;
3164 struct btrfs_key found;
3165 struct extent_buffer *scratch_leaf = NULL;
3166 struct ulist *roots = NULL;
3167 u64 num_bytes;
3168 bool done;
3169 int slot;
3170 int ret;
3171
3172 mutex_lock(&fs_info->qgroup_rescan_lock);
3165 struct btrfs_key found;
3166 struct extent_buffer *scratch_leaf = NULL;
3167 struct ulist *roots = NULL;
3168 u64 num_bytes;
3169 bool done;
3170 int slot;
3171 int ret;
3172
3173 mutex_lock(&fs_info->qgroup_rescan_lock);
3173 ret = btrfs_search_slot_for_read(fs_info->extent_root,
3174 extent_root = btrfs_extent_root(fs_info,
3175 fs_info->qgroup_rescan_progress.objectid);
3176 ret = btrfs_search_slot_for_read(extent_root,
3174 &fs_info->qgroup_rescan_progress,
3175 path, 1, 0);
3176
3177 btrfs_debug(fs_info,
3178 "current progress key (%llu %u %llu), search_slot ret %d",
3179 fs_info->qgroup_rescan_progress.objectid,
3180 fs_info->qgroup_rescan_progress.type,
3181 fs_info->qgroup_rescan_progress.offset, ret);

--- 1113 unchanged lines hidden ---
3177 &fs_info->qgroup_rescan_progress,
3178 path, 1, 0);
3179
3180 btrfs_debug(fs_info,
3181 "current progress key (%llu %u %llu), search_slot ret %d",
3182 fs_info->qgroup_rescan_progress.objectid,
3183 fs_info->qgroup_rescan_progress.type,
3184 fs_info->qgroup_rescan_progress.offset, ret);

--- 1113 unchanged lines hidden ---