]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Correct fsck journal-recovery code to update a cylinder-group
authormckusick <mckusick@FreeBSD.org>
Wed, 17 Jan 2018 17:58:24 +0000 (17:58 +0000)
committermckusick <mckusick@FreeBSD.org>
Wed, 17 Jan 2018 17:58:24 +0000 (17:58 +0000)
commit39d99c11863da8a9040d69b05d58b65e311df462
tree6603c949e870e1510902951cb2391e730e174006
parentbbd1562a499208be7ae8cb769228ae650b08f0ce
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
lib/libufs/Makefile
lib/libufs/cgread.3
lib/libufs/cgroup.c
lib/libufs/libufs.3
lib/libufs/libufs.h
sbin/fsck_ffs/gjournal.c
sbin/fsck_ffs/suj.c