svn commit: r216688 - in projects/graid/8: . contrib/bsnmp/snmpd
contrib/top contrib/xz etc/periodic/daily gnu/usr.bin
lib/libusb release/picobsd/floppy.tree/sbin
sbin/geom/class/raid sbin/geom/cla...
Alexander Motin
mav at FreeBSD.org
Fri Dec 24 11:07:32 UTC 2010
Author: mav
Date: Fri Dec 24 11:07:31 2010
New Revision: 216688
URL: http://svn.freebsd.org/changeset/base/216688
Log:
MFH r216649, r216666, r216670, r216682
Modified:
projects/graid/8/sbin/geom/class/raid/geom_raid.c
projects/graid/8/sys/geom/raid/g_raid.c
projects/graid/8/sys/geom/raid/g_raid.h
projects/graid/8/sys/geom/raid/g_raid_ctl.c
projects/graid/8/sys/geom/raid/g_raid_md_if.m
projects/graid/8/sys/geom/raid/md_intel.c
Directory Properties:
projects/graid/8/ (props changed)
projects/graid/8/Makefile (props changed)
projects/graid/8/Makefile.inc1 (props changed)
projects/graid/8/ObsoleteFiles.inc (props changed)
projects/graid/8/UPDATING (props changed)
projects/graid/8/bin/ (props changed)
projects/graid/8/bin/chio/ (props changed)
projects/graid/8/bin/chmod/ (props changed)
projects/graid/8/bin/cp/ (props changed)
projects/graid/8/bin/csh/ (props changed)
projects/graid/8/bin/date/ (props changed)
projects/graid/8/bin/echo/ (props changed)
projects/graid/8/bin/expr/ (props changed)
projects/graid/8/bin/getfacl/ (props changed)
projects/graid/8/bin/kill/ (props changed)
projects/graid/8/bin/ln/ (props changed)
projects/graid/8/bin/ls/ (props changed)
projects/graid/8/bin/mv/ (props changed)
projects/graid/8/bin/pax/ (props changed)
projects/graid/8/bin/pkill/ (props changed)
projects/graid/8/bin/ps/ (props changed)
projects/graid/8/bin/pwait/ (props changed)
projects/graid/8/bin/setfacl/ (props changed)
projects/graid/8/bin/sh/ (props changed)
projects/graid/8/bin/sleep/ (props changed)
projects/graid/8/bin/test/ (props changed)
projects/graid/8/cddl/compat/opensolaris/ (props changed)
projects/graid/8/cddl/contrib/opensolaris/ (props changed)
projects/graid/8/cddl/lib/ (props changed)
projects/graid/8/cddl/lib/libnvpair/ (props changed)
projects/graid/8/cddl/lib/libzpool/ (props changed)
projects/graid/8/cddl/usr.bin/ (props changed)
projects/graid/8/cddl/usr.sbin/ (props changed)
projects/graid/8/contrib/ (props changed)
projects/graid/8/contrib/bind9/ (props changed)
projects/graid/8/contrib/binutils/ (props changed)
projects/graid/8/contrib/bsnmp/ (props changed)
projects/graid/8/contrib/bsnmp/snmpd/bsnmpd.1 (props changed)
projects/graid/8/contrib/bzip2/ (props changed)
projects/graid/8/contrib/com_err/ (props changed)
projects/graid/8/contrib/csup/ (props changed)
projects/graid/8/contrib/ee/ (props changed)
projects/graid/8/contrib/expat/ (props changed)
projects/graid/8/contrib/file/ (props changed)
projects/graid/8/contrib/gcc/ (props changed)
projects/graid/8/contrib/gdb/ (props changed)
projects/graid/8/contrib/gdtoa/ (props changed)
projects/graid/8/contrib/groff/ (props changed)
projects/graid/8/contrib/ipfilter/ (props changed)
projects/graid/8/contrib/less/ (props changed)
projects/graid/8/contrib/libpcap/ (props changed)
projects/graid/8/contrib/ncurses/ (props changed)
projects/graid/8/contrib/netcat/ (props changed)
projects/graid/8/contrib/ntp/ (props changed)
projects/graid/8/contrib/nvi/ (props changed)
projects/graid/8/contrib/one-true-awk/ (props changed)
projects/graid/8/contrib/openbsm/ (props changed)
projects/graid/8/contrib/openpam/ (props changed)
projects/graid/8/contrib/pf/ (props changed)
projects/graid/8/contrib/sendmail/ (props changed)
projects/graid/8/contrib/tcp_wrappers/ (props changed)
projects/graid/8/contrib/tcpdump/ (props changed)
projects/graid/8/contrib/tcsh/ (props changed)
projects/graid/8/contrib/telnet/ (props changed)
projects/graid/8/contrib/top/ (props changed)
projects/graid/8/contrib/top/install-sh (props changed)
projects/graid/8/contrib/traceroute/ (props changed)
projects/graid/8/contrib/wpa/ (props changed)
projects/graid/8/contrib/xz/ (props changed)
projects/graid/8/contrib/xz/AUTHORS (props changed)
projects/graid/8/contrib/xz/COPYING (props changed)
projects/graid/8/contrib/xz/ChangeLog (props changed)
projects/graid/8/contrib/xz/FREEBSD-Xlist (props changed)
projects/graid/8/contrib/xz/FREEBSD-upgrade (props changed)
projects/graid/8/contrib/xz/README (props changed)
projects/graid/8/contrib/xz/THANKS (props changed)
projects/graid/8/contrib/xz/TODO (props changed)
projects/graid/8/contrib/xz/po/ (props changed)
projects/graid/8/contrib/xz/src/ (props changed)
projects/graid/8/crypto/heimdal/ (props changed)
projects/graid/8/crypto/openssh/ (props changed)
projects/graid/8/crypto/openssl/ (props changed)
projects/graid/8/etc/ (props changed)
projects/graid/8/etc/periodic/daily/ (props changed)
projects/graid/8/etc/periodic/daily/800.scrub-zfs (props changed)
projects/graid/8/etc/periodic/security/ (props changed)
projects/graid/8/games/factor/ (props changed)
projects/graid/8/games/fortune/ (props changed)
projects/graid/8/games/grdc/ (props changed)
projects/graid/8/games/pom/ (props changed)
projects/graid/8/gnu/lib/csu/ (props changed)
projects/graid/8/gnu/lib/libgcc/ (props changed)
projects/graid/8/gnu/lib/libstdc++/ (props changed)
projects/graid/8/gnu/usr.bin/ (props changed)
projects/graid/8/gnu/usr.bin/Makefile (props changed)
projects/graid/8/gnu/usr.bin/dialog/ (props changed)
projects/graid/8/gnu/usr.bin/gdb/ (props changed)
projects/graid/8/gnu/usr.bin/gdb/kgdb/ (props changed)
projects/graid/8/gnu/usr.bin/groff/ (props changed)
projects/graid/8/gnu/usr.bin/patch/ (props changed)
projects/graid/8/include/ (props changed)
projects/graid/8/kerberos5/lib/libgssapi_krb5/ (props changed)
projects/graid/8/kerberos5/lib/libgssapi_spnego/ (props changed)
projects/graid/8/kerberos5/usr.bin/kdestroy/ (props changed)
projects/graid/8/kerberos5/usr.bin/kpasswd/ (props changed)
projects/graid/8/lib/ (props changed)
projects/graid/8/lib/bind/ (props changed)
projects/graid/8/lib/csu/ (props changed)
projects/graid/8/lib/libarchive/ (props changed)
projects/graid/8/lib/libbluetooth/ (props changed)
projects/graid/8/lib/libc/ (props changed)
projects/graid/8/lib/libc/locale/ (props changed)
projects/graid/8/lib/libc/stdtime/ (props changed)
projects/graid/8/lib/libc/sys/ (props changed)
projects/graid/8/lib/libc_r/ (props changed)
projects/graid/8/lib/libcam/ (props changed)
projects/graid/8/lib/libcompat/ (props changed)
projects/graid/8/lib/libdevinfo/ (props changed)
projects/graid/8/lib/libdisk/ (props changed)
projects/graid/8/lib/libedit/ (props changed)
projects/graid/8/lib/libelf/ (props changed)
projects/graid/8/lib/libexpat/ (props changed)
projects/graid/8/lib/libfetch/ (props changed)
projects/graid/8/lib/libgeom/ (props changed)
projects/graid/8/lib/libgpib/ (props changed)
projects/graid/8/lib/libgssapi/ (props changed)
projects/graid/8/lib/libjail/ (props changed)
projects/graid/8/lib/libkse/ (props changed)
projects/graid/8/lib/libkvm/ (props changed)
projects/graid/8/lib/liblzma/ (props changed)
projects/graid/8/lib/libmagic/ (props changed)
projects/graid/8/lib/libmemstat/ (props changed)
projects/graid/8/lib/libpam/ (props changed)
projects/graid/8/lib/libpmc/ (props changed)
projects/graid/8/lib/libproc/ (props changed)
projects/graid/8/lib/libradius/ (props changed)
projects/graid/8/lib/librpcsec_gss/ (props changed)
projects/graid/8/lib/librtld_db/ (props changed)
projects/graid/8/lib/libsm/ (props changed)
projects/graid/8/lib/libstand/ (props changed)
projects/graid/8/lib/libtacplus/ (props changed)
projects/graid/8/lib/libthr/ (props changed)
projects/graid/8/lib/libthread_db/ (props changed)
projects/graid/8/lib/libufs/ (props changed)
projects/graid/8/lib/libugidfw/ (props changed)
projects/graid/8/lib/libusb/ (props changed)
projects/graid/8/lib/libusb/usb.h (props changed)
projects/graid/8/lib/libusbhid/ (props changed)
projects/graid/8/lib/libutil/ (props changed)
projects/graid/8/lib/libz/ (props changed)
projects/graid/8/lib/libz/contrib/ (props changed)
projects/graid/8/lib/msun/ (props changed)
projects/graid/8/libexec/ (props changed)
projects/graid/8/libexec/ftpd/ (props changed)
projects/graid/8/libexec/rtld-elf/ (props changed)
projects/graid/8/libexec/tftpd/ (props changed)
projects/graid/8/release/ (props changed)
projects/graid/8/release/doc/en_US.ISO8859-1/hardware/ (props changed)
projects/graid/8/release/picobsd/ (props changed)
projects/graid/8/release/picobsd/floppy.tree/sbin/ (props changed)
projects/graid/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed)
projects/graid/8/release/picobsd/qemu/ (props changed)
projects/graid/8/release/picobsd/tinyware/login/ (props changed)
projects/graid/8/release/powerpc/ (props changed)
projects/graid/8/sbin/ (props changed)
projects/graid/8/sbin/atacontrol/ (props changed)
projects/graid/8/sbin/bsdlabel/ (props changed)
projects/graid/8/sbin/camcontrol/ (props changed)
projects/graid/8/sbin/ddb/ (props changed)
projects/graid/8/sbin/devd/ (props changed)
projects/graid/8/sbin/devfs/ (props changed)
projects/graid/8/sbin/dhclient/ (props changed)
projects/graid/8/sbin/dump/ (props changed)
projects/graid/8/sbin/dumpfs/ (props changed)
projects/graid/8/sbin/fdisk/ (props changed)
projects/graid/8/sbin/fsck/ (props changed)
projects/graid/8/sbin/fsck_ffs/ (props changed)
projects/graid/8/sbin/fsck_msdosfs/ (props changed)
projects/graid/8/sbin/fsirand/ (props changed)
projects/graid/8/sbin/geom/ (props changed)
projects/graid/8/sbin/geom/class/multipath/ (props changed)
projects/graid/8/sbin/geom/class/part/ (props changed)
projects/graid/8/sbin/geom/class/sched/gsched.8 (props changed)
projects/graid/8/sbin/geom/class/stripe/ (props changed)
projects/graid/8/sbin/ggate/ (props changed)
projects/graid/8/sbin/growfs/ (props changed)
projects/graid/8/sbin/hastctl/ (props changed)
projects/graid/8/sbin/hastd/ (props changed)
projects/graid/8/sbin/ifconfig/ (props changed)
projects/graid/8/sbin/ipfw/ (props changed)
projects/graid/8/sbin/iscontrol/ (props changed)
projects/graid/8/sbin/kldload/ (props changed)
projects/graid/8/sbin/kldstat/ (props changed)
projects/graid/8/sbin/mdconfig/ (props changed)
projects/graid/8/sbin/mksnap_ffs/ (props changed)
projects/graid/8/sbin/mount/ (props changed)
projects/graid/8/sbin/mount_cd9660/ (props changed)
projects/graid/8/sbin/mount_msdosfs/ (props changed)
projects/graid/8/sbin/mount_nfs/ (props changed)
projects/graid/8/sbin/natd/ (props changed)
projects/graid/8/sbin/newfs/ (props changed)
projects/graid/8/sbin/newfs_msdos/ (props changed)
projects/graid/8/sbin/ping6/ (props changed)
projects/graid/8/sbin/reboot/ (props changed)
projects/graid/8/sbin/restore/ (props changed)
projects/graid/8/sbin/routed/ (props changed)
projects/graid/8/sbin/setkey/ (props changed)
projects/graid/8/sbin/spppcontrol/ (props changed)
projects/graid/8/sbin/sysctl/ (props changed)
projects/graid/8/sbin/tunefs/ (props changed)
projects/graid/8/sbin/umount/ (props changed)
projects/graid/8/secure/ (props changed)
projects/graid/8/secure/lib/libcrypto/ (props changed)
projects/graid/8/secure/lib/libssl/ (props changed)
projects/graid/8/secure/usr.bin/bdes/ (props changed)
projects/graid/8/secure/usr.bin/openssl/ (props changed)
projects/graid/8/share/dict/ (props changed)
projects/graid/8/share/doc/papers/jail/ (props changed)
projects/graid/8/share/doc/smm/01.setup/ (props changed)
projects/graid/8/share/examples/ (props changed)
projects/graid/8/share/examples/etc/ (props changed)
projects/graid/8/share/examples/kld/syscall/ (props changed)
projects/graid/8/share/man/ (props changed)
projects/graid/8/share/man/man1/ (props changed)
projects/graid/8/share/man/man3/ (props changed)
projects/graid/8/share/man/man4/ (props changed)
projects/graid/8/share/man/man5/ (props changed)
projects/graid/8/share/man/man7/ (props changed)
projects/graid/8/share/man/man8/ (props changed)
projects/graid/8/share/man/man9/ (props changed)
projects/graid/8/share/misc/ (props changed)
projects/graid/8/share/mk/ (props changed)
projects/graid/8/share/syscons/ (props changed)
projects/graid/8/share/termcap/ (props changed)
projects/graid/8/share/timedef/ (props changed)
projects/graid/8/share/zoneinfo/ (props changed)
projects/graid/8/sys/ (props changed)
projects/graid/8/sys/amd64/include/xen/ (props changed)
projects/graid/8/sys/cddl/contrib/opensolaris/ (props changed)
projects/graid/8/sys/contrib/dev/acpica/ (props changed)
projects/graid/8/sys/contrib/pf/ (props changed)
projects/graid/8/tools/ (props changed)
projects/graid/8/tools/build/mk/ (props changed)
projects/graid/8/tools/build/options/ (props changed)
projects/graid/8/tools/debugscripts/ (props changed)
projects/graid/8/tools/kerneldoc/subsys/ (props changed)
projects/graid/8/tools/regression/acltools/ (props changed)
projects/graid/8/tools/regression/aio/aiotest/ (props changed)
projects/graid/8/tools/regression/bin/ (props changed)
projects/graid/8/tools/regression/bin/sh/ (props changed)
projects/graid/8/tools/regression/fifo/ (props changed)
projects/graid/8/tools/regression/geom/ (props changed)
projects/graid/8/tools/regression/lib/libc/ (props changed)
projects/graid/8/tools/regression/lib/msun/test-conj.t (props changed)
projects/graid/8/tools/regression/mqueue/mqtest1/ (props changed)
projects/graid/8/tools/regression/mqueue/mqtest2/ (props changed)
projects/graid/8/tools/regression/mqueue/mqtest3/ (props changed)
projects/graid/8/tools/regression/mqueue/mqtest4/ (props changed)
projects/graid/8/tools/regression/mqueue/mqtest5/ (props changed)
projects/graid/8/tools/regression/poll/ (props changed)
projects/graid/8/tools/regression/posixsem/ (props changed)
projects/graid/8/tools/regression/priv/ (props changed)
projects/graid/8/tools/regression/sockets/unix_gc/ (props changed)
projects/graid/8/tools/regression/usr.bin/ (props changed)
projects/graid/8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed)
projects/graid/8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed)
projects/graid/8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed)
projects/graid/8/tools/regression/usr.bin/sed/ (props changed)
projects/graid/8/tools/regression/usr.bin/tr/ (props changed)
projects/graid/8/tools/test/ (props changed)
projects/graid/8/tools/tools/ (props changed)
projects/graid/8/tools/tools/ath/ (props changed)
projects/graid/8/tools/tools/ath/common/dumpregs.h (props changed)
projects/graid/8/tools/tools/ath/common/dumpregs_5210.c (props changed)
projects/graid/8/tools/tools/ath/common/dumpregs_5211.c (props changed)
projects/graid/8/tools/tools/ath/common/dumpregs_5212.c (props changed)
projects/graid/8/tools/tools/ath/common/dumpregs_5416.c (props changed)
projects/graid/8/tools/tools/nanobsd/ (props changed)
projects/graid/8/tools/tools/netrate/ (props changed)
projects/graid/8/tools/tools/netrate/tcpp/ (props changed)
projects/graid/8/tools/tools/termcap/termcap.pl (props changed)
projects/graid/8/tools/tools/umastat/ (props changed)
projects/graid/8/tools/tools/vimage/ (props changed)
projects/graid/8/usr.bin/ (props changed)
projects/graid/8/usr.bin/apply/ (props changed)
projects/graid/8/usr.bin/ar/ (props changed)
projects/graid/8/usr.bin/awk/ (props changed)
projects/graid/8/usr.bin/biff/ (props changed)
projects/graid/8/usr.bin/c89/ (props changed)
projects/graid/8/usr.bin/c99/ (props changed)
projects/graid/8/usr.bin/calendar/ (props changed)
projects/graid/8/usr.bin/catman/ (props changed)
projects/graid/8/usr.bin/column/ (props changed)
projects/graid/8/usr.bin/comm/ (props changed)
projects/graid/8/usr.bin/cpio/ (props changed)
projects/graid/8/usr.bin/csup/ (props changed)
projects/graid/8/usr.bin/du/ (props changed)
projects/graid/8/usr.bin/ee/ (props changed)
projects/graid/8/usr.bin/enigma/ (props changed)
projects/graid/8/usr.bin/fetch/ (props changed)
projects/graid/8/usr.bin/find/ (props changed)
projects/graid/8/usr.bin/finger/ (props changed)
projects/graid/8/usr.bin/fold/ (props changed)
projects/graid/8/usr.bin/fstat/ (props changed)
projects/graid/8/usr.bin/gcore/ (props changed)
projects/graid/8/usr.bin/getopt/ (props changed)
projects/graid/8/usr.bin/gzip/ (props changed)
projects/graid/8/usr.bin/hexdump/ (props changed)
projects/graid/8/usr.bin/indent/ (props changed)
projects/graid/8/usr.bin/jot/ (props changed)
projects/graid/8/usr.bin/kdump/ (props changed)
projects/graid/8/usr.bin/killall/ (props changed)
projects/graid/8/usr.bin/ktrace/ (props changed)
projects/graid/8/usr.bin/ldd/ (props changed)
projects/graid/8/usr.bin/lex/ (props changed)
projects/graid/8/usr.bin/locale/ (props changed)
projects/graid/8/usr.bin/locate/ (props changed)
projects/graid/8/usr.bin/lockf/ (props changed)
projects/graid/8/usr.bin/look/ (props changed)
projects/graid/8/usr.bin/mail/ (props changed)
projects/graid/8/usr.bin/make/ (props changed)
projects/graid/8/usr.bin/makewhatis/ (props changed)
projects/graid/8/usr.bin/minigzip/ (props changed)
projects/graid/8/usr.bin/ncal/ (props changed)
projects/graid/8/usr.bin/netstat/ (props changed)
projects/graid/8/usr.bin/pathchk/ (props changed)
projects/graid/8/usr.bin/perror/ (props changed)
projects/graid/8/usr.bin/procstat/ (props changed)
projects/graid/8/usr.bin/rpcgen/ (props changed)
projects/graid/8/usr.bin/ruptime/ (props changed)
projects/graid/8/usr.bin/script/ (props changed)
projects/graid/8/usr.bin/sed/ (props changed)
projects/graid/8/usr.bin/sockstat/ (props changed)
projects/graid/8/usr.bin/split/ (props changed)
projects/graid/8/usr.bin/stat/ (props changed)
projects/graid/8/usr.bin/systat/ (props changed)
projects/graid/8/usr.bin/tar/ (props changed)
projects/graid/8/usr.bin/tftp/ (props changed)
projects/graid/8/usr.bin/top/ (props changed)
projects/graid/8/usr.bin/touch/ (props changed)
projects/graid/8/usr.bin/tr/ (props changed)
projects/graid/8/usr.bin/truss/ (props changed)
projects/graid/8/usr.bin/uname/ (props changed)
projects/graid/8/usr.bin/unifdef/ (props changed)
projects/graid/8/usr.bin/uniq/ (props changed)
projects/graid/8/usr.bin/unzip/ (props changed)
projects/graid/8/usr.bin/uudecode/ (props changed)
projects/graid/8/usr.bin/vmstat/ (props changed)
projects/graid/8/usr.bin/w/ (props changed)
projects/graid/8/usr.bin/whois/ (props changed)
projects/graid/8/usr.bin/xinstall/ (props changed)
projects/graid/8/usr.bin/xlint/ (props changed)
projects/graid/8/usr.bin/xz/ (props changed)
projects/graid/8/usr.bin/yacc/ (props changed)
projects/graid/8/usr.sbin/ (props changed)
projects/graid/8/usr.sbin/Makefile (props changed)
projects/graid/8/usr.sbin/acpi/ (props changed)
projects/graid/8/usr.sbin/arp/ (props changed)
projects/graid/8/usr.sbin/asf/ (props changed)
projects/graid/8/usr.sbin/bluetooth/ (props changed)
projects/graid/8/usr.sbin/bluetooth/bthidcontrol/ (props changed)
projects/graid/8/usr.sbin/bluetooth/bthidd/ (props changed)
projects/graid/8/usr.sbin/boot0cfg/ (props changed)
projects/graid/8/usr.sbin/bsnmpd/ (props changed)
projects/graid/8/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_processor_tbl.c (props changed)
projects/graid/8/usr.sbin/burncd/ (props changed)
projects/graid/8/usr.sbin/cdcontrol/ (props changed)
projects/graid/8/usr.sbin/chown/ (props changed)
projects/graid/8/usr.sbin/config/ (props changed)
projects/graid/8/usr.sbin/config/SMM.doc/ (props changed)
projects/graid/8/usr.sbin/cpucontrol/ (props changed)
projects/graid/8/usr.sbin/crashinfo/ (props changed)
projects/graid/8/usr.sbin/cron/ (props changed)
projects/graid/8/usr.sbin/crunch/examples/ (props changed)
projects/graid/8/usr.sbin/ctm/ (props changed)
projects/graid/8/usr.sbin/cxgbtool/ (props changed)
projects/graid/8/usr.sbin/devinfo/ (props changed)
projects/graid/8/usr.sbin/diskinfo/ (props changed)
projects/graid/8/usr.sbin/dumpcis/cardinfo.h (props changed)
projects/graid/8/usr.sbin/dumpcis/cis.h (props changed)
projects/graid/8/usr.sbin/faithd/ (props changed)
projects/graid/8/usr.sbin/fdcontrol/ (props changed)
projects/graid/8/usr.sbin/fdformat/ (props changed)
projects/graid/8/usr.sbin/fdread/ (props changed)
projects/graid/8/usr.sbin/fdwrite/ (props changed)
projects/graid/8/usr.sbin/fifolog/ (props changed)
projects/graid/8/usr.sbin/flowctl/ (props changed)
projects/graid/8/usr.sbin/freebsd-update/ (props changed)
projects/graid/8/usr.sbin/i2c/ (props changed)
projects/graid/8/usr.sbin/inetd/ (props changed)
projects/graid/8/usr.sbin/iostat/ (props changed)
projects/graid/8/usr.sbin/jail/ (props changed)
projects/graid/8/usr.sbin/jls/ (props changed)
projects/graid/8/usr.sbin/lpr/ (props changed)
projects/graid/8/usr.sbin/mailwrapper/ (props changed)
projects/graid/8/usr.sbin/makefs/ffs/ffs_bswap.c (props changed)
projects/graid/8/usr.sbin/makefs/ffs/ffs_subr.c (props changed)
projects/graid/8/usr.sbin/makefs/ffs/ufs_bswap.h (props changed)
projects/graid/8/usr.sbin/makefs/getid.c (props changed)
projects/graid/8/usr.sbin/mergemaster/ (props changed)
projects/graid/8/usr.sbin/mfiutil/ (props changed)
projects/graid/8/usr.sbin/mountd/ (props changed)
projects/graid/8/usr.sbin/moused/ (props changed)
projects/graid/8/usr.sbin/mptutil/ (props changed)
projects/graid/8/usr.sbin/mtest/ (props changed)
projects/graid/8/usr.sbin/mtree/ (props changed)
projects/graid/8/usr.sbin/named/ (props changed)
projects/graid/8/usr.sbin/ndp/ (props changed)
projects/graid/8/usr.sbin/newsyslog/ (props changed)
projects/graid/8/usr.sbin/nfsdumpstate/ (props changed)
projects/graid/8/usr.sbin/ntp/ (props changed)
projects/graid/8/usr.sbin/pciconf/ (props changed)
projects/graid/8/usr.sbin/periodic/ (props changed)
projects/graid/8/usr.sbin/pkg_install/ (props changed)
projects/graid/8/usr.sbin/pmcannotate/ (props changed)
projects/graid/8/usr.sbin/pmccontrol/ (props changed)
projects/graid/8/usr.sbin/pmcstat/ (props changed)
projects/graid/8/usr.sbin/powerd/ (props changed)
projects/graid/8/usr.sbin/ppp/ (props changed)
projects/graid/8/usr.sbin/pppctl/ (props changed)
projects/graid/8/usr.sbin/pstat/ (props changed)
projects/graid/8/usr.sbin/rpc.lockd/ (props changed)
projects/graid/8/usr.sbin/rpc.umntall/ (props changed)
projects/graid/8/usr.sbin/rtadvd/ (props changed)
projects/graid/8/usr.sbin/rtsold/ (props changed)
projects/graid/8/usr.sbin/sade/ (props changed)
projects/graid/8/usr.sbin/service/ (props changed)
projects/graid/8/usr.sbin/services_mkdb/ (props changed)
projects/graid/8/usr.sbin/setfmac/ (props changed)
projects/graid/8/usr.sbin/setpmac/ (props changed)
projects/graid/8/usr.sbin/smbmsg/ (props changed)
projects/graid/8/usr.sbin/sysinstall/ (props changed)
projects/graid/8/usr.sbin/syslogd/ (props changed)
projects/graid/8/usr.sbin/traceroute/ (props changed)
projects/graid/8/usr.sbin/traceroute6/ (props changed)
projects/graid/8/usr.sbin/uathload/ (props changed)
projects/graid/8/usr.sbin/ugidfw/ (props changed)
projects/graid/8/usr.sbin/uhsoctl/ (props changed)
projects/graid/8/usr.sbin/usbconfig/ (props changed)
projects/graid/8/usr.sbin/vidcontrol/ (props changed)
projects/graid/8/usr.sbin/watchdogd/ (props changed)
projects/graid/8/usr.sbin/wpa/ (props changed)
projects/graid/8/usr.sbin/ypserv/ (props changed)
projects/graid/8/usr.sbin/zic/ (props changed)
Modified: projects/graid/8/sbin/geom/class/raid/geom_raid.c
==============================================================================
--- projects/graid/8/sbin/geom/class/raid/geom_raid.c Fri Dec 24 07:41:39 2010 (r216687)
+++ projects/graid/8/sbin/geom/class/raid/geom_raid.c Fri Dec 24 11:07:31 2010 (r216688)
@@ -1,5 +1,4 @@
/*-
- * Copyright (c) 2004-2009 Pawel Jakub Dawidek <pjd at FreeBSD.org>
* Copyright (c) 2010 Alexander Motin <mav at FreeBSD.org>
* All rights reserved.
*
@@ -49,81 +48,19 @@ uint32_t version = G_RAID_VERSION;
#define GRAID_SLICE "4096"
#define GRAID_PRIORITY "0"
-#if 0
-static void raid_main(struct gctl_req *req, unsigned flags);
-static void raid_activate(struct gctl_req *req);
-static void raid_clear(struct gctl_req *req);
-static void raid_dump(struct gctl_req *req);
-static void raid_label(struct gctl_req *req);
-#endif
+//static void raid_main(struct gctl_req *req, unsigned flags);
struct g_command class_commands[] = {
-/*
- { "activate", G_FLAG_VERBOSE, raid_main, G_NULL_OPTS,
- "[-v] name prov ..."
- },
- { "clear", G_FLAG_VERBOSE, raid_main, G_NULL_OPTS,
- "[-v] prov ..."
- },
- { "configure", G_FLAG_VERBOSE, NULL,
- {
- { 'a', "autosync", NULL, G_TYPE_BOOL },
- { 'b', "balance", "", G_TYPE_STRING },
- { 'd', "dynamic", NULL, G_TYPE_BOOL },
- { 'f', "failsync", NULL, G_TYPE_BOOL },
- { 'F', "nofailsync", NULL, G_TYPE_BOOL },
- { 'h', "hardcode", NULL, G_TYPE_BOOL },
- { 'n', "noautosync", NULL, G_TYPE_BOOL },
- { 'p', "priority", "-1", G_TYPE_NUMBER },
- { 's', "slice", "-1", G_TYPE_NUMBER },
- G_OPT_SENTINEL
- },
- "[-adfFhnv] [-b balance] [-s slice] name\n"
- "[-v] -p priority name prov"
- },
- { "deactivate", G_FLAG_VERBOSE, NULL, G_NULL_OPTS,
- "[-v] name prov ..."
- },
- { "dump", 0, raid_main, G_NULL_OPTS,
- "prov ..."
- },
- { "forget", G_FLAG_VERBOSE, NULL, G_NULL_OPTS,
- "name ..."
- },
- { "label", G_FLAG_VERBOSE, raid_main,
- {
- { 'b', "balance", GRAID_BALANCE, G_TYPE_STRING },
- { 'F', "nofailsync", NULL, G_TYPE_BOOL },
- { 'h', "hardcode", NULL, G_TYPE_BOOL },
- { 'n', "noautosync", NULL, G_TYPE_BOOL },
- { 's', "slice", GRAID_SLICE, G_TYPE_NUMBER },
- G_OPT_SENTINEL
- },
- "[-Fhnv] [-b balance] [-s slice] name prov ..."
- },
- { "insert", G_FLAG_VERBOSE, NULL,
- {
- { 'h', "hardcode", NULL, G_TYPE_BOOL },
- { 'i', "inactive", NULL, G_TYPE_BOOL },
- { 'p', "priority", GRAID_PRIORITY, G_TYPE_NUMBER },
- G_OPT_SENTINEL
- },
- "[-hiv] [-p priority] name prov ..."
- },
- { "rebuild", G_FLAG_VERBOSE, NULL, G_NULL_OPTS,
- "[-v] name prov ..."
- },
- { "remove", G_FLAG_VERBOSE, NULL, G_NULL_OPTS,
- "[-v] name prov ..."
+ { "label", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL,
+ "format name level prov ..."
},
{ "stop", G_FLAG_VERBOSE, NULL,
{
{ 'f', "force", NULL, G_TYPE_BOOL },
G_OPT_SENTINEL
},
- "[-fv] name ..."
+ NULL, "[-fv] name ..."
},
-*/
G_CMD_SENTINEL
};
@@ -143,7 +80,6 @@ raid_main(struct gctl_req *req, unsigned
gctl_error(req, "No '%s' argument.", "verb");
return;
}
-#if 0
if (strcmp(name, "label") == 0)
raid_label(req);
else if (strcmp(name, "clear") == 0)
@@ -153,235 +89,7 @@ raid_main(struct gctl_req *req, unsigned
else if (strcmp(name, "activate") == 0)
raid_activate(req);
else
-#endif
gctl_error(req, "Unknown command: %s.", name);
}
-
-static void
-raid_label(struct gctl_req *req)
-{
- struct g_raid_metadata md;
- u_char sector[512];
- const char *str;
- unsigned sectorsize;
- off_t mediasize;
- intmax_t val;
- int error, i, nargs, bal, hardcode;
-
- nargs = gctl_get_int(req, "nargs");
- if (nargs < 2) {
- gctl_error(req, "Too few arguments.");
- return;
- }
-
- strlcpy(md.md_magic, G_RAID_MAGIC, sizeof(md.md_magic));
- md.md_version = G_RAID_VERSION;
- str = gctl_get_ascii(req, "arg0");
- strlcpy(md.md_name, str, sizeof(md.md_name));
- md.md_mid = arc4random();
- md.md_all = nargs - 1;
- md.md_mflags = 0;
- md.md_dflags = 0;
- md.md_genid = 0;
- md.md_syncid = 1;
- md.md_sync_offset = 0;
- val = gctl_get_intmax(req, "slice");
- md.md_slice = val;
- str = gctl_get_ascii(req, "balance");
- bal = balance_id(str);
- if (bal == -1) {
- gctl_error(req, "Invalid balance algorithm.");
- return;
- }
- md.md_balance = bal;
- if (gctl_get_int(req, "noautosync"))
- md.md_mflags |= G_RAID_DEVICE_FLAG_NOAUTOSYNC;
- if (gctl_get_int(req, "nofailsync"))
- md.md_mflags |= G_RAID_DEVICE_FLAG_NOFAILSYNC;
- hardcode = gctl_get_int(req, "hardcode");
-
- /*
- * Calculate sectorsize by finding least common multiple from
- * sectorsizes of every disk and find the smallest mediasize.
- */
- mediasize = 0;
- sectorsize = 0;
- for (i = 1; i < nargs; i++) {
- unsigned ssize;
- off_t msize;
-
- str = gctl_get_ascii(req, "arg%d", i);
- msize = g_get_mediasize(str);
- ssize = g_get_sectorsize(str);
- if (msize == 0 || ssize == 0) {
- gctl_error(req, "Can't get informations about %s: %s.",
- str, strerror(errno));
- return;
- }
- msize -= ssize;
- if (mediasize == 0 || (mediasize > 0 && msize < mediasize))
- mediasize = msize;
- if (sectorsize == 0)
- sectorsize = ssize;
- else
- sectorsize = g_lcm(sectorsize, ssize);
- }
- md.md_mediasize = mediasize;
- md.md_sectorsize = sectorsize;
- md.md_mediasize -= (md.md_mediasize % md.md_sectorsize);
-
- /*
- * Clear last sector first, to spoil all components if device exists.
- */
- for (i = 1; i < nargs; i++) {
- str = gctl_get_ascii(req, "arg%d", i);
- error = g_metadata_clear(str, NULL);
- if (error != 0) {
- gctl_error(req, "Can't store metadata on %s: %s.", str,
- strerror(error));
- return;
- }
- }
-
- /*
- * Ok, store metadata (use disk number as priority).
- */
- for (i = 1; i < nargs; i++) {
- str = gctl_get_ascii(req, "arg%d", i);
- md.md_did = arc4random();
- md.md_priority = i - 1;
- md.md_provsize = g_get_mediasize(str);
- assert(md.md_provsize != 0);
- if (!hardcode)
- bzero(md.md_provider, sizeof(md.md_provider));
- else {
- if (strncmp(str, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
- str += sizeof(_PATH_DEV) - 1;
- strlcpy(md.md_provider, str, sizeof(md.md_provider));
- }
- raid_metadata_encode(&md, sector);
- error = g_metadata_store(str, sector, sizeof(sector));
- if (error != 0) {
- fprintf(stderr, "Can't store metadata on %s: %s.\n",
- str, strerror(error));
- gctl_error(req, "Not fully done.");
- continue;
- }
- if (verbose)
- printf("Metadata value stored on %s.\n", str);
- }
-}
-
-static void
-raid_clear(struct gctl_req *req)
-{
- const char *name;
- int error, i, nargs;
-
- nargs = gctl_get_int(req, "nargs");
- if (nargs < 1) {
- gctl_error(req, "Too few arguments.");
- return;
- }
-
- for (i = 0; i < nargs; i++) {
- name = gctl_get_ascii(req, "arg%d", i);
- error = g_metadata_clear(name, G_RAID_MAGIC);
- if (error != 0) {
- fprintf(stderr, "Can't clear metadata on %s: %s.\n",
- name, strerror(error));
- gctl_error(req, "Not fully done.");
- continue;
- }
- if (verbose)
- printf("Metadata cleared on %s.\n", name);
- }
-}
-
-static void
-raid_dump(struct gctl_req *req)
-{
- struct g_raid_metadata md, tmpmd;
- const char *name;
- int error, i, nargs;
-
- nargs = gctl_get_int(req, "nargs");
- if (nargs < 1) {
- gctl_error(req, "Too few arguments.");
- return;
- }
-
- for (i = 0; i < nargs; i++) {
- name = gctl_get_ascii(req, "arg%d", i);
- error = g_metadata_read(name, (u_char *)&tmpmd, sizeof(tmpmd),
- G_RAID_MAGIC);
- if (error != 0) {
- fprintf(stderr, "Can't read metadata from %s: %s.\n",
- name, strerror(error));
- gctl_error(req, "Not fully done.");
- continue;
- }
- if (raid_metadata_decode((u_char *)&tmpmd, &md) != 0) {
- fprintf(stderr, "MD5 hash mismatch for %s, skipping.\n",
- name);
- gctl_error(req, "Not fully done.");
- continue;
- }
- printf("Metadata on %s:\n", name);
- raid_metadata_dump(&md);
- printf("\n");
- }
-}
-
-static void
-raid_activate(struct gctl_req *req)
-{
- struct g_raid_metadata md, tmpmd;
- const char *name, *path;
- int error, i, nargs;
-
- nargs = gctl_get_int(req, "nargs");
- if (nargs < 2) {
- gctl_error(req, "Too few arguments.");
- return;
- }
- name = gctl_get_ascii(req, "arg0");
-
- for (i = 1; i < nargs; i++) {
- path = gctl_get_ascii(req, "arg%d", i);
- error = g_metadata_read(path, (u_char *)&tmpmd, sizeof(tmpmd),
- G_RAID_MAGIC);
- if (error != 0) {
- fprintf(stderr, "Cannot read metadata from %s: %s.\n",
- path, strerror(error));
- gctl_error(req, "Not fully done.");
- continue;
- }
- if (raid_metadata_decode((u_char *)&tmpmd, &md) != 0) {
- fprintf(stderr,
- "MD5 hash mismatch for provider %s, skipping.\n",
- path);
- gctl_error(req, "Not fully done.");
- continue;
- }
- if (strcmp(md.md_name, name) != 0) {
- fprintf(stderr,
- "Provider %s is not the raid %s component.\n",
- path, name);
- gctl_error(req, "Not fully done.");
- continue;
- }
- md.md_dflags &= ~G_RAID_DISK_FLAG_INACTIVE;
- raid_metadata_encode(&md, (u_char *)&tmpmd);
- error = g_metadata_store(path, (u_char *)&tmpmd, sizeof(tmpmd));
- if (error != 0) {
- fprintf(stderr, "Cannot write metadata from %s: %s.\n",
- path, strerror(error));
- gctl_error(req, "Not fully done.");
- continue;
- }
- if (verbose)
- printf("Provider %s activated.\n", path);
- }
-}
#endif
+
Modified: projects/graid/8/sys/geom/raid/g_raid.c
==============================================================================
--- projects/graid/8/sys/geom/raid/g_raid.c Fri Dec 24 07:41:39 2010 (r216687)
+++ projects/graid/8/sys/geom/raid/g_raid.c Fri Dec 24 11:07:31 2010 (r216688)
@@ -55,7 +55,7 @@ u_int g_raid_debug = 1000;
TUNABLE_INT("kern.geom.raid.debug", &g_raid_debug);
SYSCTL_UINT(_kern_geom_raid, OID_AUTO, debug, CTLFLAG_RW, &g_raid_debug, 0,
"Debug level");
-static u_int g_raid_start_timeout = 4;
+u_int g_raid_start_timeout = 4;
TUNABLE_INT("kern.geom.raid.start_timeout", &g_raid_start_timeout);
SYSCTL_UINT(_kern_geom_raid, OID_AUTO, timeout, CTLFLAG_RW, &g_raid_start_timeout,
0, "Time to wait on all mirror components");
@@ -92,7 +92,7 @@ static void g_raid_fini(struct g_class *
struct g_class g_raid_class = {
.name = G_RAID_CLASS_NAME,
.version = G_VERSION,
- .ctlreq = g_raid_config,
+ .ctlreq = g_raid_ctl,
.taste = g_raid_taste,
.destroy_geom = g_raid_destroy_geom,
.init = g_raid_init,
@@ -122,6 +122,8 @@ g_raid_disk_state2str(int state)
return ("SPARE");
case G_RAID_DISK_S_OFFLINE:
return ("OFFLINE");
+ case G_RAID_DISK_S_STALE:
+ return ("STALE");
default:
return ("INVALID");
}
@@ -217,7 +219,7 @@ g_raid_volume_event2str(int event)
}
}
-static const char *
+const char *
g_raid_volume_level2str(int level, int qual)
{
@@ -251,6 +253,41 @@ g_raid_volume_level2str(int level, int q
}
}
+int
+g_raid_volume_str2level(const char *str, int *level, int *qual)
+{
+
+ *level = G_RAID_VOLUME_RL_UNKNOWN;
+ *qual = G_RAID_VOLUME_RLQ_NONE;
+ if (strcasecmp(str, "RAID0") == 0)
+ *level = G_RAID_VOLUME_RL_RAID0;
+ else if (strcasecmp(str, "RAID1") == 0)
+ *level = G_RAID_VOLUME_RL_RAID1;
+ else if (strcasecmp(str, "RAID3") == 0)
+ *level = G_RAID_VOLUME_RL_RAID3;
+ else if (strcasecmp(str, "RAID4") == 0)
+ *level = G_RAID_VOLUME_RL_RAID4;
+ else if (strcasecmp(str, "RAID5") == 0)
+ *level = G_RAID_VOLUME_RL_RAID5;
+ else if (strcasecmp(str, "RAID6") == 0)
+ *level = G_RAID_VOLUME_RL_RAID6;
+ else if (strcasecmp(str, "RAID10") == 0)
+ *level = G_RAID_VOLUME_RL_RAID10;
+ else if (strcasecmp(str, "RAID1E") == 0)
+ *level = G_RAID_VOLUME_RL_RAID1E;
+ else if (strcasecmp(str, "SINGLE") == 0)
+ *level = G_RAID_VOLUME_RL_SINGLE;
+ else if (strcasecmp(str, "CONCAT") == 0)
+ *level = G_RAID_VOLUME_RL_CONCAT;
+ else if (strcasecmp(str, "RAID5E") == 0)
+ *level = G_RAID_VOLUME_RL_RAID5E;
+ else if (strcasecmp(str, "RAID5EE") == 0)
+ *level = G_RAID_VOLUME_RL_RAID5EE;
+ else
+ return (-1);
+ return (0);
+}
+
static const char *
g_raid_get_diskname(struct g_raid_disk *disk)
{
@@ -1231,12 +1268,15 @@ g_raid_destroy_node(struct g_raid_softc
kobj_delete((kobj_t)sc->sc_md, M_RAID);
sc->sc_md = NULL;
}
- G_RAID_DEBUG(1, "Destroying node %s.", sc->sc_name);
- g_topology_lock();
- sc->sc_geom->softc = NULL;
- g_wither_geom(sc->sc_geom, ENXIO);
- g_topology_unlock();
- sc->sc_geom = NULL;
+ if (sc->sc_geom != NULL) {
+ G_RAID_DEBUG(1, "Destroying node %s.", sc->sc_name);
+ g_topology_lock();
+ sc->sc_geom->softc = NULL;
+ g_wither_geom(sc->sc_geom, ENXIO);
+ g_topology_unlock();
+ sc->sc_geom = NULL;
+ } else
+ G_RAID_DEBUG(1, "Destroying node.");
if (worker) {
mtx_destroy(&sc->sc_queue_mtx);
sx_xunlock(&sc->sc_lock);
@@ -1297,12 +1337,13 @@ g_raid_destroy_volume(struct g_raid_volu
}
int
-g_raid_stop_disk(struct g_raid_disk *disk)
+g_raid_destroy_disk(struct g_raid_disk *disk)
{
struct g_raid_softc *sc;
struct g_raid_subdisk *sd, *tmp;
sc = disk->d_softc;
+ G_RAID_DEBUG(2, "Destroying disk.");
if (disk->d_consumer) {
g_topology_lock();
g_raid_kill_consumer(sc, disk->d_consumer);
@@ -1315,21 +1356,9 @@ g_raid_stop_disk(struct g_raid_disk *dis
LIST_REMOVE(sd, sd_next);
sd->sd_disk = NULL;
}
- return (0);
-}
-
-int
-g_raid_destroy_disk(struct g_raid_disk *disk)
-{
- struct g_raid_softc *sc;
- int error;
-
- sc = disk->d_softc;
- G_RAID_DEBUG(2, "Destroying disk.");
- error = g_raid_stop_disk(disk);
- if (error)
- return (error);
LIST_REMOVE(disk, d_next);
+ if (sc->sc_md)
+ G_RAID_MD_FREE_DISK(sc->sc_md, disk);
free(disk, M_RAID);
return (0);
}
@@ -1432,6 +1461,31 @@ g_raid_taste(struct g_class *mp, struct
return (geom);
}
+int
+g_raid_create_node_format(const char *format, struct g_geom **gp)
+{
+ struct g_raid_md_class *class;
+ struct g_raid_md_object *obj;
+ int status;
+
+ G_RAID_DEBUG(2, "Creating node for %s metadata.", format);
+ LIST_FOREACH(class, &g_raid_md_classes, mdc_list) {
+ if (strcasecmp(class->name, format) == 0)
+ break;
+ }
+ if (class == NULL) {
+ G_RAID_DEBUG(2, "Creating node for %s metadata.", format);
+ return (G_RAID_MD_TASTE_FAIL);
+ }
+ obj = (void *)kobj_create((kobj_class_t)class, M_RAID,
+ M_WAITOK);
+ obj->mdo_class = class;
+ status = G_RAID_MD_CREATE(obj, &g_raid_class, gp);
+ if (status != G_RAID_MD_TASTE_NEW)
+ kobj_delete((kobj_t)obj, M_RAID);
+ return (status);
+}
+
static int
g_raid_destroy_geom(struct gctl_req *req __unused,
struct g_class *mp __unused, struct g_geom *gp)
Modified: projects/graid/8/sys/geom/raid/g_raid.h
==============================================================================
--- projects/graid/8/sys/geom/raid/g_raid.h Fri Dec 24 07:41:39 2010 (r216687)
+++ projects/graid/8/sys/geom/raid/g_raid.h Fri Dec 24 11:07:31 2010 (r216688)
@@ -58,6 +58,7 @@ struct g_raid_tr_object;
#ifdef _KERNEL
extern u_int g_raid_debug;
+extern u_int g_raid_start_timeout;
#define G_RAID_DEBUG(lvl, fmt, ...) do { \
if (g_raid_debug >= (lvl)) { \
@@ -101,6 +102,7 @@ struct g_raid_event {
#define G_RAID_DISK_S_ACTIVE 0x01
#define G_RAID_DISK_S_SPARE 0x02
#define G_RAID_DISK_S_OFFLINE 0x03
+#define G_RAID_DISK_S_STALE 0x04
#define G_RAID_DISK_E_DISCONNECTED 0x01
@@ -276,18 +278,18 @@ int g_raid_tr_modevent(module_t, int, vo
}; \
DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_ANY)
+const char * g_raid_volume_level2str(int level, int qual);
+int g_raid_volume_str2level(const char *str, int *level, int *qual);
+
struct g_raid_softc * g_raid_create_node(struct g_class *mp,
const char *name, struct g_raid_md_object *md);
+int g_raid_create_node_format(const char *format, struct g_geom **gp);
struct g_raid_volume * g_raid_create_volume(struct g_raid_softc *sc,
const char *name);
struct g_raid_disk * g_raid_create_disk(struct g_raid_softc *sc);
int g_raid_start_volume(struct g_raid_volume *vol);
-int g_raid_stop_node(struct g_raid_softc *sc);
-int g_raid_stop_volume(struct g_raid_volume *vol);
-int g_raid_stop_disk(struct g_raid_disk *disk);
-
int g_raid_destroy_node(struct g_raid_softc *sc, int worker);
int g_raid_destroy_volume(struct g_raid_volume *vol);
int g_raid_destroy_disk(struct g_raid_disk *disk);
@@ -309,7 +311,7 @@ u_int g_raid_nsubdisks(struct g_raid_vol
int g_raid_destroy(struct g_raid_softc *sc, int how);
int g_raid_event_send(void *arg, int event, int flags);
-g_ctl_req_t g_raid_config;
+g_ctl_req_t g_raid_ctl;
#endif /* _KERNEL */
#endif /* !_G_RAID_H_ */
Modified: projects/graid/8/sys/geom/raid/g_raid_ctl.c
==============================================================================
--- projects/graid/8/sys/geom/raid/g_raid_ctl.c Fri Dec 24 07:41:39 2010 (r216687)
+++ projects/graid/8/sys/geom/raid/g_raid_ctl.c Fri Dec 24 11:07:31 2010 (r216688)
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2004-2009 Pawel Jakub Dawidek <pjd at FreeBSD.org>
+ * Copyright (c) 2010 Alexander Motin <mav at FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -43,547 +43,149 @@ __FBSDID("$FreeBSD$");
#include <sys/proc.h>
#include <sys/kthread.h>
#include <geom/raid/g_raid.h>
+#include "g_raid_md_if.h"
-#if 0
static struct g_raid_softc *
-g_raid_find_device(struct g_class *mp, const char *name)
+g_raid_find_node(struct g_class *mp, const char *name)
{
struct g_raid_softc *sc;
struct g_geom *gp;
- g_topology_lock();
LIST_FOREACH(gp, &mp->geom, geom) {
sc = gp->softc;
if (sc == NULL)
continue;
if (sc->sc_stopping != 0)
continue;
- if (strcmp(gp->name, name) == 0 ||
- strcmp(sc->sc_name, name) == 0) {
- g_topology_unlock();
- sx_xlock(&sc->sc_lock);
+ if (strcasecmp(sc->sc_name, name) == 0)
return (sc);
- }
- }
- g_topology_unlock();
- return (NULL);
-}
-
-static struct g_raid_disk *
-g_raid_find_disk(struct g_raid_softc *sc, const char *name)
-{
- struct g_raid_disk *disk;
-
- sx_assert(&sc->sc_lock, SX_XLOCKED);
- if (strncmp(name, "/dev/", 5) == 0)
- name += 5;
- LIST_FOREACH(disk, &sc->sc_disks, d_next) {
- if (disk->d_consumer == NULL)
- continue;
- if (disk->d_consumer->provider == NULL)
- continue;
- if (strcmp(disk->d_consumer->provider->name, name) == 0)
- return (disk);
}
return (NULL);
}
static void
-g_raid_ctl_configure(struct gctl_req *req, struct g_class *mp)
+g_raid_ctl_label(struct gctl_req *req, struct g_class *mp)
{
+ struct g_geom *geom;
struct g_raid_softc *sc;
- struct g_raid_disk *disk;
- const char *name, *balancep, *prov;
- intmax_t *slicep, *priority;
- uint32_t slice;
- uint8_t balance;
- int *autosync, *noautosync, *failsync, *nofailsync, *hardcode, *dynamic;
- int *nargs, do_sync = 0, dirty = 1, do_priority = 0;
+ const char *format;
+ int *nargs;
+ int crstatus, ctlstatus;
nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs));
if (nargs == NULL) {
gctl_error(req, "No '%s' argument.", "nargs");
return;
}
- if (*nargs != 1 && *nargs != 2) {
- gctl_error(req, "Invalid number of arguments.");
- return;
- }
- name = gctl_get_asciiparam(req, "arg0");
- if (name == NULL) {
- gctl_error(req, "No 'arg%u' argument.", 0);
- return;
- }
- balancep = gctl_get_asciiparam(req, "balance");
- if (balancep == NULL) {
- gctl_error(req, "No '%s' argument.", "balance");
- return;
- }
- autosync = gctl_get_paraml(req, "autosync", sizeof(*autosync));
- if (autosync == NULL) {
- gctl_error(req, "No '%s' argument.", "autosync");
- return;
- }
- noautosync = gctl_get_paraml(req, "noautosync", sizeof(*noautosync));
- if (noautosync == NULL) {
- gctl_error(req, "No '%s' argument.", "noautosync");
- return;
- }
- failsync = gctl_get_paraml(req, "failsync", sizeof(*failsync));
- if (failsync == NULL) {
- gctl_error(req, "No '%s' argument.", "failsync");
- return;
- }
- nofailsync = gctl_get_paraml(req, "nofailsync", sizeof(*nofailsync));
- if (nofailsync == NULL) {
- gctl_error(req, "No '%s' argument.", "nofailsync");
- return;
- }
- hardcode = gctl_get_paraml(req, "hardcode", sizeof(*hardcode));
- if (hardcode == NULL) {
- gctl_error(req, "No '%s' argument.", "hardcode");
- return;
- }
- dynamic = gctl_get_paraml(req, "dynamic", sizeof(*dynamic));
- if (dynamic == NULL) {
- gctl_error(req, "No '%s' argument.", "dynamic");
- return;
- }
- priority = gctl_get_paraml(req, "priority", sizeof(*priority));
- if (priority == NULL) {
- gctl_error(req, "No '%s' argument.", "priority");
- return;
- }
- if (*priority < -1 || *priority > 255) {
- gctl_error(req, "Priority range is 0 to 255, %jd given",
- *priority);
- return;
- }
- /*
- * Since we have a priority, we also need a provider now.
- * Note: be WARNS safe, by always assigning prov and only throw an
- * error if *priority != -1.
- */
- prov = gctl_get_asciiparam(req, "arg1");
- if (*priority > -1) {
- if (prov == NULL) {
- gctl_error(req, "Priority needs a disk name");
- return;
- }
- do_priority = 1;
- }
- if (*autosync && *noautosync) {
- gctl_error(req, "'%s' and '%s' specified.", "autosync",
- "noautosync");
- return;
- }
- if (*failsync && *nofailsync) {
- gctl_error(req, "'%s' and '%s' specified.", "failsync",
- "nofailsync");
- return;
- }
- if (*hardcode && *dynamic) {
- gctl_error(req, "'%s' and '%s' specified.", "hardcode",
- "dynamic");
- return;
- }
- sc = g_raid_find_device(mp, name);
- if (sc == NULL) {
- gctl_error(req, "No such device: %s.", name);
- return;
- }
- if (*balancep == '\0')
- balance = sc->sc_balance;
- else {
- if (balance_id(balancep) == -1) {
- gctl_error(req, "Invalid balance algorithm.");
- sx_xunlock(&sc->sc_lock);
- return;
- }
- balance = balance_id(balancep);
- }
- slicep = gctl_get_paraml(req, "slice", sizeof(*slicep));
- if (slicep == NULL) {
- gctl_error(req, "No '%s' argument.", "slice");
- sx_xunlock(&sc->sc_lock);
- return;
- }
- if (*slicep == -1)
- slice = sc->sc_slice;
- else
- slice = *slicep;
- /* Enforce usage() of -p not allowing any other options. */
- if (do_priority && (*autosync || *noautosync || *failsync ||
- *nofailsync || *hardcode || *dynamic || *slicep != -1 ||
- *balancep != '\0')) {
- sx_xunlock(&sc->sc_lock);
- gctl_error(req, "only -p accepted when setting priority");
- return;
- }
- if (sc->sc_balance == balance && sc->sc_slice == slice && !*autosync &&
- !*noautosync && !*failsync && !*nofailsync && !*hardcode &&
- !*dynamic && !do_priority) {
- sx_xunlock(&sc->sc_lock);
- gctl_error(req, "Nothing has changed.");
- return;
- }
- if ((!do_priority && *nargs != 1) || (do_priority && *nargs != 2)) {
- sx_xunlock(&sc->sc_lock);
+ if (*nargs < 4) {
gctl_error(req, "Invalid number of arguments.");
return;
}
- if (g_raid_ndisks(sc, -1) < sc->sc_ndisks) {
- sx_xunlock(&sc->sc_lock);
- gctl_error(req, "Not all disks connected. Try 'forget' command "
- "first.");
- return;
- }
- sc->sc_balance = balance;
- sc->sc_slice = slice;
- if ((sc->sc_flags & G_RAID_DEVICE_FLAG_NOAUTOSYNC) != 0) {
- if (*autosync) {
- sc->sc_flags &= ~G_RAID_DEVICE_FLAG_NOAUTOSYNC;
- do_sync = 1;
- }
- } else {
- if (*noautosync)
- sc->sc_flags |= G_RAID_DEVICE_FLAG_NOAUTOSYNC;
- }
- if ((sc->sc_flags & G_RAID_DEVICE_FLAG_NOFAILSYNC) != 0) {
- if (*failsync)
- sc->sc_flags &= ~G_RAID_DEVICE_FLAG_NOFAILSYNC;
- } else {
- if (*nofailsync) {
- sc->sc_flags |= G_RAID_DEVICE_FLAG_NOFAILSYNC;
- dirty = 0;
- }
- }
- LIST_FOREACH(disk, &sc->sc_disks, d_next) {
- /*
- * Handle priority first, since we only need one disk, do one
- * operation on it and then we're done. No need to check other
- * flags, as usage doesn't allow it.
- */
- if (do_priority) {
- if (strcmp(disk->d_consumer->provider->name, prov) == 0) {
- if (disk->d_priority == *priority)
- gctl_error(req, "Nothing has changed.");
- else {
- disk->d_priority = *priority;
- g_raid_update_metadata(disk);
- }
- break;
- }
- continue;
- }
- if (do_sync) {
- if (disk->d_state == G_RAID_DISK_STATE_SYNCHRONIZING)
- disk->d_flags &= ~G_RAID_DISK_FLAG_FORCE_SYNC;
- }
- if (!dirty)
- disk->d_flags &= ~G_RAID_DISK_FLAG_DIRTY;
- g_raid_update_metadata(disk);
- if (do_sync) {
- if (disk->d_state == G_RAID_DISK_STATE_STALE) {
- g_raid_event_send(disk,
- G_RAID_DISK_STATE_DISCONNECTED,
- G_RAID_EVENT_DISK);
- }
- }
- }
- sx_xunlock(&sc->sc_lock);
-}
-
-static void
-g_raid_ctl_rebuild(struct gctl_req *req, struct g_class *mp)
-{
- struct g_raid_metadata md;
- struct g_raid_softc *sc;
- struct g_raid_disk *disk;
- struct g_provider *pp;
- const char *name;
- char param[16];
- int error, *nargs;
- u_int i;
-
- nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs));
- if (nargs == NULL) {
- gctl_error(req, "No '%s' argument.", "nargs");
- return;
- }
- if (*nargs < 2) {
- gctl_error(req, "Too few arguments.");
- return;
- }
- name = gctl_get_asciiparam(req, "arg0");
- if (name == NULL) {
- gctl_error(req, "No 'arg%u' argument.", 0);
+ format = gctl_get_asciiparam(req, "arg0");
+ if (format == NULL) {
+ gctl_error(req, "No format recieved.");
return;
}
- sc = g_raid_find_device(mp, name);
- if (sc == NULL) {
- gctl_error(req, "No such device: %s.", name);
+ crstatus = g_raid_create_node_format(format, &geom);
+ if (crstatus == G_RAID_MD_TASTE_FAIL) {
+ gctl_error(req, "Failed to create node with format '%s'.",
+ format);
return;
}
- for (i = 1; i < (u_int)*nargs; i++) {
- snprintf(param, sizeof(param), "arg%u", i);
- name = gctl_get_asciiparam(req, param);
- if (name == NULL) {
- gctl_error(req, "No 'arg%u' argument.", i);
- continue;
- }
- disk = g_raid_find_disk(sc, name);
- if (disk == NULL) {
- gctl_error(req, "No such provider: %s.", name);
- continue;
- }
- if (g_raid_ndisks(sc, G_RAID_DISK_STATE_ACTIVE) == 1 &&
- disk->d_state == G_RAID_DISK_STATE_ACTIVE) {
- /*
- * This is the last active disk. There will be nothing
- * to rebuild it from, so deny this request.
- */
- gctl_error(req,
- "Provider %s is the last active provider in %s.",
- name, sc->sc_geom->name);
- break;
- }
- /*
- * Do rebuild by resetting syncid, disconnecting the disk and
- * connecting it again.
- */
- if ((sc->sc_flags & G_RAID_DEVICE_FLAG_NOAUTOSYNC) != 0)
- disk->d_flags |= G_RAID_DISK_FLAG_FORCE_SYNC;
- g_raid_update_metadata(disk);
- pp = disk->d_consumer->provider;
- g_topology_lock();
- error = g_raid_read_metadata(disk->d_consumer, &md);
- g_topology_unlock();
- g_raid_event_send(disk, G_RAID_DISK_STATE_DISCONNECTED,
- G_RAID_EVENT_WAIT);
- if (error != 0) {
- gctl_error(req, "Cannot read metadata from %s.",
- pp->name);
- continue;
- }
- error = g_raid_add_disk(sc, pp, &md);
- if (error != 0) {
- gctl_error(req, "Cannot reconnect component %s.",
- pp->name);
- continue;
- }
+ sc = (struct g_raid_softc *)geom->softc;
+ g_topology_unlock();
+ sx_xlock(&sc->sc_lock);
+ ctlstatus = G_RAID_MD_CTL(sc->sc_md, req);
+ if (ctlstatus < 0) {
+ gctl_error(req, "Command failed: %d.", ctlstatus);
+ if (crstatus == G_RAID_MD_TASTE_NEW)
+ g_raid_destroy_node(sc, 0);
}
sx_xunlock(&sc->sc_lock);
+ g_topology_lock();
}
static void
-g_raid_ctl_remove(struct gctl_req *req, struct g_class *mp)
+g_raid_ctl_stop(struct gctl_req *req, struct g_class *mp)
{
struct g_raid_softc *sc;
- struct g_raid_disk *disk;
- const char *name;
- char param[16];
- int *nargs;
- u_int i;
+ const char *nodename;
+ int *nargs, *force;
+ int error, how;
nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs));
if (nargs == NULL) {
gctl_error(req, "No '%s' argument.", "nargs");
return;
}
- if (*nargs < 2) {
- gctl_error(req, "Too few arguments.");
+ if (*nargs < 1) {
+ gctl_error(req, "Invalid number of arguments.");
return;
}
- name = gctl_get_asciiparam(req, "arg0");
- if (name == NULL) {
- gctl_error(req, "No 'arg%u' argument.", 0);
+ nodename = gctl_get_asciiparam(req, "arg0");
+ if (nodename == NULL) {
+ gctl_error(req, "No node name recieved.");
return;
}
- sc = g_raid_find_device(mp, name);
+ sc = g_raid_find_node(mp, nodename);
if (sc == NULL) {
- gctl_error(req, "No such device: %s.", name);
+ gctl_error(req, "Node '%s' not found.", nodename);
return;
}
- if (g_raid_ndisks(sc, -1) < sc->sc_ndisks) {
+ force = gctl_get_paraml(req, "force", sizeof(*force));
+ if (force != NULL && *force)
+ how = G_RAID_DESTROY_HARD;
+ else
+ how = G_RAID_DESTROY_SOFT;
+ g_topology_unlock();
+ sx_xlock(&sc->sc_lock);
+ error = g_raid_destroy(sc, how);
+ if (error != 0)
sx_xunlock(&sc->sc_lock);
- gctl_error(req, "Not all disks connected. Try 'forget' command "
- "first.");
- return;
- }
- for (i = 1; i < (u_int)*nargs; i++) {
- snprintf(param, sizeof(param), "arg%u", i);
- name = gctl_get_asciiparam(req, param);
- if (name == NULL) {
- gctl_error(req, "No 'arg%u' argument.", i);
- continue;
- }
- disk = g_raid_find_disk(sc, name);
- if (disk == NULL) {
- gctl_error(req, "No such provider: %s.", name);
- continue;
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list