mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Allow forced r/w mount of UFS/FFS filesystem with a bad check hash.
Normally a UFS/FFS filesystem with a bad check hash can only be mounted read only. With this commit the mount(8) -f (force) option can be used to force a read-write mount of a UFS/FFS filesystem with a bad check hash. Conveniently the filesystem will proceed to update its on-disk superblock with a corrected check hash. Sponsored by: Netflix
This commit is contained in:
parent
f10a8d0971
commit
9e9dcac95a
|
@ -964,7 +964,7 @@ ffs_mountfs(odevvp, mp, td)
|
|||
}
|
||||
/* fetch the superblock and summary information */
|
||||
loc = STDSB;
|
||||
if ((mp->mnt_flag & MNT_ROOTFS) != 0)
|
||||
if ((mp->mnt_flag & (MNT_ROOTFS | MNT_FORCE)) != 0)
|
||||
loc = STDSB_NOHASHFAIL;
|
||||
if ((error = ffs_sbget(devvp, &fs, loc, M_UFSMNT, ffs_use_bread)) != 0)
|
||||
goto out;
|
||||
|
|
Loading…
Reference in a new issue