From owner-svn-src-projects@FreeBSD.ORG Thu Jan 17 19:08:27 2013 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 94B25C16; Thu, 17 Jan 2013 19:08:27 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 78321AF8; Thu, 17 Jan 2013 19:08:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HJ8RlB058342; Thu, 17 Jan 2013 19:08:27 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HJ8LKe058290; Thu, 17 Jan 2013 19:08:21 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201301171908.r0HJ8LKe058290@svn.freebsd.org> From: Neel Natu Date: Thu, 17 Jan 2013 19:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r245569 - in projects/bhyve: . bin/cp contrib/gcc/config/arm etc/mtree etc/rc.d gnu/lib/csu gnu/lib/libgcc gnu/lib/libgcov gnu/lib/libstdc++ gnu/usr.bin/cc gnu/usr.bin/cc/c++filt gnu/us... X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2013 19:08:27 -0000 Author: neel Date: Thu Jan 17 19:08:20 2013 New Revision: 245569 URL: http://svnweb.freebsd.org/changeset/base/245569 Log: IFC @ r245542 Added: projects/bhyve/tools/build/options/WITH_ARM_EABI - copied unchanged from r245542, head/tools/build/options/WITH_ARM_EABI projects/bhyve/tools/build/options/WITH_OPENSSH_NONE_CIPHER - copied unchanged from r245542, head/tools/build/options/WITH_OPENSSH_NONE_CIPHER Modified: projects/bhyve/ObsoleteFiles.inc projects/bhyve/bin/cp/cp.c projects/bhyve/contrib/gcc/config/arm/freebsd.h projects/bhyve/etc/mtree/BSD.usr.dist projects/bhyve/etc/rc.d/jail projects/bhyve/gnu/lib/csu/Makefile projects/bhyve/gnu/lib/libgcc/Makefile projects/bhyve/gnu/lib/libgcov/Makefile projects/bhyve/gnu/lib/libstdc++/Makefile projects/bhyve/gnu/usr.bin/cc/Makefile.inc projects/bhyve/gnu/usr.bin/cc/c++filt/Makefile projects/bhyve/gnu/usr.bin/cc/cc1/Makefile projects/bhyve/gnu/usr.bin/cc/cc1plus/Makefile projects/bhyve/gnu/usr.bin/cc/cc_int/Makefile projects/bhyve/gnu/usr.bin/cc/cc_tools/Makefile projects/bhyve/gnu/usr.bin/cc/doc/Makefile projects/bhyve/gnu/usr.bin/cc/gcov/Makefile projects/bhyve/gnu/usr.bin/cc/include/Makefile projects/bhyve/gnu/usr.bin/cc/libcpp/Makefile projects/bhyve/gnu/usr.bin/cc/libdecnumber/Makefile projects/bhyve/gnu/usr.bin/cc/libiberty/Makefile projects/bhyve/sbin/geom/class/raid/graid.8 projects/bhyve/secure/lib/libssh/Makefile projects/bhyve/secure/usr.bin/ssh/Makefile projects/bhyve/secure/usr.sbin/sshd/Makefile projects/bhyve/share/mk/bsd.man.mk projects/bhyve/share/mk/bsd.own.mk projects/bhyve/share/mk/bsd.prog.mk projects/bhyve/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c projects/bhyve/sys/dev/cxgbe/adapter.h projects/bhyve/sys/dev/cxgbe/t4_main.c projects/bhyve/sys/geom/raid/md_promise.c projects/bhyve/sys/geom/raid/tr_concat.c projects/bhyve/tools/tools/cxgbetool/cxgbetool.c projects/bhyve/tools/tools/notescheck/notescheck.py projects/bhyve/usr.bin/man/man.1 projects/bhyve/usr.bin/man/man.sh Directory Properties: projects/bhyve/ (props changed) projects/bhyve/contrib/gcc/ (props changed) projects/bhyve/gnu/lib/ (props changed) projects/bhyve/gnu/usr.bin/cc/cc_tools/ (props changed) projects/bhyve/sbin/ (props changed) projects/bhyve/sys/ (props changed) projects/bhyve/sys/cddl/contrib/opensolaris/ (props changed) Modified: projects/bhyve/ObsoleteFiles.inc ============================================================================== --- projects/bhyve/ObsoleteFiles.inc Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/ObsoleteFiles.inc Thu Jan 17 19:08:20 2013 (r245569) @@ -38,6 +38,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20130116: removed long unused directories for .1aout section manpages +OLD_FILES+=usr/share/man/en.ISO8859-1/man1aout +OLD_FILES+=usr/share/man/en.UTF-8/man1aout +OLD_DIRS+=usr/share/man/man1aout +OLD_DIRS+=usr/share/man/cat1aout +OLD_DIRS+=usr/share/man/en.ISO8859-1/cat1aout +OLD_DIRS+=usr/share/man/en.UTF-8/cat1aout # 20121230: libdisk removed OLD_FILES+=usr/share/man/man3/libdisk.3.gz usr/include/libdisk.h OLD_FILES+=usr/lib/libdisk.a usr/lib32/libdisk.a Modified: projects/bhyve/bin/cp/cp.c ============================================================================== --- projects/bhyve/bin/cp/cp.c Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/bin/cp/cp.c Thu Jan 17 19:08:20 2013 (r245569) @@ -98,30 +98,28 @@ main(int argc, char *argv[]) { struct stat to_stat, tmp_stat; enum op type; - int Hflag, Lflag, Pflag, ch, fts_options, r, have_trailing_slash; + int Hflag, Lflag, ch, fts_options, r, have_trailing_slash; char *target; fts_options = FTS_NOCHDIR | FTS_PHYSICAL; - Hflag = Lflag = Pflag = 0; + Hflag = Lflag = 0; while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1) switch (ch) { case 'H': Hflag = 1; - Lflag = Pflag = 0; + Lflag = 0; break; case 'L': Lflag = 1; - Hflag = Pflag = 0; + Hflag = 0; break; case 'P': - Pflag = 1; Hflag = Lflag = 0; break; case 'R': Rflag = 1; break; case 'a': - Pflag = 1; pflag = 1; Rflag = 1; Hflag = Lflag = 0; @@ -146,7 +144,7 @@ main(int argc, char *argv[]) break; case 'r': rflag = Lflag = 1; - Hflag = Pflag = 0; + Hflag = 0; break; case 'v': vflag = 1; Modified: projects/bhyve/contrib/gcc/config/arm/freebsd.h ============================================================================== --- projects/bhyve/contrib/gcc/config/arm/freebsd.h Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/contrib/gcc/config/arm/freebsd.h Thu Jan 17 19:08:20 2013 (r245569) @@ -29,8 +29,13 @@ { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER } #undef SUBTARGET_EXTRA_ASM_SPEC +#ifdef TARGET_ARM_EABI +#define SUBTARGET_EXTRA_ASM_SPEC \ + "%{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=4} %{fpic|fpie:-k} %{fPIC|fPIE:-k}" +#else #define SUBTARGET_EXTRA_ASM_SPEC \ "-matpcs %{fpic|fpie:-k} %{fPIC|fPIE:-k}" +#endif /* Default to full FPA if -mhard-float is specified. */ #undef SUBTARGET_ASM_FLOAT_SPEC @@ -61,8 +66,25 @@ #define TARGET_ENDIAN_DEFAULT 0 #endif +#ifdef TARGET_ARM_EABI +/* We default to a soft-float ABI so that binaries can run on all + target hardware. */ +#undef TARGET_DEFAULT_FLOAT_ABI +#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT + +#undef ARM_DEFAULT_ABI +#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX + +#undef TARGET_OS_CPP_BUILTINS +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + FBSD_TARGET_OS_CPP_BUILTINS(); \ + TARGET_BPABI_CPP_BUILTINS(); \ + } \ + while (false) +#else /* Default it to use ATPCS with soft-VFP. */ -#undef TARGET_DEFAULT #define TARGET_DEFAULT \ (MASK_APCS_FRAME \ | TARGET_ENDIAN_DEFAULT) @@ -70,6 +92,10 @@ #undef ARM_DEFAULT_ABI #define ARM_DEFAULT_ABI ARM_ABI_ATPCS +#undef FPUTYPE_DEFAULT +#define FPUTYPE_DEFAULT FPUTYPE_VFP +#endif + /* Define the actual types of some ANSI-mandated types. Needs to agree with . GCC defaults come from c-decl.c, c-common.c, and config//.h. */ @@ -134,5 +160,3 @@ do \ } \ while (0) -#undef FPUTYPE_DEFAULT -#define FPUTYPE_DEFAULT FPUTYPE_VFP Modified: projects/bhyve/etc/mtree/BSD.usr.dist ============================================================================== --- projects/bhyve/etc/mtree/BSD.usr.dist Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/etc/mtree/BSD.usr.dist Thu Jan 17 19:08:20 2013 (r245569) @@ -756,8 +756,6 @@ /set uname=man cat1 .. - cat1aout - .. cat2 .. cat3 @@ -795,8 +793,6 @@ en.ISO8859-1 uname=root cat1 .. - cat1aout - .. cat2 .. cat3 @@ -835,8 +831,6 @@ en.UTF-8 uname=root cat1 .. - cat1aout - .. cat2 .. cat3 @@ -913,8 +907,6 @@ .. man1 .. - man1aout - .. man2 .. man3 Modified: projects/bhyve/etc/rc.d/jail ============================================================================== --- projects/bhyve/etc/rc.d/jail Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/etc/rc.d/jail Thu Jan 17 19:08:20 2013 (r245569) @@ -509,7 +509,7 @@ jail_handle_ips_option() esac case "${_type}" in inet) ;; - inet6) ;; + inet6) ipv6_address_count=$((ipv6_address_count + 1)) ;; *) warn "Could not determine address family. Not going" \ "to ${_action} address '${_addr}' for ${_jail}." continue @@ -546,6 +546,7 @@ jail_ips() esac # Handle addresses. + ipv6_address_count=0 jail_handle_ips_option ${_action} "${_ip}" # Handle jail_xxx_ip_multi alias=0 @@ -558,6 +559,12 @@ jail_ips() ;; esac done + case ${ipv6_address_count} in + 0) ;; + *) # Sleep 1 second to let DAD complete before starting services. + sleep 1 + ;; + esac } jail_prestart() Modified: projects/bhyve/gnu/lib/csu/Makefile ============================================================================== --- projects/bhyve/gnu/lib/csu/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/lib/csu/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -24,6 +24,10 @@ CFLAGS+= -I${GCCLIB}/include -I${GCCDIR} CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} MKDEP= -DCRT_BEGIN +.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +CFLAGS+= -DTARGET_ARM_EABI +.endif + .if ${MACHINE_CPUARCH} == "ia64" BEGINSRC= crtbegin.asm ENDSRC= crtend.asm Modified: projects/bhyve/gnu/lib/libgcc/Makefile ============================================================================== --- projects/bhyve/gnu/lib/libgcc/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/lib/libgcc/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -15,6 +15,10 @@ MK_SSP= no .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" +.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +CFLAGS+= -DTARGET_ARM_EABI +.endif + .if ${TARGET_CPUARCH} == "mips" LIB= gcc .endif @@ -55,10 +59,13 @@ LIB2FUNCS+= _fixuns${mode}si .endfor # Likewise double-word routines. +.if ${TARGET_CPUARCH} != "arm" || ${MK_ARM_EABI} == "no" +# These are implemented in an ARM specific file but will not be filtered out .for mode in sf df xf tf LIB2FUNCS+= _fix${mode}di _fixuns${mode}di LIB2FUNCS+= _floatdi${mode} _floatundi${mode} .endfor +.endif LIB2ADD = $(LIB2FUNCS_EXTRA) LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA) @@ -115,15 +122,14 @@ CFLAGS+= -fheinous-gnu-extensions LIB1ASMSRC = lib1funcs.asm LIB1ASMFUNCS = _dvmd_tls _bb_init_func -LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c +.if ${MK_ARM_EABI} != "no" +LIB1ASMFUNCS+= _addsubdf3 _addsubsf3 _cmpdf2 _cmpsf2 _fixdfsi _fixsfsi \ + _fixunsdfsi _fixunsdfsi _muldivdf3 _muldivsf3 _udivsi3 -# Not now -#LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func -#LIB1ASMFUNCS+= _call_via_rX _interwork_call_via_rX \ -# _lshrdi3 _ashrdi3 _ashldi3 \ -# _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ -# _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ -# _fixsfsi _fixunssfsi _floatdidf _floatdisf +LIB2ADDEH = unwind-arm.c libunwind.S pr-support.c unwind-c.c +.else +LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c +.endif .endif .if ${TARGET_CPUARCH} == mips @@ -329,6 +335,9 @@ CLEANFILES += cs-*.h option* SHLIB_MKMAP = ${GCCDIR}/mkmap-symver.awk SHLIB_MKMAP_OPTS = SHLIB_MAPFILES = ${GCCDIR}/libgcc-std.ver +.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +SHLIB_MAPFILES += ${GCCDIR}/config/arm/libgcc-bpabi.ver +.endif VERSION_MAP = libgcc.map libgcc.map: ${SHLIB_MKMAP} ${SHLIB_MAPFILES} ${SOBJS} ${OBJS:R:S/$/.So/} Modified: projects/bhyve/gnu/lib/libgcov/Makefile ============================================================================== --- projects/bhyve/gnu/lib/libgcov/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/lib/libgcov/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -15,6 +15,11 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \ -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. + +.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +CFLAGS+= -DTARGET_ARM_EABI +.endif + # # Library members defined in libgcov.c. # Defined in libgcov.c, included only in gcov library Modified: projects/bhyve/gnu/lib/libstdc++/Makefile ============================================================================== --- projects/bhyve/gnu/lib/libstdc++/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/lib/libstdc++/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + GCCVER= 4.2 GCCDIR= ${.CURDIR}/../../../contrib/gcc GCCLIB= ${.CURDIR}/../../../contrib/gcclibs @@ -14,7 +16,7 @@ LIB= stdc++ SHLIB_MAJOR= 6 CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H -.if ${MACHINE_CPUARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} == "no" CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1 .endif CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include @@ -594,7 +596,13 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h CLEANFILES+= ${THRHDRS} +.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +unwind.h: ${GCCDIR}/config/arm/unwind-arm.h +.else unwind.h: ${GCCDIR}/unwind-generic.h +.endif + +unwind.h: ln -sf ${.ALLSRC} ${.TARGET} SRCS+= unwind.h Modified: projects/bhyve/gnu/usr.bin/cc/Makefile.inc ============================================================================== --- projects/bhyve/gnu/usr.bin/cc/Makefile.inc Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/usr.bin/cc/Makefile.inc Thu Jan 17 19:08:20 2013 (r245569) @@ -26,6 +26,10 @@ CSTD?= gnu89 CFLAGS+= -DCROSS_COMPILE .endif +.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +CFLAGS+= -DTARGET_ARM_EABI +.endif + .if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END .endif Modified: projects/bhyve/gnu/usr.bin/cc/c++filt/Makefile ============================================================================== --- projects/bhyve/gnu/usr.bin/cc/c++filt/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/usr.bin/cc/c++filt/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -1,5 +1,8 @@ # $FreeBSD$ +NO_MAN= +.include + .include "../Makefile.inc" .include "../Makefile.fe" @@ -7,7 +10,6 @@ PROG= c++filt SRCS= cp-demangle.c -NO_MAN= CFLAGS+= -DSTANDALONE_DEMANGLER -DVERSION=\"$(GCC_VERSION)\" Modified: projects/bhyve/gnu/usr.bin/cc/cc1/Makefile ============================================================================== --- projects/bhyve/gnu/usr.bin/cc/cc1/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/usr.bin/cc/cc1/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -1,9 +1,10 @@ # $FreeBSD$ -.include "../Makefile.inc" NO_MAN= .include +.include "../Makefile.inc" + .PATH: ${GCCDIR} PROG= cc1 Modified: projects/bhyve/gnu/usr.bin/cc/cc1plus/Makefile ============================================================================== --- projects/bhyve/gnu/usr.bin/cc/cc1plus/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/usr.bin/cc/cc1plus/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -1,9 +1,10 @@ # $FreeBSD$ -.include "../Makefile.inc" NO_MAN= .include +.include "../Makefile.inc" + .PATH: ${GCCDIR}/cp ${GCCDIR} PROG= cc1plus Modified: projects/bhyve/gnu/usr.bin/cc/cc_int/Makefile ============================================================================== --- projects/bhyve/gnu/usr.bin/cc/cc_int/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/usr.bin/cc/cc_int/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .include "../Makefile.inc" .include "../Makefile.ver" Modified: projects/bhyve/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- projects/bhyve/gnu/usr.bin/cc/cc_tools/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/usr.bin/cc/cc_tools/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -51,6 +51,9 @@ TARGET_INC+= ${GCC_CPU}/elf.h .endif .if ${TARGET_CPUARCH} == "arm" TARGET_INC+= ${GCC_CPU}/aout.h +.if ${MK_ARM_EABI} != "no" +TARGET_INC+= ${GCC_CPU}/bpabi.h +.endif .endif .if ${TARGET_ARCH} == "powerpc64" TARGET_INC+= ${GCC_CPU}/biarch64.h @@ -349,7 +352,13 @@ gthr-default.h: ${GCCDIR}/gthr-posix.h GENSRCS+= gthr-default.h +.if ${TARGET_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no" +unwind.h: ${GCCDIR}/config/arm/unwind-arm.h +.else unwind.h: ${GCCDIR}/unwind-generic.h +.endif + +unwind.h: ln -sf ${.ALLSRC} ${.TARGET} GENSRCS+= unwind.h Modified: projects/bhyve/gnu/usr.bin/cc/doc/Makefile ============================================================================== --- projects/bhyve/gnu/usr.bin/cc/doc/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/usr.bin/cc/doc/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .include "../Makefile.inc" .include "../Makefile.ver" Modified: projects/bhyve/gnu/usr.bin/cc/gcov/Makefile ============================================================================== --- projects/bhyve/gnu/usr.bin/cc/gcov/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/usr.bin/cc/gcov/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .include "../Makefile.inc" .include "../Makefile.ver" Modified: projects/bhyve/gnu/usr.bin/cc/include/Makefile ============================================================================== --- projects/bhyve/gnu/usr.bin/cc/include/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/usr.bin/cc/include/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + .include "../Makefile.inc" INCSDIR=${INCLUDEDIR}/gcc/${GCCVER} Modified: projects/bhyve/gnu/usr.bin/cc/libcpp/Makefile ============================================================================== --- projects/bhyve/gnu/usr.bin/cc/libcpp/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/usr.bin/cc/libcpp/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + # Use our headers in preference to ones from ../cc_tools. CFLAGS+= -I${.CURDIR} -I. Modified: projects/bhyve/gnu/usr.bin/cc/libdecnumber/Makefile ============================================================================== --- projects/bhyve/gnu/usr.bin/cc/libdecnumber/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/usr.bin/cc/libdecnumber/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + # Use our headers in preference to ones from ../cc_tools. CFLAGS+= -I${.CURDIR} -I. Modified: projects/bhyve/gnu/usr.bin/cc/libiberty/Makefile ============================================================================== --- projects/bhyve/gnu/usr.bin/cc/libiberty/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/gnu/usr.bin/cc/libiberty/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + # # Make sure we will pick up our config.h file first, not the one from # cc_tools. Modified: projects/bhyve/sbin/geom/class/raid/graid.8 ============================================================================== --- projects/bhyve/sbin/geom/class/raid/graid.8 Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/sbin/geom/class/raid/graid.8 Thu Jan 17 19:08:20 2013 (r245569) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 13, 2012 +.Dd January 16, 2013 .Dt GRAID 8 .Os .Sh NAME @@ -274,7 +274,6 @@ complete it there. Do not run GEOM RAID class on migrating volumes under pain of possible data corruption! .Sh 2TiB BARRIERS -Promise metadata format does not support disks above 2TiB. NVIDIA metadata format does not support volumes above 2TiB. .Sh SYSCTL VARIABLES The following Modified: projects/bhyve/secure/lib/libssh/Makefile ============================================================================== --- projects/bhyve/secure/lib/libssh/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/secure/lib/libssh/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -38,6 +38,10 @@ DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX5 LDADD+= -lgssapi -lkrb5 -lhx509 -lasn1 -lcom_err -lmd -lroken .endif +.if ${MK_OPENSSH_NONE_CIPHER} != "no" +CFLAGS+= -DNONE_CIPHER_ENABLED +.endif + NO_LINT= DPADD+= ${LIBCRYPTO} ${LIBCRYPT} Modified: projects/bhyve/secure/usr.bin/ssh/Makefile ============================================================================== --- projects/bhyve/secure/usr.bin/ssh/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/secure/usr.bin/ssh/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -25,6 +25,10 @@ DPADD+= ${LIBGSSAPI} LDADD+= -lgssapi .endif +.if ${MK_OPENSSH_NONE_CIPHER} != "no" +CFLAGS+= -DNONE_CIPHER_ENABLED +.endif + DPADD+= ${LIBCRYPT} ${LIBCRYPTO} LDADD+= -lcrypt -lcrypto Modified: projects/bhyve/secure/usr.sbin/sshd/Makefile ============================================================================== --- projects/bhyve/secure/usr.sbin/sshd/Makefile Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/secure/usr.sbin/sshd/Makefile Thu Jan 17 19:08:20 2013 (r245569) @@ -40,6 +40,10 @@ DPADD+= ${LIBGSSAPI_KRB5} ${LIBGSSAPI} LDADD+= -lgssapi_krb5 -lgssapi -lkrb5 -lasn1 .endif +.if ${MK_OPENSSH_NONE_CIPHER} != "no" +CFLAGS+= -DNONE_CIPHER_ENABLED +.endif + DPADD+= ${LIBCRYPTO} ${LIBCRYPT} LDADD+= -lcrypto -lcrypt Modified: projects/bhyve/share/mk/bsd.man.mk ============================================================================== --- projects/bhyve/share/mk/bsd.man.mk Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/share/mk/bsd.man.mk Thu Jan 17 19:08:20 2013 (r245569) @@ -62,7 +62,7 @@ MROFF_CMD?= groff -Tascii -mtty-char -ma MCOMPRESS_CMD?= ${COMPRESS_CMD} MCOMPRESS_EXT?= ${COMPRESS_EXT} -SECTIONS= 1 1aout 2 3 4 5 6 7 8 9 +SECTIONS= 1 2 3 4 5 6 7 8 9 .SUFFIXES: ${SECTIONS:S/^/./g} # Backwards compatibility. Modified: projects/bhyve/share/mk/bsd.own.mk ============================================================================== --- projects/bhyve/share/mk/bsd.own.mk Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/share/mk/bsd.own.mk Thu Jan 17 19:08:20 2013 (r245569) @@ -343,6 +343,7 @@ __DEFAULT_YES_OPTIONS = \ ZONEINFO __DEFAULT_NO_OPTIONS = \ + ARM_EABI \ BIND_IDN \ BIND_LARGE_FILE \ BIND_LIBS \ @@ -360,6 +361,7 @@ __DEFAULT_NO_OPTIONS = \ NMTREE \ NAND \ OFED \ + OPENSSH_NONE_CIPHER \ SHARED_TOOLCHAIN # Modified: projects/bhyve/share/mk/bsd.prog.mk ============================================================================== --- projects/bhyve/share/mk/bsd.prog.mk Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/share/mk/bsd.prog.mk Thu Jan 17 19:08:20 2013 (r245569) @@ -95,8 +95,7 @@ ${PROG}: ${OBJS} .if ${MK_MAN} != "no" && !defined(MAN) && \ !defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \ !defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \ - !defined(MAN7) && !defined(MAN8) && !defined(MAN9) && \ - !defined(MAN1aout) + !defined(MAN7) && !defined(MAN8) && !defined(MAN9) MAN= ${PROG}.1 MAN1= ${MAN} .endif Modified: projects/bhyve/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- projects/bhyve/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Thu Jan 17 19:08:20 2013 (r245569) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Portions Copyright 2011 Martin Matuska - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -33,7 +33,76 @@ #include /* - * Pool-wide transaction groups. + * ZFS Transaction Groups + * ---------------------- + * + * ZFS transaction groups are, as the name implies, groups of transactions + * that act on persistent state. ZFS asserts consistency at the granularity of + * these transaction groups. Each successive transaction group (txg) is + * assigned a 64-bit consecutive identifier. There are three active + * transaction group states: open, quiescing, or syncing. At any given time, + * there may be an active txg associated with each state; each active txg may + * either be processing, or blocked waiting to enter the next state. There may + * be up to three active txgs, and there is always a txg in the open state + * (though it may be blocked waiting to enter the quiescing state). In broad + * strokes, transactions — operations that change in-memory structures — are + * accepted into the txg in the open state, and are completed while the txg is + * in the open or quiescing states. The accumulated changes are written to + * disk in the syncing state. + * + * Open + * + * When a new txg becomes active, it first enters the open state. New + * transactions — updates to in-memory structures — are assigned to the + * currently open txg. There is always a txg in the open state so that ZFS can + * accept new changes (though the txg may refuse new changes if it has hit + * some limit). ZFS advances the open txg to the next state for a variety of + * reasons such as it hitting a time or size threshold, or the execution of an + * administrative action that must be completed in the syncing state. + * + * Quiescing + * + * After a txg exits the open state, it enters the quiescing state. The + * quiescing state is intended to provide a buffer between accepting new + * transactions in the open state and writing them out to stable storage in + * the syncing state. While quiescing, transactions can continue their + * operation without delaying either of the other states. Typically, a txg is + * in the quiescing state very briefly since the operations are bounded by + * software latencies rather than, say, slower I/O latencies. After all + * transactions complete, the txg is ready to enter the next state. + * + * Syncing + * + * In the syncing state, the in-memory state built up during the open and (to + * a lesser degree) the quiescing states is written to stable storage. The + * process of writing out modified data can, in turn modify more data. For + * example when we write new blocks, we need to allocate space for them; those + * allocations modify metadata (space maps)... which themselves must be + * written to stable storage. During the sync state, ZFS iterates, writing out + * data until it converges and all in-memory changes have been written out. + * The first such pass is the largest as it encompasses all the modified user + * data (as opposed to filesystem metadata). Subsequent passes typically have + * far less data to write as they consist exclusively of filesystem metadata. + * + * To ensure convergence, after a certain number of passes ZFS begins + * overwriting locations on stable storage that had been allocated earlier in + * the syncing state (and subsequently freed). ZFS usually allocates new + * blocks to optimize for large, continuous, writes. For the syncing state to + * converge however it must complete a pass where no new blocks are allocated + * since each allocation requires a modification of persistent metadata. + * Further, to hasten convergence, after a prescribed number of passes, ZFS + * also defers frees, and stops compressing. + * + * In addition to writing out user data, we must also execute synctasks during + * the syncing context. A synctask is the mechanism by which some + * administrative activities work such as creating and destroying snapshots or + * datasets. Note that when a synctask is initiated it enters the open txg, + * and ZFS then pushes that txg as quickly as possible to completion of the + * syncing state in order to reduce the latency of the administrative + * activity. To complete the syncing state, ZFS writes out a new uberblock, + * the root of the tree of blocks that comprise all state stored on the ZFS + * pool. Finally, if there is a quiesced txg waiting, we signal that it can + * now transition to the syncing state. */ static void txg_sync_thread(void *arg); Modified: projects/bhyve/sys/dev/cxgbe/adapter.h ============================================================================== --- projects/bhyve/sys/dev/cxgbe/adapter.h Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/sys/dev/cxgbe/adapter.h Thu Jan 17 19:08:20 2013 (r245569) @@ -647,18 +647,18 @@ struct adapter { #define TXQ_LOCK_ASSERT_OWNED(txq) EQ_LOCK_ASSERT_OWNED(&(txq)->eq) #define TXQ_LOCK_ASSERT_NOTOWNED(txq) EQ_LOCK_ASSERT_NOTOWNED(&(txq)->eq) -#define for_each_txq(pi, iter, txq) \ - txq = &pi->adapter->sge.txq[pi->first_txq]; \ - for (iter = 0; iter < pi->ntxq; ++iter, ++txq) -#define for_each_rxq(pi, iter, rxq) \ - rxq = &pi->adapter->sge.rxq[pi->first_rxq]; \ - for (iter = 0; iter < pi->nrxq; ++iter, ++rxq) -#define for_each_ofld_txq(pi, iter, ofld_txq) \ - ofld_txq = &pi->adapter->sge.ofld_txq[pi->first_ofld_txq]; \ - for (iter = 0; iter < pi->nofldtxq; ++iter, ++ofld_txq) -#define for_each_ofld_rxq(pi, iter, ofld_rxq) \ - ofld_rxq = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq]; \ - for (iter = 0; iter < pi->nofldrxq; ++iter, ++ofld_rxq) +#define for_each_txq(pi, iter, q) \ + q = &pi->adapter->sge.txq[pi->first_txq]; \ + for (iter = 0; iter < pi->ntxq; ++iter, ++q) +#define for_each_rxq(pi, iter, q) \ + q = &pi->adapter->sge.rxq[pi->first_rxq]; \ + for (iter = 0; iter < pi->nrxq; ++iter, ++q) +#define for_each_ofld_txq(pi, iter, q) \ + q = &pi->adapter->sge.ofld_txq[pi->first_ofld_txq]; \ + for (iter = 0; iter < pi->nofldtxq; ++iter, ++q) +#define for_each_ofld_rxq(pi, iter, q) \ + q = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq]; \ + for (iter = 0; iter < pi->nofldrxq; ++iter, ++q) /* One for errors, one for firmware events */ #define T4_EXTRA_INTR 2 Modified: projects/bhyve/sys/dev/cxgbe/t4_main.c ============================================================================== --- projects/bhyve/sys/dev/cxgbe/t4_main.c Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/sys/dev/cxgbe/t4_main.c Thu Jan 17 19:08:20 2013 (r245569) @@ -5492,12 +5492,56 @@ t4_ioctl(struct cdev *dev, unsigned long rc = read_i2c(sc, (struct t4_i2c_data *)data); break; case CHELSIO_T4_CLEAR_STATS: { + int i; u_int port_id = *(uint32_t *)data; + struct port_info *pi; if (port_id >= sc->params.nports) return (EINVAL); + /* MAC stats */ t4_clr_port_stats(sc, port_id); + + pi = sc->port[port_id]; + if (pi->flags & PORT_INIT_DONE) { + struct sge_rxq *rxq; + struct sge_txq *txq; + struct sge_wrq *wrq; + + for_each_rxq(pi, i, rxq) { +#if defined(INET) || defined(INET6) + rxq->lro.lro_queued = 0; + rxq->lro.lro_flushed = 0; +#endif + rxq->rxcsum = 0; + rxq->vlan_extraction = 0; + } + + for_each_txq(pi, i, txq) { + txq->txcsum = 0; + txq->tso_wrs = 0; + txq->vlan_insertion = 0; + txq->imm_wrs = 0; + txq->sgl_wrs = 0; + txq->txpkt_wrs = 0; + txq->txpkts_wrs = 0; + txq->txpkts_pkts = 0; + txq->no_dmamap = 0; + txq->no_desc = 0; + } + +#ifdef TCP_OFFLOAD + /* nothing to clear for each ofld_rxq */ + + for_each_ofld_txq(pi, i, wrq) { + wrq->tx_wrs = 0; + wrq->no_desc = 0; + } +#endif + wrq = &sc->sge.ctrlq[pi->port_id]; + wrq->tx_wrs = 0; + wrq->no_desc = 0; + } break; } default: Modified: projects/bhyve/sys/geom/raid/md_promise.c ============================================================================== --- projects/bhyve/sys/geom/raid/md_promise.c Thu Jan 17 19:03:24 2013 (r245568) +++ projects/bhyve/sys/geom/raid/md_promise.c Thu Jan 17 19:08:20 2013 (r245569) @@ -84,7 +84,7 @@ struct promise_raid_conf { struct promise_raid_disk disk; /* This subdisk info. */ uint32_t disk_offset; /* Subdisk offset. */ uint32_t disk_sectors; /* Subdisk size */ - uint32_t rebuild_lba; /* Rebuild position. */ + uint32_t disk_rebuild; /* Rebuild position. */ uint16_t generation; /* Generation number. */ uint8_t status; /* Volume status. */ #define PROMISE_S_VALID 0x01 @@ -123,7 +123,18 @@ struct promise_raid_conf { uint32_t magic_4; uint32_t magic_5; uint32_t total_sectors_high; - uint32_t filler3[324]; + uint8_t magic_6; + uint8_t sector_size; + uint16_t magic_7; + uint32_t magic_8[31]; + uint32_t backup_time; + uint16_t magic_9; + uint32_t disk_offset_high; + uint32_t disk_sectors_high; + uint32_t disk_rebuild_high; + uint16_t magic_10; + uint32_t magic_11[3]; + uint32_t filler3[284]; uint32_t checksum; } __packed; @@ -191,7 +202,7 @@ g_raid_md_promise_print(struct promise_r meta->disk.device, meta->disk.id); printf("disk_offset %u\n", meta->disk_offset); printf("disk_sectors %u\n", meta->disk_sectors); - printf("rebuild_lba %u\n", meta->rebuild_lba); + printf("disk_rebuild %u\n", meta->disk_rebuild); printf("generation %u\n", meta->generation); printf("status 0x%02x\n", meta->status); printf("type %u\n", meta->type); @@ -217,6 +228,11 @@ g_raid_md_promise_print(struct promise_r printf("magic_4 0x%08x\n", meta->magic_4); printf("magic_5 0x%08x\n", meta->magic_5); printf("total_sectors_high 0x%08x\n", meta->total_sectors_high); + printf("sector_size %u\n", meta->sector_size); + printf("backup_time %d\n", meta->backup_time); + printf("disk_offset_high 0x%08x\n", meta->disk_offset_high); + printf("disk_sectors_high 0x%08x\n", meta->disk_sectors_high); + printf("disk_rebuild_high 0x%08x\n", meta->disk_rebuild_high); printf("=================================================\n"); } @@ -244,9 +260,9 @@ promise_meta_find_disk(struct promise_ra static int promise_meta_unused_range(struct promise_raid_conf **metaarr, int nsd, - uint32_t sectors, uint32_t *off, uint32_t *size) + off_t sectors, off_t *off, off_t *size) { - uint32_t coff, csize; + off_t coff, csize, tmp; int i, j; sectors -= 131072; @@ -257,10 +273,10 @@ promise_meta_unused_range(struct promise i = 0; while (1) { for (j = 0; j < nsd; j++) { - if (metaarr[j]->disk_offset >= coff) { - csize = MIN(csize, - metaarr[j]->disk_offset - coff); - } + tmp = ((off_t)metaarr[j]->disk_offset_high << 32) + + metaarr[j]->disk_offset; + if (tmp >= coff) + csize = MIN(csize, tmp - coff); } if (csize > *size) { *off = coff; @@ -268,7 +284,10 @@ promise_meta_unused_range(struct promise } if (i >= nsd) break; - coff = metaarr[i]->disk_offset + metaarr[i]->disk_sectors; + coff = ((off_t)metaarr[i]->disk_offset_high << 32) + + metaarr[i]->disk_offset + + ((off_t)metaarr[i]->disk_sectors_high << 32) + + metaarr[i]->disk_sectors; csize = sectors - coff; i++; }; @@ -369,6 +388,26 @@ next: return (subdisks); } + /* Remove filler garbage from fields used in newer metadata. */ + if (meta->disk_offset_high == 0x8b8c8d8e && + meta->disk_sectors_high == 0x8788898a && + meta->disk_rebuild_high == 0x83848586) { + meta->disk_offset_high = 0; + meta->disk_sectors_high = 0; + if (meta->disk_rebuild == UINT32_MAX) + meta->disk_rebuild_high = UINT32_MAX; + else + meta->disk_rebuild_high = 0; + if (meta->total_sectors_high == 0x15161718) { + meta->total_sectors_high = 0; + meta->backup_time = 0; + if (meta->rebuild_lba64 == 0x2122232425262728) + meta->rebuild_lba64 = UINT64_MAX; + } + } + if (meta->sector_size < 1 || meta->sector_size > 8) + meta->sector_size = 1; + /* Save this part and look for next. */ *metaarr = meta; metaarr++; @@ -386,8 +425,9 @@ promise_meta_write(struct g_consumer *cp struct g_provider *pp; struct promise_raid_conf *meta; char *buf; + off_t off, size; int error, i, subdisk, fake; - uint32_t checksum, *ptr, off, size; + uint32_t checksum, *ptr; pp = cp->provider; subdisk = 0; @@ -409,9 +449,12 @@ next: meta->disk.flags = PROMISE_F_ONLINE | PROMISE_F_VALID; meta->disk.number = 0xff; arc4rand(&meta->disk.id, sizeof(meta->disk.id), 0); - meta->disk_offset = off; - meta->disk_sectors = size; - meta->rebuild_lba = UINT32_MAX; + meta->disk_offset_high = off >> 32; + meta->disk_offset = (uint32_t)off; + meta->disk_sectors_high = size >> 32; + meta->disk_sectors = (uint32_t)size; + meta->disk_rebuild_high = UINT32_MAX; + meta->disk_rebuild = UINT32_MAX; fake = 1; } if (meta != NULL) { @@ -464,6 +507,7 @@ static int promise_meta_write_spare(struct g_consumer *cp) { struct promise_raid_conf *meta; + off_t tmp; int error; meta = malloc(sizeof(*meta), M_MD_PROMISE, M_WAITOK | M_ZERO); @@ -473,9 +517,11 @@ promise_meta_write_spare(struct g_consum meta->disk.flags = PROMISE_F_SPARE | PROMISE_F_ONLINE | PROMISE_F_VALID; meta->disk.number = 0xff; arc4rand(&meta->disk.id, sizeof(meta->disk.id), 0); - meta->disk_sectors = cp->provider->mediasize / cp->provider->sectorsize; - meta->disk_sectors -= 131072; - meta->rebuild_lba = UINT32_MAX; + tmp = cp->provider->mediasize / cp->provider->sectorsize - 131072; + meta->disk_sectors_high = tmp >> 32; + meta->disk_sectors = (uint32_t)tmp; + meta->disk_rebuild_high = UINT32_MAX; + meta->disk_rebuild = UINT32_MAX; error = promise_meta_write(cp, &meta, 1); free(meta, M_MD_PROMISE); return (error); @@ -617,9 +663,8 @@ g_raid_md_promise_start_disk(struct g_ra struct g_raid_md_promise_perdisk *pd; struct g_raid_md_promise_pervolume *pv; struct promise_raid_conf *meta; - off_t size; + off_t eoff, esize, size; int disk_pos, md_disk_pos, i, resurrection = 0; - uint32_t eoff, esize; sc = disk->d_softc; pd = (struct g_raid_md_promise_perdisk *)disk->d_md_data; @@ -729,8 +774,10 @@ nofit: sd->sd_offset = (off_t)eoff * 512; sd->sd_size = (off_t)esize * 512; } else { - sd->sd_offset = (off_t)pd->pd_meta[sdn]->disk_offset * 512; - sd->sd_size = (off_t)pd->pd_meta[sdn]->disk_sectors * 512; + sd->sd_offset = (((off_t)pd->pd_meta[sdn]->disk_offset_high + << 32) + pd->pd_meta[sdn]->disk_offset) * 512; + sd->sd_size = (((off_t)pd->pd_meta[sdn]->disk_sectors_high + << 32) + pd->pd_meta[sdn]->disk_sectors) * 512; } if (resurrection) { @@ -749,7 +796,8 @@ nofit: sd->sd_rebuild_pos = 0; else { sd->sd_rebuild_pos = - (off_t)pd->pd_meta[sdn]->rebuild_lba * 512; + (((off_t)pd->pd_meta[sdn]->disk_rebuild_high << 32) + + pd->pd_meta[sdn]->disk_rebuild) * 512; } } else if (!(meta->disks[md_disk_pos].flags & PROMISE_F_ONLINE)) { /* Rebuilding disk. */ @@ -875,13 +923,15 @@ g_raid_md_promise_start(struct g_raid_vo vol->v_disks_count = meta->total_disks; vol->v_mediasize = (off_t)meta->total_sectors * 512; //ZZZ if (meta->total_sectors_high < 256) /* If value looks sane. */ - vol->v_mediasize |= + vol->v_mediasize += ((off_t)meta->total_sectors_high << 32) * 512; //ZZZ - vol->v_sectorsize = 512; //ZZZ + vol->v_sectorsize = 512 * meta->sector_size; for (i = 0; i < vol->v_disks_count; i++) { sd = &vol->v_subdisks[i]; - sd->sd_offset = (off_t)meta->disk_offset * 512; //ZZZ - sd->sd_size = (off_t)meta->disk_sectors * 512; //ZZZ + sd->sd_offset = (((off_t)meta->disk_offset_high << 32) + + meta->disk_offset) * 512; + sd->sd_size = (((off_t)meta->disk_sectors_high << 32) + + meta->disk_sectors) * 512; } g_raid_start_volume(vol); @@ -1213,9 +1263,8 @@ g_raid_md_ctl_promise(struct g_raid_md_o const char *nodename, *verb, *volname, *levelname, *diskname; char *tmp; int *nargs, *force; - off_t size, sectorsize, strip; + off_t esize, offs[PROMISE_MAX_DISKS], size, sectorsize, strip; intmax_t *sizearg, *striparg; - uint32_t offs[PROMISE_MAX_DISKS], esize; int numdisks, i, len, level, qual; int error; @@ -1323,13 +1372,6 @@ g_raid_md_ctl_promise(struct g_raid_md_o cp->private = disk; g_topology_unlock(); - if (pp->mediasize / pp->sectorsize > UINT32_MAX) { - gctl_error(req, - "Disk '%s' is too big.", diskname); - error = -8; - break; - } - g_raid_get_disk_info(disk); /* Reserve some space for metadata. */ @@ -1394,10 +1436,6 @@ g_raid_md_ctl_promise(struct g_raid_md_o gctl_error(req, "Size too small."); return (-13); } - if (size > 0xffffffffllu * sectorsize) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***