Lines Matching defs:alloc_offset

1312 	u64 alloc_offset;
1333 info->alloc_offset = WP_MISSING_DEV;
1343 info->alloc_offset = WP_CONVENTIONAL;
1368 info->alloc_offset = 0;
1381 info->alloc_offset = WP_MISSING_DEV;
1403 info->alloc_offset = WP_MISSING_DEV;
1406 info->alloc_offset = 0;
1409 info->alloc_offset = info->capacity;
1413 info->alloc_offset = ((zone.wp - zone.start) << SECTOR_SHIFT);
1427 if (unlikely(info->alloc_offset == WP_MISSING_DEV)) {
1434 bg->alloc_offset = info->alloc_offset;
1456 if (unlikely(zone_info[0].alloc_offset == WP_MISSING_DEV)) {
1462 if (unlikely(zone_info[1].alloc_offset == WP_MISSING_DEV)) {
1475 if (zone_info[i].alloc_offset == WP_CONVENTIONAL)
1477 if (last_alloc <= zone_info[i].alloc_offset) {
1478 last_alloc = zone_info[i].alloc_offset;
1483 if (zone_info[0].alloc_offset == WP_CONVENTIONAL)
1484 zone_info[0].alloc_offset = last_alloc;
1486 if (zone_info[1].alloc_offset == WP_CONVENTIONAL)
1487 zone_info[1].alloc_offset = last_alloc;
1489 if (unlikely(zone_info[0].alloc_offset != zone_info[1].alloc_offset)) {
1502 bg->alloc_offset = zone_info[0].alloc_offset;
1530 if (zone_info[i].alloc_offset == WP_MISSING_DEV ||
1531 zone_info[i].alloc_offset == WP_CONVENTIONAL)
1533 if (last_alloc <= zone_info[i].alloc_offset) {
1534 last_alloc = zone_info[i].alloc_offset;
1540 if (zone_info[i].alloc_offset == WP_MISSING_DEV)
1543 if (zone_info[i].alloc_offset == WP_CONVENTIONAL)
1544 zone_info[i].alloc_offset = last_alloc;
1546 if (unlikely((zone_info[0].alloc_offset != zone_info[i].alloc_offset) &&
1564 if (zone_info[0].alloc_offset != WP_MISSING_DEV)
1565 bg->alloc_offset = zone_info[0].alloc_offset;
1567 bg->alloc_offset = zone_info[i - 1].alloc_offset;
1598 if (zone_info[i].alloc_offset == WP_MISSING_DEV ||
1599 zone_info[i].alloc_offset == WP_CONVENTIONAL)
1602 stripe_nr = zone_info[i].alloc_offset >> BTRFS_STRIPE_LEN_SHIFT;
1603 stripe_offset = zone_info[i].alloc_offset & BTRFS_STRIPE_LEN_MASK;
1613 if (zone_info[i].alloc_offset & BTRFS_STRIPE_LEN_MASK)
1628 if (zone_info[i].alloc_offset == WP_MISSING_DEV)
1631 if (zone_info[i].alloc_offset == WP_CONVENTIONAL) {
1633 zone_info[i].alloc_offset = btrfs_stripe_nr_to_offset(stripe_nr);
1636 zone_info[i].alloc_offset += BTRFS_STRIPE_LEN;
1638 zone_info[i].alloc_offset += stripe_offset;
1643 if (unlikely(prev_offset < zone_info[i].alloc_offset)) {
1651 (zone_info[i].alloc_offset & BTRFS_STRIPE_LEN_MASK))) {
1658 prev_offset = zone_info[i].alloc_offset;
1660 if ((zone_info[i].alloc_offset & BTRFS_STRIPE_LEN_MASK) != 0)
1671 bg->alloc_offset += zone_info[i].alloc_offset;
1675 if (unlikely(zone_info[0].alloc_offset -
1676 zone_info[map->num_stripes - 1].alloc_offset > BTRFS_STRIPE_LEN)) {
1681 if (unlikely(has_conventional && bg->alloc_offset < last_alloc)) {
1683 bg->alloc_offset, last_alloc);
1719 u64 alloc = zone_info[i].alloc_offset;
1724 if (zone_info[idx].alloc_offset == WP_MISSING_DEV ||
1725 zone_info[idx].alloc_offset == WP_CONVENTIONAL)
1728 alloc = zone_info[idx].alloc_offset;
1729 } else if (unlikely(zone_info[idx].alloc_offset != alloc)) {
1807 if (zone_info[i].alloc_offset == WP_MISSING_DEV ||
1808 zone_info[i].alloc_offset == WP_CONVENTIONAL)
1809 zone_info[i].alloc_offset = raid0_allocs[idx];
1820 bg->alloc_offset += zone_info[i].alloc_offset;
1825 if (unlikely(zone_info[0].alloc_offset -
1826 zone_info[map->num_stripes - 1].alloc_offset > BTRFS_STRIPE_LEN)) {
1832 if (unlikely(has_conventional && bg->alloc_offset < last_alloc)) {
1834 bg->alloc_offset, last_alloc);
1891 bg->alloc_offset = bg->zone_capacity;
1944 if (zone_info[i].alloc_offset == WP_CONVENTIONAL)
1961 cache->alloc_offset = last_alloc;
1980 if (unlikely(cache->alloc_offset > cache->zone_capacity)) {
1983 cache->alloc_offset, cache->zone_capacity,
1989 if (!ret && num_conventional && last_alloc > cache->alloc_offset) {
1992 logical, last_alloc, cache->alloc_offset);
1997 cache->meta_write_pointer = cache->alloc_offset + cache->start;
2024 unusable = (cache->alloc_offset - cache->used) +
2026 free = cache->zone_capacity - cache->alloc_offset;
2216 if (tgt->meta_write_pointer < tgt->start + tgt->alloc_offset) {
2556 block_group->start + block_group->alloc_offset > block_group->meta_write_pointer) {
2610 block_group->alloc_offset = block_group->zone_capacity;
2812 if (bg->alloc_offset != 0)
2936 if (block_group->start + block_group->alloc_offset == logical + length) {
2963 if (block_group->reserved || block_group->alloc_offset == 0 ||
2970 avail = block_group->zone_capacity - block_group->alloc_offset;
3195 reclaimed = bg->alloc_offset;
3197 bg->alloc_offset = 0;
3199 * The zone was just reset to empty, so alloc_offset went back to
3263 u64 alloc_offset;
3271 alloc_offset = bg->alloc_offset;
3279 start, alloc_offset, used, reserved, zone_unusable, typestr);