Lines Matching refs:ate_size

143 	return (addr & ADDR_SECT_MASK) + fs->sector_size - fs->ate_size;  in zms_empty_ate_addr()
149 return (addr & ADDR_SECT_MASK) + fs->sector_size - 2 * fs->ate_size; in zms_close_ate_addr()
454 (entry->id == ZMS_HEAD_ID) && !((fs->sector_size - entry->offset) % fs->ate_size)); in zms_close_ate_valid()
563 *addr -= 2 * fs->ate_size; in zms_recover_last_ate()
584 ate_end_addr -= fs->ate_size; in zms_recover_last_ate()
597 *addr += fs->ate_size; in zms_compute_prev_addr()
598 if ((SECTOR_OFFSET(*addr)) != (fs->sector_size - 2 * fs->ate_size)) { in zms_compute_prev_addr()
663 close_ate.offset = (uint32_t)SECTOR_OFFSET(fs->ate_wra + fs->ate_size); in zms_sector_close()
734 LOG_DBG("Adding empty ate at %llx", (uint64_t)(addr + fs->sector_size - fs->ate_size)); in zms_add_empty_ate()
806 rc = zms_flash_ate_rd(fs, close_addr + fs->ate_size, empty_ate); in zms_get_sector_header()
918 gc_addr = sec_addr + fs->sector_size - fs->ate_size; in zms_gc()
935 stop_addr = gc_addr - 2 * fs->ate_size; in zms_gc()
1141 rc = zms_flash_ate_rd(fs, addr - fs->ate_size, &first_ate); in zms_init()
1223 fs->ate_wra -= fs->ate_size; in zms_init()
1253 addr = fs->ate_wra + fs->ate_size; in zms_init()
1254 while (SECTOR_OFFSET(addr) < (fs->sector_size - 2 * fs->ate_size)) { in zms_init()
1263 addr += fs->ate_size; in zms_init()
1290 fs->ate_wra += (fs->sector_size - 3 * fs->ate_size); in zms_init()
1315 if ((!rc) && (SECTOR_OFFSET(fs->ate_wra) == (fs->sector_size - 3 * fs->ate_size))) { in zms_init()
1337 fs->ate_size = zms_al_size(fs, sizeof(struct zms_ate)); in zms_mount()
1364 if (fs->sector_size < ZMS_MIN_ATE_NUM * fs->ate_size) { in zms_mount()
1366 ZMS_MIN_ATE_NUM * fs->ate_size); in zms_mount()
1412 if ((len > (fs->sector_size - 5 * fs->ate_size)) || (len > UINT16_MAX) || in zms_write()
1482 required_space = data_size + fs->ate_size; in zms_write()
1484 required_space = fs->ate_size; in zms_write()
1508 (SECTOR_OFFSET(fs->ate_wra - fs->ate_size) || !len)) { in zms_write()
1674 const uint32_t second_to_last_offset = (2 * fs->ate_size); in zms_calc_free_space()
1686 free_space = (fs->sector_count - 1) * (fs->sector_size - 4 * fs->ate_size); in zms_calc_free_space()
1728 free_space -= fs->ate_size; in zms_calc_free_space()
1753 free_space -= fs->ate_size; in zms_calc_free_space()
1762 free_space -= fs->ate_size; in zms_calc_free_space()
1779 return fs->ate_wra - fs->data_wra - fs->ate_size; in zms_active_sector_free_space()