We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ab8c45 commit 9638585Copy full SHA for 9638585
hw/block/femu/bbssd/ftl.c
@@ -557,9 +557,11 @@ static void mark_page_invalid(struct ssd *ssd, struct ppa *ppa)
557
ftl_assert(line->vpc > 0 && line->vpc <= spp->pgs_per_line);
558
/* Adjust the position of the victime line in the pq under over-writes */
559
if (line->pos) {
560
+ /* Note that line->vpc will be updated by this call */
561
pqueue_change_priority(lm->victim_line_pq, line->vpc - 1, line);
562
+ } else {
563
+ line->vpc--;
564
}
- line->vpc--;
565
566
if (was_full_line) {
567
/* move line: "full" -> "victim" */
0 commit comments