Lines Matching refs:discardable_extents
536 s32 discardable_extents; in btrfs_discard_calc_delay() local
541 discardable_extents = atomic_read(&discard_ctl->discardable_extents); in btrfs_discard_calc_delay()
542 if (!discardable_extents) in btrfs_discard_calc_delay()
554 if (discardable_extents < 0) in btrfs_discard_calc_delay()
555 atomic_add(-discardable_extents, in btrfs_discard_calc_delay()
556 &discard_ctl->discardable_extents); in btrfs_discard_calc_delay()
563 if (discardable_extents <= 0) { in btrfs_discard_calc_delay()
572 delay = BTRFS_DISCARD_TARGET_MSEC / discardable_extents; in btrfs_discard_calc_delay()
605 extents_delta = ctl->discardable_extents[BTRFS_STAT_CURR] - in btrfs_discard_update_discardable()
606 ctl->discardable_extents[BTRFS_STAT_PREV]; in btrfs_discard_update_discardable()
608 atomic_add(extents_delta, &discard_ctl->discardable_extents); in btrfs_discard_update_discardable()
609 ctl->discardable_extents[BTRFS_STAT_PREV] = in btrfs_discard_update_discardable()
610 ctl->discardable_extents[BTRFS_STAT_CURR]; in btrfs_discard_update_discardable()
707 atomic_set(&discard_ctl->discardable_extents, 0); in btrfs_discard_init()