rqd.ppa_list[i] = addr_to_gen_ppa(pblk, paddr, line->id);
if (dir == WRITE) {
- u64 addr_empty = cpu_to_le64(ADDR_EMPTY);
+ __le64 addr_empty = cpu_to_le64(ADDR_EMPTY);
meta_list[i].lba = lba_list[paddr] = addr_empty;
}
struct list_head *group_list)
{
struct pblk_line *line, *victim;
+ int line_vsc, victim_vsc;
victim = list_first_entry(group_list, struct pblk_line, list);
list_for_each_entry(line, group_list, list) {
- if (*line->vsc < *victim->vsc)
+ line_vsc = le32_to_cpu(*line->vsc);
+ victim_vsc = le32_to_cpu(*victim->vsc);
+ if (line_vsc < victim_vsc)
victim = line;
}
lba_list[paddr] = cpu_to_le64(w_ctx->lba);
line->nr_valid_lbas++;
} else {
- u64 addr_empty = cpu_to_le64(ADDR_EMPTY);
+ __le64 addr_empty = cpu_to_le64(ADDR_EMPTY);
lba_list[paddr] = meta_list[i].lba = addr_empty;
__pblk_map_invalidate(pblk, line, paddr);
for (j = 0; j < pblk->min_write_pgs; j++, i++, w_ptr++) {
struct ppa_addr dev_ppa;
- u64 addr_empty = cpu_to_le64(ADDR_EMPTY);
+ __le64 addr_empty = cpu_to_le64(ADDR_EMPTY);
dev_ppa = addr_to_gen_ppa(pblk, w_ptr, line->id);