HomeFreeBSD

Correct fsck journal-recovery code to update a cylinder-group

Description

Correct fsck journal-recovery code to update a cylinder-group
check-hash after making changes to the cylinder group. The problem
was that the journal-recovery code was calling the libufs bwrite()
function instead of the cgput() function. The cgput() function updates
the cylinder-group check-hash before writing the cylinder group.

This change required the additions of the cgget() and cgput() functions
to the libufs API to avoid a gratuitous bcopy of every cylinder group
to be read or written. These new functions have been added to the
libufs manual pages. This was the first opportunity that I have had
to use and document the use of the EDOOFUS error code.

Reviewed by: kib
Reported by: emaste and others

Details

Provenance
mckusickAuthored on
Reviewer
kib
Parents
rS328091: Revert r327340, as the workaround for rep prefixes followed by .byte
Branches
Unknown
Tags
Unknown