git: sbin/hammer: Abort if a device is used for more than one volumes
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Sun Jun 14 10:11:10 PDT 2015
commit 06acdb69d31b793b62338342b7d448d520c0ed89
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date: Sun Jun 14 13:22:56 2015 +0900
sbin/hammer: Abort if a device is used for more than one volumes
- setup_volume() needs to check if the device has already been
registered, in addition to checking the volume id. If it's been
registered already, abort the process before writes to volumes
start. Otherwise using a single device for more than one volumes
hits assertion at some point on blockmap lookup of layer1/2
bigblocks with possible core dump. It should abort before any
ondisk change (when the function is used by newfs_hammer) occurs.
# /sbin/newfs_hammer -L TEST /dev/da3 /dev/da3 /dev/da3
Volume 0 DEVICE /dev/da3 size 465.76GB
newfs_hammer: setup_volume: /dev/da3: Specified more than once
Summary of changes:
sbin/hammer/ondisk.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/06acdb69d31b793b62338342b7d448d520c0ed89
--
DragonFly BSD source repository
More information about the Commits
mailing list