]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
makefs: Fix space accounting for the root DSL directory
authorMark Johnston <markj@FreeBSD.org>
Tue, 16 Aug 2022 14:15:53 +0000 (10:15 -0400)
committerMark Johnston <markj@FreeBSD.org>
Tue, 16 Aug 2022 15:02:51 +0000 (11:02 -0400)
commit4f816f5b11ca7a5db965455d11d1db19162cfca6
treede85b2c8e1b5f56266d5652961f6bdbc481a51fa
parent187084dddd3ebbd5853d6abd72aa1ab51b74d826
makefs: Fix space accounting for the root DSL directory

Space used by the MOS is summed after all on-disk data structures are
finalized, so the MOS DSL directory represents a special case when
counting bytes used for each directory.  The DSL layer failed to update
the MOS DSL directory's parent, the root directory, accordingly, so the
root directory reported less space used than was used in reality.  Be
careful to update the root directory after the MOS is finalized.

PR: 265849
Sponsored by: The FreeBSD Foundation
usr.sbin/makefs/zfs/dsl.c
usr.sbin/makefs/zfs/objset.c
usr.sbin/makefs/zfs/zfs.h