summaryrefslogtreecommitdiff
path: root/include/linux/root_dev.h
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2016-06-21 00:31:50 +0200
committerBen Hutchings <ben@decadent.org.uk>2016-08-22 22:38:18 +0100
commite66d5f6e1b8e2c474a96c27b4b7744517d96151c (patch)
tree5d8559a1a4f96b450d7c4f5d2497f980f4c01d05 /include/linux/root_dev.h
parentda0b96a9a53d9631b4f824178e2df3c475c7d8e2 (diff)
ubi: Make recover_peb power cut aware
commit 972228d87445dc46c0a01f5f3de673ac017626f7 upstream. 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. 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> [bwh: Backported to 3.16: no need to unlock ubi->fm_eba_sem on error] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include/linux/root_dev.h')
0 files changed, 0 insertions, 0 deletions