Lines Matching defs:ctl
33 struct btrfs_free_space_ctl *ctl = root->free_ino_ctl;
109 __btrfs_add_free_space(fs_info, ctl, last + 1,
120 __btrfs_add_free_space(fs_info, ctl, last + 1,
142 struct btrfs_free_space_ctl *ctl = root->free_ino_ctl;
177 __btrfs_add_free_space(fs_info, ctl, objectid,
254 struct btrfs_free_space_ctl *ctl = root->free_ino_ctl;
284 __btrfs_add_free_space(root->fs_info, ctl,
297 static void recalculate_thresholds(struct btrfs_free_space_ctl *ctl)
304 n = rb_last(&ctl->free_space_offset);
306 ctl->extents_thresh = INIT_THRESHOLD;
319 if (max_bitmaps <= ctl->total_bitmaps) {
320 ctl->extents_thresh = 0;
324 ctl->extents_thresh = (max_bitmaps - ctl->total_bitmaps) *
332 static bool use_bitmap(struct btrfs_free_space_ctl *ctl,
335 if (ctl->free_extents < ctl->extents_thresh ||
347 static void pinned_recalc_thresholds(struct btrfs_free_space_ctl *ctl)
351 static bool pinned_use_bitmap(struct btrfs_free_space_ctl *ctl,
371 struct btrfs_free_space_ctl *ctl = root->free_ino_ctl;
374 spin_lock_init(&ctl->tree_lock);
375 ctl->unit = 1;
376 ctl->start = 0;
377 ctl->private = NULL;
378 ctl->op = &free_ino_op;
379 INIT_LIST_HEAD(&ctl->trimming_ranges);
380 mutex_init(&ctl->cache_writeout_mutex);
387 ctl->extents_thresh = INIT_THRESHOLD;
401 struct btrfs_free_space_ctl *ctl = root->free_ino_ctl;
489 spin_lock(&ctl->tree_lock);
490 prealloc = sizeof(struct btrfs_free_space) * ctl->free_extents;
492 prealloc += ctl->total_bitmaps * PAGE_SIZE;
493 spin_unlock(&ctl->tree_lock);