]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Create a new function ffs_getcg() to read in and verify a cylinder
authorKirk McKusick <mckusick@FreeBSD.org>
Wed, 28 Jun 2017 17:32:09 +0000 (17:32 +0000)
committerKirk McKusick <mckusick@FreeBSD.org>
Wed, 28 Jun 2017 17:32:09 +0000 (17:32 +0000)
commit9c4f551e98baec5d8adf2d078832f9185efdd52e
tree1a5dc6ac5690e382b211dcda708ce7104289cf1c
parent1db5f1724bdb4ed297b6598c961f1ed3adad3960
Create a new function ffs_getcg() to read in and verify a cylinder
group. Change all code points that open-coded this functionality
to use the new function. This commit is a refactoring with no
change in functionality.

In the future this change allows more robust checking of cylinder
group reads along the lines discussed in the hardening UFS session
at BSDCan (retry I/O, add checksums, etc). For more detail see the
session notes at https://wiki.freebsd.org/DevSummit/201706/HardeningUFS

Reviewed by: kib
sys/ufs/ffs/ffs_alloc.c
sys/ufs/ffs/ffs_extern.h
sys/ufs/ffs/ffs_snapshot.c
sys/ufs/ffs/ffs_vfsops.c
sys/ufs/ufs/ufs_gjournal.c