Skip to content

Commit

Permalink
Acknowledge the 'nofail' fs_mgr flag and skip the expected failure.
Browse files Browse the repository at this point in the history
fs_mgr supports 'nofail' flag, which is used if we do not want to
error-out incase the mounting/setup fails for a partition tagged with
nofail flag in fstab.

Recently added code in vold misses this handling, i.e. it aborts even
for a nofail partition upon encountering an expected failure.

Test: Add a non-existing logical partition fstab entry with 'nofail'
      flag. Init's first stage mount acks this and doesn't crash.
      Vold aborts (as it doesn't handle it), and device doesn't boot.
      With this change, device boots up.

Change-Id: I2b1904a9c648c31bcc05b2e7e77480db236ff66e
  • Loading branch information
P.Adarsh Reddy committed May 6, 2020
1 parent 9e2053e commit 167c2a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ static int process_config(VolumeManager* vm, VoldConfigs* configs) {
}

/* Make sure logical partitions have an updated blk_device. */
if (entry.fs_mgr_flags.logical && !fs_mgr_update_logical_partition(&entry)) {
if (entry.fs_mgr_flags.logical && !fs_mgr_update_logical_partition(&entry) &&
!entry.fs_mgr_flags.no_fail) {
PLOG(FATAL) << "could not find logical partition " << entry.blk_device;
}

Expand Down

0 comments on commit 167c2a6

Please sign in to comment.