summaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorRichard Weinberger2016-06-21 00:31:50 +0200
committerRichard Weinberger2016-06-23 00:29:32 +0200
commit972228d87445dc46c0a01f5f3de673ac017626f7 (patch)
tree41cf6d89bcc2899d00d52b46d4333179f4903e50 /mm/migrate.c
parentgpio: make library immune to error pointers (diff)
downloadkernel-qcow2-linux-972228d87445dc46c0a01f5f3de673ac017626f7.tar.gz
kernel-qcow2-linux-972228d87445dc46c0a01f5f3de673ac017626f7.tar.xz
kernel-qcow2-linux-972228d87445dc46c0a01f5f3de673ac017626f7.zip
ubi: Make recover_peb power cut aware
recover_peb() was never power cut aware, if a power cut happened right after writing the VID header upon next attach UBI would blindly use the new partial written PEB and all data from the old PEB is lost. In order to make recover_peb() power cut aware, write the new VID with a proper crc and copy_flag set such that the UBI attach process will detect whether the new PEB is completely written or not. We cannot directly use ubi_eba_atomic_leb_change() since we'd have to unlock the LEB which is facing a write error. Cc: stable@vger.kernel.org Reported-by: Jörg Pfähler <pfaehler@isse.de> Reviewed-by: Jörg Pfähler <pfaehler@isse.de> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'mm/migrate.c')
0 files changed, 0 insertions, 0 deletions