git: sbin/newfs_hammer2: Fail if input size is < alignment size
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Fri Sep 20 03:12:11 PDT 2024
commit 8d1faa373c717ffa3d7dce83f48327742c966dad
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date: Fri Sep 20 01:12:05 2024 -0700
sbin/newfs_hammer2: Fail if input size is < alignment size
If aligned size becomes 0, it should fail with an error message
before hammer2_install_volume().
e.g. If a regular file av[0] is 4MiB, size becomes 0 after aligned.
Also add same sanity in hammer2_verify_volumes_common().
vol->size == 0 passes 8MiB or 1GiB alignment sanity.
Summary of changes:
sbin/hammer2/ondisk.c | 2 ++
sbin/newfs_hammer2/mkfs_hammer2.c | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8d1faa373c717ffa3d7dce83f48327742c966dad
--
DragonFly BSD source repository
More information about the Commits
mailing list