ANDROID: AVB: Fix invalidate_vbmeta_submit().
authorDavid Zeuthen <zeuthen@google.com>
Mon, 22 May 2017 21:49:40 +0000 (17:49 -0400)
committerAmit Pundir <amit.pundir@linaro.org>
Thu, 25 May 2017 12:39:35 +0000 (18:09 +0530)
commitbabfac7507b39b2544785771bbdd202b602bd2a1
tree192cb29ae859a591e90e9bb31cc841bccf29410f
parenta9d65e521a0fed3668957719432d5c42383a3647
ANDROID: AVB: Fix invalidate_vbmeta_submit().

On some boards with newer kernels the invalidate_vbmeta_submit()
function failed likely because it's using a hard-coded size of
512. Use PAGE_SIZE and also use bio_add_page(). Also print out if the
I/O actually fails.

Additionally, print major:minor of the device we're acting on since
another subset of boards get this wrong by passing the wrong GUID to
libavb in the bootloader. Having this information printed out makes it
a lot easier to pinpoint such mistakes.

Test: Manually tested.
Bug: 38451312
Change-Id: Ib58548953a3375a3c79acf74aa745be9420b8216
Signed-off-by: David Zeuthen <zeuthen@google.com>
drivers/md/dm-verity-avb.c