git: sbin/hammer: Avoid volume# inconsistency in blkdevs arg

Tomohiro Kusumi tkusumi at
Fri Sep 4 10:57:29 PDT 2015

commit 91ad3f6fe14cda22f1976e3822521b52ce03c669
Author: Tomohiro Kusumi <kusumi.tomohiro at>
Date:   Fri Aug 28 00:16:02 2015 +0900

    sbin/hammer: Avoid volume# inconsistency in blkdevs arg
    hammer commands that take blkdevs format arg (e.g. blockmap,
    checkmap, show, etc) should check if # of volumes in blkdevs
    format arg != vol_count in volume header, and fail if they
    don't match.
    Without checking this, these commands can proceed with invalid
    number of volumes and results in either failure or wrong result.
    It should be checked here just like hammer itself now checks
    inconsistency on mount since c302e844.
    Note that fsid check is done by setup_volume(), so no need
    to do it here.

Summary of changes:
 sbin/hammer/hammer.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

DragonFly BSD source repository

More information about the Commits mailing list