]> git.ozlabs.org Git - petitboot/commit - discover/device-handler.c
discover/device-handler: Attempt to retry failed mounts
authorSam Mendoza-Jonas <sam@mendozajonas.com>
Tue, 15 Mar 2016 05:30:17 +0000 (16:30 +1100)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 22 Mar 2016 22:06:09 +0000 (09:06 +1100)
commita2441c75956929293359888a4169114267a5fdbf
treeeffaff0e3ef2abd25a912319d426b954a9ee713a
parent55ffff9a5e0bd87fd4e8720a35b65befde9fe965
discover/device-handler: Attempt to retry failed mounts

Commit 6c1a9dd, "discover: Allow fs recovery if snapshot available",
forced the use of 'norecovery' for all XFS mounts to avoid failing when
a cross-endian journal existed. This is a bit heavy handed, healthy XFS
file systems can still be safely mounted, as can dirty filesystems in
the same endian as Petitboot.

This adds try_mount() which opportunistically mounts devices and falls
back to using 'norecovery' where possible on failure. This enables XFS
filesystems to be mounted read-write when possible. try_mount() contains
the logic previously described by fs_parameters(), and should be used in
place of any existing calls to mount().

Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
discover/device-handler.c