Lines Matching refs:discard_index
74 return &discard_ctl->discard_list[block_group->discard_index]; in get_discard_list()
84 block_group->discard_index == BTRFS_DISCARD_INDEX_UNUSED) { in __add_to_discard_list()
85 if (block_group->discard_index == BTRFS_DISCARD_INDEX_UNUSED) in __add_to_discard_list()
86 block_group->discard_index = BTRFS_DISCARD_INDEX_START; in __add_to_discard_list()
119 block_group->discard_index = BTRFS_DISCARD_INDEX_UNUSED; in add_to_discard_unused_list()
204 int *discard_index, u64 now) in peek_discard_list() argument
213 if (block_group->discard_index == BTRFS_DISCARD_INDEX_UNUSED && in peek_discard_list()
229 *discard_index = block_group->discard_index; in peek_discard_list()
257 if (block_group->discard_index > BTRFS_DISCARD_INDEX_START && in btrfs_discard_check_filter()
258 bytes >= discard_minlen[block_group->discard_index - 1]) { in btrfs_discard_check_filter()
266 block_group->discard_index = i; in btrfs_discard_check_filter()
285 block_group->discard_index++; in btrfs_update_discard_index()
286 if (block_group->discard_index == BTRFS_NR_DISCARD_LISTS) { in btrfs_update_discard_index()
287 block_group->discard_index = 1; in btrfs_update_discard_index()
442 int discard_index = 0; in btrfs_discard_workfn() local
450 &discard_index, now); in btrfs_discard_workfn()
459 minlen = discard_minlen[discard_index]; in btrfs_discard_workfn()
470 if (discard_index != BTRFS_DISCARD_INDEX_UNUSED) in btrfs_discard_workfn()
471 maxlen = discard_minlen[discard_index - 1]; in btrfs_discard_workfn()