Lines Matching refs:objectid
53 key.objectid = BTRFS_FIRST_FREE_OBJECTID; in caching_kthread()
105 if (key.objectid >= root->highest_objectid) in caching_kthread()
108 if (last != (u64)-1 && last + 1 != key.objectid) { in caching_kthread()
110 key.objectid - last - 1); in caching_kthread()
114 last = key.objectid; in caching_kthread()
144 u64 objectid; in start_caching() local
173 ret = btrfs_find_free_objectid(root, &objectid); in start_caching()
174 if (!ret && objectid <= BTRFS_LAST_FREE_OBJECTID) { in start_caching()
175 __btrfs_add_free_space(ctl, objectid, in start_caching()
176 BTRFS_LAST_FREE_OBJECTID - objectid + 1); in start_caching()
180 root->root_key.objectid); in start_caching()
184 int btrfs_find_free_ino(struct btrfs_root *root, u64 *objectid) in btrfs_find_free_ino() argument
187 return btrfs_find_free_objectid(root, objectid); in btrfs_find_free_ino()
190 *objectid = btrfs_find_ino_for_alloc(root); in btrfs_find_free_ino()
192 if (*objectid != 0) in btrfs_find_free_ino()
208 void btrfs_return_ino(struct btrfs_root *root, u64 objectid) in btrfs_return_ino() argument
218 __btrfs_add_free_space(ctl, objectid, 1); in btrfs_return_ino()
239 if (objectid <= root->cache_progress || in btrfs_return_ino()
240 objectid > root->highest_objectid) in btrfs_return_ino()
241 __btrfs_add_free_space(ctl, objectid, 1); in btrfs_return_ino()
243 __btrfs_add_free_space(pinned, objectid, 1); in btrfs_return_ino()
409 if (root->root_key.objectid != BTRFS_FS_TREE_OBJECTID && in btrfs_save_ino_cache()
410 (root->root_key.objectid < BTRFS_FIRST_FREE_OBJECTID || in btrfs_save_ino_cache()
411 root->root_key.objectid > BTRFS_LAST_FREE_OBJECTID)) in btrfs_save_ino_cache()
519 static int btrfs_find_highest_objectid(struct btrfs_root *root, u64 *objectid) in btrfs_find_highest_objectid() argument
532 search_key.objectid = BTRFS_LAST_FREE_OBJECTID; in btrfs_find_highest_objectid()
543 *objectid = max_t(u64, found_key.objectid, in btrfs_find_highest_objectid()
546 *objectid = BTRFS_FIRST_FREE_OBJECTID - 1; in btrfs_find_highest_objectid()
554 int btrfs_find_free_objectid(struct btrfs_root *root, u64 *objectid) in btrfs_find_free_objectid() argument
571 *objectid = ++root->highest_objectid; in btrfs_find_free_objectid()