fsck.f2fs: open ro disk if we want to check fs only
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 16 Apr 2019 18:46:31 +0000 (11:46 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sun, 28 Apr 2019 13:25:58 +0000 (06:25 -0700)
commitb9aca4663929e445f82cfea22d991b925091ad0a
tree920d21936c07fbf33d92f92682472f69dc42e348
parent264d7da4d68bc6a399a24e690b0f118e59a63aec
fsck.f2fs: open ro disk if we want to check fs only

This patch fixes the "open failure" issue on ro disk, reported by Hagbard.

"
 If I boot with kernel option "ro rootfstype=f2fs
 I get the following halfway trough boot:

  * Checking local filesystems  ...
 Info: Use default preen mode
 Info: Mounted device!
 Info: Check FS only due to RO
         Error: Failed to open the device!
  * Filesystems couldn't be fixed
"

Reported-by: Hagbard Celine <hagbardcelin@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
lib/libf2fs.c