]> git.ozlabs.org Git - petitboot/commit - discover/device-handler.c
discover: Mount with norecovery, avoid rw mount of XFS filesystems
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Mon, 23 Mar 2015 05:54:45 +0000 (16:54 +1100)
committerSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Thu, 26 Mar 2015 05:26:02 +0000 (16:26 +1100)
commita2bf5c1d47998a13351ccb6c35e3cf8f6e79909b
treee764064bc1806a621361e14f37c646d67ccb34af
parent49d7e0f299f96125620003e4b2388e1327b15d3e
discover: Mount with norecovery, avoid rw mount of XFS filesystems

Journaled filesytems may still write to their disk even if the disk is
mounted read only. Petitboot should avoid modifying any disks
automatically, and in mixed-endian systems this can also cause journal
operations to fail. Use the 'norecovery' option on filesystems that
support it to skip the journal replay.

Additionally, mounting an XFS filesystem as read-write in such a case
will cause the call to mount to hang indefinitely. Avoid this generally
by explicitly unmounting and (re)mounting when mounting read-write.

Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
discover/device-handler.c