cryptohome: Skip known open failures.

We know that one pattern of unrecoverable ecryptfs corruption used to
happen.  Skip the files since they are no longer recoverable and not
readable.  The paths of skipped files are stored in the user's home
directory so that we can attempt to help the user restore their system
at a later time.

BUG=chromium:719761
BUG=b:37729571
TEST=cros_workon_make --test  chromeos-base/cryptohome
TEST=manually
cryptohome --action=mount_ex --user=<mail> --key_label=foo --create --ecryptfs
cryptohome --action=status
dd if=/dev/zero of=/home/user/<shou>/unko bs=1M count=100
dd if=/dev/zero of=/home/.shadow/<shou>/vault/user/ECRYPTFS_FNEK_ENCRYPTED.xxxx \
  bs=1M count=3
head /home/.shadow/<shou>/mount/user/unko  # observe kernel error and EIO
cryptohome --action=unmount --user=<mail>
logged in, migrate.
Observe "Found file that cannot be opened with EIO,
skipping /home/.shadow/<shou>/temporary_mount/user/unko"
log message in /var/log/messages and a successful migration.

Change-Id: I4791eacf8982c488bc33c11c66fd476924479fe3
Reviewed-on: https://chromium-review.googlesource.com/499948
Commit-Ready: Junichi Uekawa <uekawa@chromium.org>
Tested-by: Dan Spaid <dspaid@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
(cherry picked from commit 7c0bfa8548cad21fd1b2bba67329ba6941ebac35)
Reviewed-on: https://chromium-review.googlesource.com/575251
Reviewed-by: Dan Spaid <dspaid@chromium.org>
Commit-Queue: Dan Spaid <dspaid@chromium.org>
3 files changed