diff options
author | Javier González <javier@cnexlabs.com> | 2017-10-13 14:46:14 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-10-13 16:34:57 +0200 |
commit | d340121eb770de3b02bfc73c5f2b00f5345090c2 (patch) | |
tree | 6ef59832c095deba5387f8c8121b7042ff21f69a /drivers/watchdog/f71808e_wdt.c | |
parent | lightnvm: pblk: refactor read lba sanity check (diff) | |
download | linux-d340121eb770de3b02bfc73c5f2b00f5345090c2.tar.xz linux-d340121eb770de3b02bfc73c5f2b00f5345090c2.zip |
lightnvm: pblk: simplify data validity check on GC
When a line is selected for recycling by the garbage collector (GC), the
line state changes and the invalid bitmap is frozen, preventing
invalidations from happening. Throughout the GC, the L2P map is checked
to verify that not data being recycled has been updated. The last check
is done before the new map is being stored on the L2P table. Though
this algorithm works, it requires a number of corner cases to be checked
each time the L2P table is being updated. This complicates readability
and is error prone in case that the recycling algorithm is modified.
Instead, this patch makes the invalid bitmap accessible even when the
line is being recycled. When recycled data is being remapped, it is
enough to check the invalid bitmap for the line before updating the L2P
table.
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/watchdog/f71808e_wdt.c')
0 files changed, 0 insertions, 0 deletions