2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00
linux-next/drivers/lightnvm
Hans Holmberg d0ab0b1ab9 lightnvm: pblk: check data lines version on recovery
As a preparation for future bumps of data line persistent storage
versions, we need to start checking the emeta line version during
recovery. Also slit up the current emeta/smeta version into two
bytes (major,minor).

Recovering lines with the same major number as the current pblk data
line version must succeed. This means that any changes in the
persistent format must be:

 (1) Backward compatible: if we switch back to and older
     kernel, recovery of lines stored with major == current_major
     and minor > current_minor must succeed.

 (2) Forward compatible: switching to a newer kernel,
     recovery of lines stored with major=current_major and
     minor < minor must handle the data format differences
     gracefully(i.e. initialize new data structures to default values).

If we detect lines that have a different major number than
the current we must abort recovery. The user must manually
migrate the data in this case.

Previously the version stored in the emeta header was copied
from smeta, which has version 1, so we need to set the minor
version to 1.

Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-03-29 17:29:09 -06:00
..
core.c block: Add 'lock' as third argument to blk_alloc_queue_node() 2018-02-28 12:23:35 -07:00
Kconfig lightnvm: remove rrpc 2018-01-05 08:50:12 -07:00
Makefile lightnvm: remove rrpc 2018-01-05 08:50:12 -07:00
pblk-cache.c lightnvm: pblk: add iostat support 2018-01-05 08:50:12 -07:00
pblk-core.c lightnvm: pblk: check data lines version on recovery 2018-03-29 17:29:09 -06:00
pblk-gc.c lightnvm/pblk-gc: Delete an error message for a failed memory allocation in pblk_gc_line_prepare_ws() 2018-03-29 17:29:09 -06:00
pblk-init.c block: Use blk_queue_flag_*() in drivers instead of queue_flag_*() 2018-03-08 14:13:48 -07:00
pblk-map.c lightnvm: use internal pblk methods 2018-01-05 08:50:12 -07:00
pblk-rb.c lightnvm: pblk: prevent premature sync point resets 2018-01-05 08:50:12 -07:00
pblk-read.c lightnvm: pblk: add iostat support 2018-01-05 08:50:12 -07:00
pblk-recovery.c lightnvm: pblk: check data lines version on recovery 2018-03-29 17:29:09 -06:00
pblk-rl.c lightnvm: pblk: use exact free block counter in RL 2018-01-05 08:50:12 -07:00
pblk-sysfs.c lightnvm: pblk: use exact free block counter in RL 2018-01-05 08:50:12 -07:00
pblk-write.c lightnvm: pblk: clear flush point on completed writes 2018-01-05 08:50:12 -07:00
pblk.h lightnvm: pblk: check data lines version on recovery 2018-03-29 17:29:09 -06:00