git: sbin/newfs_hammer: Don't assume blkdev is /dev/da...
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Thu Jul 14 10:45:18 PDT 2016
commit 2b708458b62c87ab5fd69155351c949ed1d58b84
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date: Fri Jul 15 00:17:41 2016 +0900
sbin/newfs_hammer: Don't assume blkdev is /dev/da...
newfs_hammer has "/dev/da..." hardcoded in its TRIM support,
as TRIM sysctls exist only for physical disks.
newfs_hammer should detect non physical block devices such as
device mapper or loopback devices, before it calls sysctl(3),
so as not to print an error message like below.
# newfs_hammer -E -L TEST /dev/mapper/linear1
Volume 0 DEVICE /dev/mapper/linear1 size 465.66TB
DEVICE /dev/mapper/linear1 (kern.cam.da.pper/linear1.trim_enabled) does not support the TRIM command
^^^^^^^^^^^^
usage: newfs_hammer -L label [-Ef] [-b bootsize] [-m savesize] [-u undosize]
[-V version] special ...
Summary of changes:
sbin/newfs_hammer/newfs_hammer.c | 7 +++++++
1 file changed, 7 insertions(+)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2b708458b62c87ab5fd69155351c949ed1d58b84
--
DragonFly BSD source repository
More information about the Commits
mailing list