svn commit: r275559 - stable/10/sys/dev/iscsi
Author: mav Date: Sat Dec 6 07:30:08 2014 New Revision: 275559 URL: https://svnweb.freebsd.org/changeset/base/275559 Log: MFC r274843, r274845: Move icl_pdu_get_data() and xpt_done() out of initiator's session lock. During heavy reads data copying in icl_pdu_get_data() may consume large percent of CPU time. Moving it out of the lock significantly reduces lock hold time and respectively lock congestion on read operations. Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c == --- stable/10/sys/dev/iscsi/iscsi.c Sat Dec 6 04:02:56 2014 (r275558) +++ stable/10/sys/dev/iscsi/iscsi.c Sat Dec 6 07:30:08 2014 (r275559) @@ -144,6 +144,7 @@ static uma_zone_t iscsi_outstanding_zone #define ISCSI_SESSION_LOCK(X) mtx_lock(&X->is_lock) #define ISCSI_SESSION_UNLOCK(X)mtx_unlock(&X->is_lock) #define ISCSI_SESSION_LOCK_ASSERT(X) mtx_assert(&X->is_lock, MA_OWNED) +#define ISCSI_SESSION_LOCK_ASSERT_NOT(X) mtx_assert(&X->is_lock, MA_NOTOWNED) static int iscsi_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int mode, struct thread *td); @@ -714,37 +715,46 @@ iscsi_receive_callback(struct icl_pdu *r switch (response->ip_bhs->bhs_opcode) { case ISCSI_BHS_OPCODE_NOP_IN: iscsi_pdu_handle_nop_in(response); + ISCSI_SESSION_UNLOCK(is); break; case ISCSI_BHS_OPCODE_SCSI_RESPONSE: iscsi_pdu_handle_scsi_response(response); + /* Session lock dropped inside. */ + ISCSI_SESSION_LOCK_ASSERT_NOT(is); break; case ISCSI_BHS_OPCODE_TASK_RESPONSE: iscsi_pdu_handle_task_response(response); + ISCSI_SESSION_UNLOCK(is); break; case ISCSI_BHS_OPCODE_SCSI_DATA_IN: iscsi_pdu_handle_data_in(response); + /* Session lock dropped inside. */ + ISCSI_SESSION_LOCK_ASSERT_NOT(is); break; case ISCSI_BHS_OPCODE_LOGOUT_RESPONSE: iscsi_pdu_handle_logout_response(response); + ISCSI_SESSION_UNLOCK(is); break; case ISCSI_BHS_OPCODE_R2T: iscsi_pdu_handle_r2t(response); + ISCSI_SESSION_UNLOCK(is); break; case ISCSI_BHS_OPCODE_ASYNC_MESSAGE: iscsi_pdu_handle_async_message(response); + ISCSI_SESSION_UNLOCK(is); break; case ISCSI_BHS_OPCODE_REJECT: iscsi_pdu_handle_reject(response); + ISCSI_SESSION_UNLOCK(is); break; default: ISCSI_SESSION_WARN(is, "received PDU with unsupported " "opcode 0x%x; reconnecting", response->ip_bhs->bhs_opcode); iscsi_session_reconnect(is); + ISCSI_SESSION_UNLOCK(is); icl_pdu_free(response); } - - ISCSI_SESSION_UNLOCK(is); } static void @@ -833,8 +843,9 @@ iscsi_pdu_handle_scsi_response(struct ic struct iscsi_bhs_scsi_response *bhssr; struct iscsi_outstanding *io; struct iscsi_session *is; + union ccb *ccb; struct ccb_scsiio *csio; - size_t data_segment_len; + size_t data_segment_len, received; uint16_t sense_len; is = PDU_SESSION(response); @@ -845,46 +856,44 @@ iscsi_pdu_handle_scsi_response(struct ic ISCSI_SESSION_WARN(is, "bad itt 0x%x", bhssr->bhssr_initiator_task_tag); icl_pdu_free(response); iscsi_session_reconnect(is); + ISCSI_SESSION_UNLOCK(is); return; } + ccb = io->io_ccb; + received = io->io_received; + iscsi_outstanding_remove(is, io); + ISCSI_SESSION_UNLOCK(is); + if (bhssr->bhssr_response != BHSSR_RESPONSE_COMMAND_COMPLETED) { ISCSI_SESSION_WARN(is, "service response 0x%x", bhssr->bhssr_response); - if ((io->io_ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { - xpt_freeze_devq(io->io_ccb->ccb_h.path, 1); + if ((ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { + xpt_freeze_devq(ccb->ccb_h.path, 1); ISCSI_SESSION_DEBUG(is, "freezing devq"); } - io->io_ccb->ccb_h.status = CAM_REQ_CMP_ERR | CAM_DEV_QFRZN; + ccb->ccb_h.status = CAM_REQ_CMP_ERR | CAM_DEV_QFRZN; } else if (bhssr->bhssr_status == 0) { - io->io_ccb->ccb_h.status = CAM_REQ_CMP; + ccb->ccb_h.status = CAM_REQ_CMP; } else { - if ((io->io_ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { - xpt_freeze_devq(io->io_ccb->ccb_h.path, 1);
svn commit: r275557 - head/share/mk
Author: ngie Date: Sat Dec 6 03:15:46 2014 New Revision: 275557 URL: https://svnweb.freebsd.org/changeset/base/275557 Log: Fix typos in comments and wrap to <80 columns MFC after: 3 days Modified: head/share/mk/bsd.compiler.mk Directory Properties: head/ (props changed) head/share/ (props changed) Modified: head/share/mk/bsd.compiler.mk == --- head/share/mk/bsd.compiler.mk Sat Dec 6 03:12:57 2014 (r275556) +++ head/share/mk/bsd.compiler.mk Sat Dec 6 03:15:46 2014 (r275557) @@ -2,18 +2,22 @@ # Setup variables for the compiler # -# COMPILTER_TYPE is the major type of compiler. Currently gcc and clang support -# automatic detetion. Other compiler types can be shoe-horned in, but require explicit -# setting of the compiler type. The compiler type can also be set explicitly if, say, -# you install gcc as clang... -# -# COMPILER_VERSION is a numeric constant equal to major * 1 + minor * 100 + tiny. It -# too can be overriden on the command line. When testing it, be sure to make sure that you -# are limiting the test to a specific compiler. Testing against 30300 for gcc likely isn't -# what you wanted (since versions of gcc prior to 4.2 likely have no prayer of working). +# COMPILER_TYPE is the major type of compiler. Currently gcc and clang support +# automatic detection. Other compiler types can be shoe-horned in, but require +# explicit setting of the compiler type. The compiler type can also be set +# explicitly if, say, you install gcc as clang... # -# COMPILER_FEATURES will contain one or more of the following, based on compiler support -# for that feature: c++11 (supports full (or nearly full) C++11 programming environment). +# COMPILER_VERSION is a numeric constant equal to: +# major * 1 + minor * 100 + tiny +# It too can be overriden on the command line. When testing it, be sure to +# make sure that you are limiting the test to a specific compiler. Testing +# against 30300 for gcc likely isn't what you wanted (since versions of gcc +# prior to 4.2 likely have no prayer of working). +# +# COMPILER_FEATURES will contain one or more of the following, based on +# compiler support for that feature: +# +# - c++11 : supports full (or nearly full) C++11 programming environment. # # This file may be included multiple times, but only has effect the first time. # ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275555 - head/sys/netinet
Author: rodrigc Date: Sat Dec 6 02:59:59 2014 New Revision: 27 URL: https://svnweb.freebsd.org/changeset/base/27 Log: MFp4: @181627 Allow UMA allocated memory to be freed when VNET jails are torn down. Differential Revision: D1201 Submitted by: bz Reviewed by: rwatson, gnn Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c == --- head/sys/netinet/udp_usrreq.c Sat Dec 6 01:47:38 2014 (r275554) +++ head/sys/netinet/udp_usrreq.c Sat Dec 6 02:59:59 2014 (r27) @@ -216,10 +216,10 @@ udp_init(void) * a 4-tuple, flip this to 4-tuple. */ in_pcbinfo_init(&V_udbinfo, "udp", &V_udb, UDBHASHSIZE, UDBHASHSIZE, - "udp_inpcb", udp_inpcb_init, NULL, UMA_ZONE_NOFREE, + "udp_inpcb", udp_inpcb_init, NULL, 0, IPI_HASHFIELDS_2TUPLE); V_udpcb_zone = uma_zcreate("udpcb", sizeof(struct udpcb), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); uma_zone_set_max(V_udpcb_zone, maxsockets); uma_zone_set_warning(V_udpcb_zone, "kern.ipc.maxsockets limit reached"); EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL, @@ -232,7 +232,7 @@ udplite_init(void) in_pcbinfo_init(&V_ulitecbinfo, "udplite", &V_ulitecb, UDBHASHSIZE, UDBHASHSIZE, "udplite_inpcb", udplite_inpcb_init, NULL, - UMA_ZONE_NOFREE, IPI_HASHFIELDS_2TUPLE); + 0, IPI_HASHFIELDS_2TUPLE); } /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275554 - head/sys/dev/cxgbe
Author: np Date: Sat Dec 6 01:47:38 2014 New Revision: 275554 URL: https://svnweb.freebsd.org/changeset/base/275554 Log: cxgbe(4): allow the driver to use rx buffers that do not end on a pack boundary. MFC after:2 weeks Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h == --- head/sys/dev/cxgbe/adapter.hSat Dec 6 01:21:12 2014 (r275553) +++ head/sys/dev/cxgbe/adapter.hSat Dec 6 01:47:38 2014 (r275554) @@ -148,7 +148,7 @@ enum { #else SW_ZONE_SIZES = 3, /* cluster, jumbo9k, jumbo16k */ #endif - CL_METADATA_SIZE = 256, /* same as MSIZE for now */ + CL_METADATA_SIZE = CACHE_LINE_SIZE, SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */ TX_SGL_SEGS = 36, Modified: head/sys/dev/cxgbe/t4_sge.c == --- head/sys/dev/cxgbe/t4_sge.c Sat Dec 6 01:21:12 2014(r275553) +++ head/sys/dev/cxgbe/t4_sge.c Sat Dec 6 01:47:38 2014(r275554) @@ -489,24 +489,17 @@ t4_tweak_chip_settings(struct adapter *s /* * SGE wants the buffer to be at least 64B and then a multiple of 16. If - * padding and packing are enabled, the buffer's start and end need to be - * correctly aligned as well. We'll just make sure that the size is a multiple - * of the alignment, it is up to other parts . + * padding is is use the buffer's start and end need to be aligned to the pad + * boundary as well. We'll just make sure that the size is a multiple of the + * boundary here, it is up to the buffer allocation code to make sure the start + * of the buffer is aligned as well. */ static inline int hwsz_ok(struct adapter *sc, int hwsz) { - int align = 16; - - if (fl_pad) { - MPASS(sc->sge.pad_boundary > align); - align = sc->sge.pad_boundary; - } - if (buffer_packing && sc->sge.pack_boundary > align) - align = sc->sge.pack_boundary; - align--;/* now a mask */ - return (hwsz >= 64 && (hwsz & align) == 0); + int mask = fl_pad ? sc->sge.pad_boundary - 1 : 16 - 1; + return (hwsz >= 64 && (hwsz & mask) == 0); } /* @@ -600,9 +593,6 @@ t4_read_chip_settings(struct adapter *sc MPASS(powerof2(swz->size)); if (fl_pad && (swz->size % sc->sge.pad_boundary != 0)) continue; - if (buffer_packing && - (swz->size % sc->sge.pack_boundary != 0)) - continue; } if (swz->size == safest_rx_cluster) @@ -615,8 +605,6 @@ t4_read_chip_settings(struct adapter *sc #ifdef INVARIANTS if (fl_pad) MPASS(hwb->size % sc->sge.pad_boundary == 0); - if (buffer_packing) - MPASS(hwb->size % sc->sge.pack_boundary == 0); #endif hwb->zidx = i; if (head == -1) @@ -668,8 +656,6 @@ t4_read_chip_settings(struct adapter *sc #ifdef INVARIANTS if (fl_pad) MPASS(hwb->size % sc->sge.pad_boundary == 0); - if (buffer_packing) - MPASS(hwb->size % sc->sge.pack_boundary == 0); #endif spare = safe_swz->size - hwb->size; if (spare >= CL_METADATA_SIZE) { @@ -1571,7 +1557,8 @@ rxb_free(struct mbuf *m, void *arg1, voi * d) m_extaddref (cluster with metadata) zone_mbuf */ static struct mbuf * -get_scatter_segment(struct adapter *sc, struct sge_fl *fl, int total, int flags) +get_scatter_segment(struct adapter *sc, struct sge_fl *fl, int fr_offset, +int remaining) { struct mbuf *m; struct fl_sdesc *sd = &fl->sdesc[fl->cidx]; @@ -1579,26 +1566,31 @@ get_scatter_segment(struct adapter *sc, struct sw_zone_info *swz = &sc->sge.sw_zone_info[cll->zidx]; struct hw_buf_info *hwb = &sc->sge.hw_buf_info[cll->hwidx]; struct cluster_metadata *clm = cl_metadata(sc, fl, cll, sd->cl); - int len, padded_len; + int len, blen; caddr_t payload; - len = min(total, hwb->size - fl->rx_offset); + blen = hwb->size - fl->rx_offset; /* max possible in this buf */ + len = min(remaining, blen); payload = sd->cl + cll->region1 + fl->rx_offset; if (fl->flags & FL_BUF_PACKING) { - padded_len = roundup2(len, fl->buf_boundary); - MPASS(fl->rx_offset + padded_len <= hwb->size); + const u_int l = fr_offset + len; + const u_int pad = roundup2(l, fl->buf_boundary) - l; + + if (fl->rx_offset + len + pad < hwb->size) +
svn commit: r275553 - head/usr.bin/patch
Author: pfg Date: Sat Dec 6 01:21:12 2014 New Revision: 275553 URL: https://svnweb.freebsd.org/changeset/base/275553 Log: Merge fixes from OpenBSD. Check fstat return value. Also, use off_t for file size and offsets. Avoid iterating over end of string. Obtained from:OpenBSD (CVS rev. 1.41, 1.43) MFC after:1 week Modified: head/usr.bin/patch/pch.c Modified: head/usr.bin/patch/pch.c == --- head/usr.bin/patch/pch.cSat Dec 6 01:01:51 2014(r275552) +++ head/usr.bin/patch/pch.cSat Dec 6 01:21:12 2014(r275553) @@ -46,7 +46,7 @@ /* Patch (diff listing) abstract type. */ -static longp_filesize; /* size of the patch file */ +static off_t p_filesize; /* size of the patch file */ static LINENUM p_first;/* 1st line number */ static LINENUM p_newfirst; /* 1st line number of replacement */ static LINENUM p_ptrn_lines; /* # lines in pattern */ @@ -60,9 +60,9 @@ static unsigned short *p_len = NULL; /* static char*p_char = NULL; /* +, -, and ! */ static int hunkmax = INITHUNKMAX; /* size of above arrays to begin with */ static int p_indent; /* indent to patch */ -static LINENUM p_base; /* where to intuit this time */ +static off_t p_base; /* where to intuit this time */ static LINENUM p_bline;/* line # of p_base */ -static LINENUM p_start;/* where intuit found a patch */ +static off_t p_start;/* where intuit found a patch */ static LINENUM p_sline;/* and the line number for it */ static LINENUM p_hunk_beg; /* line number of current hunk */ static LINENUM p_efake = -1; /* end of faked up lines--don't free */ @@ -72,8 +72,8 @@ static char *bestguess = NULL; /* guess static voidgrow_hunkmax(void); static int intuit_diff_type(void); -static voidnext_intuit_at(LINENUM, LINENUM); -static voidskip_to(LINENUM, LINENUM); +static voidnext_intuit_at(off_t, LINENUM); +static voidskip_to(off_t, LINENUM); static size_t pgets(bool _do_indent); static char*best_name(const struct file_name *, bool); static char*posix_name(const struct file_name *, bool); @@ -119,9 +119,10 @@ open_patch_file(const char *filename) pfp = fopen(filename, "r"); if (pfp == NULL) pfatal("patch file %s not found", filename); - fstat(fileno(pfp), &filestat); + if (fstat(fileno(pfp), &filestat)) + pfatal("can't stat %s", filename); p_filesize = filestat.st_size; - next_intuit_at(0L, 1L); /* start at the beginning */ + next_intuit_at(0, 1L); /* start at the beginning */ set_hunkmax(); } @@ -172,7 +173,7 @@ there_is_another_patch(void) { bool exists = false; - if (p_base != 0L && p_base >= p_filesize) { + if (p_base != 0 && p_base >= p_filesize) { if (verbose) say("done\n"); return false; @@ -181,7 +182,7 @@ there_is_another_patch(void) say("Hmm..."); diff_type = intuit_diff_type(); if (!diff_type) { - if (p_base != 0L) { + if (p_base != 0) { if (verbose) say(" Ignoring the trailing garbage.\ndone\n"); } else @@ -190,7 +191,7 @@ there_is_another_patch(void) } if (verbose) say(" %sooks like %s to me...\n", - (p_base == 0L ? "L" : "The next patch l"), + (p_base == 0 ? "L" : "The next patch l"), diff_type == UNI_DIFF ? "a unified diff" : diff_type == CONTEXT_DIFF ? "a context diff" : diff_type == NEW_CONTEXT_DIFF ? "a new-style context diff" : @@ -252,8 +253,8 @@ p4_fetchname(struct file_name *name, cha static int intuit_diff_type(void) { - longthis_line = 0, previous_line; - longfirst_command_line = -1; + off_t this_line = 0, previous_line; + off_t first_command_line = -1; LINENUM fcl_line = -1; boollast_line_was_command = false, this_is_a_command = false; boolstars_last_line = false, stars_this_line = false; @@ -263,17 +264,17 @@ intuit_diff_type(void) memset(names, 0, sizeof(names)); ok_to_create_file = false; - fseek(pfp, p_base, SEEK_SET); + fseeko(pfp, p_base, SEEK_SET); p_input_line = p_bline - 1; for (;;) { previous_line = this_line; last_line_was_command = this_is_a_command; stars_last_line = stars_this_line; - this_line = ftell(pfp); + this_line = ftello(pfp); indent = 0; p_input_line++; if (pgets(false) == 0) { - if (first_command_line >= 0L) { + if (first_comman
svn commit: r275552 - in head/cddl: contrib/opensolaris/lib/libnvpair lib/libnvpair
Author: delphij Date: Sat Dec 6 01:01:51 2014 New Revision: 275552 URL: https://svnweb.freebsd.org/changeset/base/275552 Log: MFV r260710 + 275532: Add a new method, nvlist_print_json to allow libnvpair to emit JSON. MFC after:1 month Added: head/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c - copied, changed from r260710, vendor/illumos/dist/lib/libnvpair/nvpair_json.c Modified: head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.h head/cddl/lib/libnvpair/Makefile Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.h == --- head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.h Sat Dec 6 00:50:57 2014(r275551) +++ head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.h Sat Dec 6 01:01:51 2014(r275552) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifndef_LIBNVPAIR_H @@ -46,6 +47,7 @@ extern int nvpair_value_match_regex(nvpa char **); extern void nvlist_print(FILE *, nvlist_t *); +extern int nvlist_print_json(FILE *, nvlist_t *); extern void dump_nvlist(nvlist_t *, int); /* Copied and modified: head/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c (from r260710, vendor/illumos/dist/lib/libnvpair/nvpair_json.c) == --- vendor/illumos/dist/lib/libnvpair/nvpair_json.c Thu Jan 16 13:12:06 2014(r260710, copy source) +++ head/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c Sat Dec 6 01:01:51 2014(r275552) @@ -9,7 +9,7 @@ * http://www.illumos.org/license/CDDL. */ /* - * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2014, Joyent, Inc. */ #include @@ -20,9 +20,11 @@ #include "libnvpair.h" -#defineFPRINTF(fp, ...)\ - if (fprintf(fp, __VA_ARGS__) < 0) \ - return (-1) \ +#defineFPRINTF(fp, ...)\ + do {\ + if (fprintf(fp, __VA_ARGS__) < 0) \ + return (-1);\ + } while (0) /* * When formatting a string for JSON output we must escape certain characters, @@ -300,7 +302,7 @@ nvlist_print_json(FILE *fp, nvlist_t *nv for (i = 0; i < valsz; i++) { if (i > 0) FPRINTF(fp, ","); - FPRINTF(fp, "%hd", val[i]); + FPRINTF(fp, "%hhd", val[i]); } FPRINTF(fp, "]"); break; @@ -328,7 +330,7 @@ nvlist_print_json(FILE *fp, nvlist_t *nv for (i = 0; i < valsz; i++) { if (i > 0) FPRINTF(fp, ","); - FPRINTF(fp, "%hhd", val[i]); + FPRINTF(fp, "%hd", val[i]); } FPRINTF(fp, "]"); break; Modified: head/cddl/lib/libnvpair/Makefile == --- head/cddl/lib/libnvpair/MakefileSat Dec 6 00:50:57 2014 (r275551) +++ head/cddl/lib/libnvpair/MakefileSat Dec 6 01:01:51 2014 (r275552) @@ -9,6 +9,7 @@ SRCS= libnvpair.c \ nvpair_alloc_system.c \ nvpair_alloc_fixed.c \ nvpair.c \ + nvpair_json.c \ fnvpair.c WARNS?=0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275551 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zdb
Author: delphij Date: Sat Dec 6 00:50:57 2014 New Revision: 275551 URL: https://svnweb.freebsd.org/changeset/base/275551 Log: 5314 Remove "dbuf phys" db->db_data pointer aliases in ZFS Reviewed by: Andriy Gapon Reviewed by: Matthew Ahrens Reviewed by: Will Andrews Approved by: Dan McDonald Author: Justin T. Gibbs illumos/illumos-gate@c1379625401dfbe1c39b79136dd384a571d47fde Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_diff.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_bookmark.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_deadlist.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_deleg.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_synctask.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_userhold.c vendor-sys/illumos/dist/uts/common/fs/zfs/sa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dir.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_leaf.h vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_leaf.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/zdb/zdb.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.cSat Dec 6 00:47:31 2014(r275550) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.cSat Dec 6 00:50:57 2014(r275551) @@ -223,11 +223,8 @@ dbuf_evict_user(dmu_buf_impl_t *db) if (db->db_level != 0 || db->db_evict_func == NULL) return; - if (db->db_user_data_ptr_ptr) - *db->db_user_data_ptr_ptr = db->db.db_data; db->db_evict_func(&db->db, db->db_user_ptr); db->db_user_ptr = NULL; - db->db_user_data_ptr_ptr = NULL; db->db_evict_func = NULL; } @@ -418,16 +415,6 @@ dbuf_verify(dmu_buf_impl_t *db) #endif static void -dbuf_update_data(dmu_buf_impl_t *db) -{ - ASSERT(MUTEX_HELD(&db->db_mtx)); - if (db->db_level == 0 && db->db_user_data_ptr_ptr) { - ASSERT(!refcount_is_zero(&db->db_holds)); - *db->db_user_data_ptr_ptr = db->db.db_data; - } -} - -static void dbuf_set_data(dmu_buf_impl_t *db, arc_buf_t *buf) { ASSERT(MUTEX_HELD(&db->db_mtx)); @@ -437,7 +424,6 @@ dbuf_set_data(dmu_buf_impl_t *db, arc_bu db->db.db_data = buf->b_data; if (!arc_released(buf)) arc_set_callback(buf, dbuf_do_evict, db); - dbuf_update_data(db); } else { dbuf_evict_user(db); db->db.db_data = NULL; @@ -543,7 +529,6 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t if (bonuslen) bcopy(DN_BONUS(dn->dn_phys), db->db.db_data, bonuslen); DB_DNODE_EXIT(db); - dbuf_update_data(db); db->db_state = DB_CACHED; mutex_exit(&db->db_mtx); return; @@ -1726,7 +1711,6 @@ dbuf_create(dnode_t *dn, uint8_t level, db->db_blkptr = blkptr; db->db_user_ptr = NULL; - db->db_user_data_ptr_ptr = NULL; db->db_evict_func = NULL; db->db_immediate_evict = 0; db->db_freed_in_flight = 0; @@ -1971,7 +1955,6 @@ top: } (void) refcount_add(&db->db_holds, tag); - dbuf_update_data(db); DBUF_VERIFY(db); mutex_exit(&db->db_mtx); @@ -2182,27 +2165,25 @@ dbuf_refcount(dmu_buf_impl_t *db) } void * -dmu_buf_set_user(dmu_buf_t *db_fake, void *user_ptr, void *user_data_ptr_ptr, +dmu_buf_set_user(dmu_buf_t *db_fake, void *user_ptr, dmu_buf_evict_func_t *evict_func) { - return (dmu_buf_update_user(db_fake, NULL, user_ptr, - user_data_ptr_ptr, evict_func)); + return (dmu_buf_update_user(db_fake, NULL, user_ptr,
svn commit: r275551 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zdb
Author: delphij Date: Sat Dec 6 00:50:57 2014 New Revision: 275551 URL: https://svnweb.freebsd.org/changeset/base/275551 Log: 5314 Remove "dbuf phys" db->db_data pointer aliases in ZFS Reviewed by: Andriy Gapon Reviewed by: Matthew Ahrens Reviewed by: Will Andrews Approved by: Dan McDonald Author: Justin T. Gibbs illumos/illumos-gate@c1379625401dfbe1c39b79136dd384a571d47fde Modified: vendor/illumos/dist/cmd/zdb/zdb.c Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_diff.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_bookmark.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_deadlist.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_deleg.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_synctask.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_userhold.c vendor-sys/illumos/dist/uts/common/fs/zfs/sa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_history.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dir.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_leaf.h vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_leaf.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Modified: vendor/illumos/dist/cmd/zdb/zdb.c == --- vendor/illumos/dist/cmd/zdb/zdb.c Sat Dec 6 00:47:31 2014 (r275550) +++ vendor/illumos/dist/cmd/zdb/zdb.c Sat Dec 6 00:50:57 2014 (r275551) @@ -1857,8 +1857,8 @@ dump_dir(objset_t *os) if (dds.dds_type == DMU_OST_META) { dds.dds_creation_txg = TXG_INITIAL; usedobjs = BP_GET_FILL(os->os_rootbp); - refdbytes = os->os_spa->spa_dsl_pool-> - dp_mos_dir->dd_phys->dd_used_bytes; + refdbytes = dsl_dir_phys(os->os_spa->spa_dsl_pool->dp_mos_dir)-> + dd_used_bytes; } else { dmu_objset_space(os, &refdbytes, &scratch, &usedobjs, &scratch); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275550 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys
Author: delphij Date: Sat Dec 6 00:47:31 2014 New Revision: 275550 URL: https://svnweb.freebsd.org/changeset/base/275550 Log: 5347 idle pool may run itself out of space Reviewed by: Alex Reece Reviewed by: George Wilson Reviewed by: Steven Hartland Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@231aab857f14a3e7a0ed5f2879399c3cd6ae92ea Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/uberblock.h vendor-sys/illumos/dist/uts/common/fs/zfs/uberblock.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.cSat Dec 6 00:45:27 2014(r275549) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.cSat Dec 6 00:47:31 2014(r275550) @@ -1449,13 +1449,6 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * "traverse_dataset_destroyed()", err); } - /* -* If we didn't make progress, mark the async destroy as -* stalled, so that we will not initiate a spa_sync() on -* its behalf. -*/ - scn->scn_async_stalled = (scn->scn_visited_this_txg == 0); - if (bptree_is_empty(dp->dp_meta_objset, dp->dp_bptree_obj)) { /* finished; deactivate async destroy feature */ spa_feature_decr(spa, SPA_FEATURE_ASYNC_DESTROY, tx); @@ -1468,6 +1461,18 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * dp->dp_bptree_obj, tx)); dp->dp_bptree_obj = 0; scn->scn_async_destroying = B_FALSE; + scn->scn_async_stalled = B_FALSE; + } else { + /* +* If we didn't make progress, mark the async +* destroy as stalled, so that we will not initiate +* a spa_sync() on its behalf. Note that we only +* check this if we are not finished, because if the +* bptree had no blocks for us to visit, we can +* finish without "making progress". +*/ + scn->scn_async_stalled = + (scn->scn_visited_this_txg == 0); } } if (scn->scn_visited_this_txg) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Sat Dec 6 00:45:27 2014(r275549) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c Sat Dec 6 00:47:31 2014(r275550) @@ -6262,21 +6262,6 @@ spa_sync(spa_t *spa, uint64_t txg) } /* -* If anything has changed in this txg, or if someone is waiting -* for this txg to sync (eg, spa_vdev_remove()), push the -* deferred frees from the previous txg. If not, leave them -* alone so that we don't generate work on an otherwise idle -* system. -*/ - if (!txg_list_empty(&dp->dp_dirty_datasets, txg) || - !txg_list_empty(&dp->dp_dirty_dirs, txg) || - !txg_list_empty(&dp->dp_sync_tasks, txg) || - ((dsl_scan_active(dp->dp_scan) || - txg_sync_waiting(dp)) && !spa_shutting_down(spa))) { - spa_sync_deferred_frees(spa, tx); - } - - /* * Iterate to convergence. */ do { @@ -6293,6 +6278,11 @@ spa_sync(spa_t *spa, uint64_t txg) if (pass < zfs_sync_pass_deferred_free) { spa_sync_frees(spa, free_bpl, tx); } else { + /* +* We can not defer frees in pass 1, because +* we sync the deferred frees later in pass 1. +*/ + ASSERT3U(pass, >, 1); bplist_iterate(free_bpl, bpobj_enqueue_cb, &spa->spa_deferred_bpobj, tx); } @@ -6303,8 +6293,37 @@ spa_sync(spa_t *spa, uint64_t txg) while (vd = txg_list_remove(&spa->spa_vdev_txg_list, txg)) vdev_sync(vd, txg); - if (pass == 1) + if (pass == 1) { spa_sync_upgrades(spa, tx); + ASSERT3U(txg, >=, + spa->spa_uberblock.ub_rootbp.blk_birth); + /* +* Note: We need to check if the MOS is dirty +* because we could have marked the MOS dirty +* without updating the ube
svn commit: r275549 - vendor-sys/illumos/dist/uts/common/fs/zfs
Author: delphij Date: Sat Dec 6 00:45:27 2014 New Revision: 275549 URL: https://svnweb.freebsd.org/changeset/base/275549 Log: 5368 ARC should cache more metadata Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@3a5286a1cffceafcd8cf79c4156fad605129bf50 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Sat Dec 6 00:42:30 2014(r275548) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Sat Dec 6 00:45:27 2014(r275549) @@ -196,6 +196,7 @@ static boolean_t arc_warm; uint64_t zfs_arc_max; uint64_t zfs_arc_min; uint64_t zfs_arc_meta_limit = 0; +uint64_t zfs_arc_meta_min = 0; int zfs_arc_grow_retry = 0; int zfs_arc_shrink_shift = 0; int zfs_arc_p_min_shift = 0; @@ -324,6 +325,7 @@ typedef struct arc_stats { kstat_named_t arcstat_meta_used; kstat_named_t arcstat_meta_limit; kstat_named_t arcstat_meta_max; + kstat_named_t arcstat_meta_min; } arc_stats_t; static arc_stats_t arc_stats = { @@ -389,7 +391,8 @@ static arc_stats_t arc_stats = { { "duplicate_reads",KSTAT_DATA_UINT64 }, { "arc_meta_used", KSTAT_DATA_UINT64 }, { "arc_meta_limit", KSTAT_DATA_UINT64 }, - { "arc_meta_max", KSTAT_DATA_UINT64 } + { "arc_meta_max", KSTAT_DATA_UINT64 }, + { "arc_meta_min", KSTAT_DATA_UINT64 } }; #defineARCSTAT(stat) (arc_stats.stat.value.ui64) @@ -452,6 +455,7 @@ static arc_state_t *arc_l2c_only; #definearc_c_min ARCSTAT(arcstat_c_min) /* min target cache size */ #definearc_c_max ARCSTAT(arcstat_c_max) /* max target cache size */ #definearc_meta_limit ARCSTAT(arcstat_meta_limit) /* max size for metadata */ +#definearc_meta_minARCSTAT(arcstat_meta_min) /* min size for metadata */ #definearc_meta_used ARCSTAT(arcstat_meta_used) /* size of metadata */ #definearc_meta_maxARCSTAT(arcstat_meta_max) /* max size of metadata */ @@ -1779,7 +1783,6 @@ arc_evict(arc_state_t *state, uint64_t s arc_state_t *evicted_state; uint64_t bytes_evicted = 0, skipped = 0, missed = 0; arc_buf_hdr_t *ab, *ab_prev = NULL; - list_t *list = &state->arcs_list[type]; kmutex_t *hash_lock; boolean_t have_lock; void *stolen = NULL; @@ -1793,6 +1796,50 @@ arc_evict(arc_state_t *state, uint64_t s mutex_enter(&state->arcs_mtx); mutex_enter(&evicted_state->arcs_mtx); + /* +* Decide which "type" (data vs metadata) to recycle from. +* +* If we are over the metadata limit, recycle from metadata. +* If we are under the metadata minimum, recycle from data. +* Otherwise, recycle from whichever type has the oldest (least +* recently accessed) header. +*/ + if (recycle) { + arc_buf_hdr_t *data_hdr = + list_tail(&state->arcs_list[ARC_BUFC_DATA]); + arc_buf_hdr_t *metadata_hdr = + list_tail(&state->arcs_list[ARC_BUFC_METADATA]); + arc_buf_contents_t realtype; + if (data_hdr == NULL) { + realtype = ARC_BUFC_METADATA; + } else if (metadata_hdr == NULL) { + realtype = ARC_BUFC_DATA; + } else if (arc_meta_used >= arc_meta_limit) { + realtype = ARC_BUFC_METADATA; + } else if (arc_meta_used <= arc_meta_min) { + realtype = ARC_BUFC_DATA; + } else { + if (data_hdr->b_arc_access < + metadata_hdr->b_arc_access) { + realtype = ARC_BUFC_DATA; + } else { + realtype = ARC_BUFC_METADATA; + } + } + if (realtype != type) { + /* +* If we want to evict from a different list, +* we can not recycle, because DATA vs METADATA +* buffers are segregated into different kmem +* caches (and vmem arenas). +*/ + type = realtype; + recycle = B_FALSE; + } + } + + list_t *list = &state->arcs_list[type]; + for (ab = list_tail(list); ab; ab = ab_prev) { ab_prev = list_prev(list, ab); /* prefetch buffers have a minimum lifespan */ @@ -3755,6 +3802,12 @@ arc_init(void) if (arc_
svn commit: r275548 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys
Author: delphij Date: Sat Dec 6 00:42:30 2014 New Revision: 275548 URL: https://svnweb.freebsd.org/changeset/base/275548 Log: 5349 verify that block pointer is plausible before reading Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: Dan McDonald Reviewed by: George Wilson Reviewed by: Richard Lowe Reviewed by: Xin Li Reviewed by: Josef 'Jeff' Sipek Approved by: Gordon Ross Author: Matthew Ahrens illumos/illumos-gate@f63ab3d5a84a12b474655fc7e700db3efba6c4c9 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h == --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h Sat Dec 6 00:38:55 2014(r275547) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h Sat Dec 6 00:42:30 2014(r275548) @@ -791,6 +791,7 @@ extern boolean_t spa_is_root(spa_t *spa) extern boolean_t spa_writeable(spa_t *spa); extern boolean_t spa_has_pending_synctask(spa_t *spa); extern int spa_maxblocksize(spa_t *spa); +extern void zfs_blkptr_verify(spa_t *spa, const blkptr_t *bp); extern int spa_mode(spa_t *spa); extern uint64_t strtonum(const char *str, char **nptr); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Sat Dec 6 00:38:55 2014(r275547) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Sat Dec 6 00:42:30 2014(r275548) @@ -216,7 +216,7 @@ zio_buf_alloc(size_t size) { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; - ASSERT3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); + VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); return (kmem_cache_alloc(zio_buf_cache[c], KM_PUSHPAGE)); } @@ -232,7 +232,7 @@ zio_data_buf_alloc(size_t size) { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; - ASSERT(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); + VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); return (kmem_cache_alloc(zio_data_buf_cache[c], KM_PUSHPAGE)); } @@ -242,7 +242,7 @@ zio_buf_free(void *buf, size_t size) { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; - ASSERT(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); + VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); kmem_cache_free(zio_buf_cache[c], buf); } @@ -252,7 +252,7 @@ zio_data_buf_free(void *buf, size_t size { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; - ASSERT(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); + VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); kmem_cache_free(zio_data_buf_cache[c], buf); } @@ -596,6 +596,86 @@ zio_root(spa_t *spa, zio_done_func_t *do return (zio_null(NULL, spa, NULL, done, private, flags)); } +void +zfs_blkptr_verify(spa_t *spa, const blkptr_t *bp) +{ + if (!DMU_OT_IS_VALID(BP_GET_TYPE(bp))) { + zfs_panic_recover("blkptr at %p has invalid TYPE %llu", + bp, (longlong_t)BP_GET_TYPE(bp)); + } + if (BP_GET_CHECKSUM(bp) >= ZIO_CHECKSUM_FUNCTIONS || + BP_GET_CHECKSUM(bp) <= ZIO_CHECKSUM_ON) { + zfs_panic_recover("blkptr at %p has invalid CHECKSUM %llu", + bp, (longlong_t)BP_GET_CHECKSUM(bp)); + } + if (BP_GET_COMPRESS(bp) >= ZIO_COMPRESS_FUNCTIONS || + BP_GET_COMPRESS(bp) <= ZIO_COMPRESS_ON) { + zfs_panic_recover("blkptr at %p has invalid COMPRESS %llu", + bp, (longlong_t)BP_GET_COMPRESS(bp)); + } + if (BP_GET_LSIZE(bp) > SPA_MAXBLOCKSIZE) { + zfs_panic_recover("blkptr at %p has invalid LSIZE %llu", + bp, (longlong_t)BP_GET_LSIZE(bp)); + } + if (BP_GET_PSIZE(bp) > SPA_MAXBLOCKSIZE) { + zfs_panic_recover("blkptr at %p has invalid PSIZE %llu", + bp, (longlong_t)BP_GET_PSIZE(bp)); + } + + if (BP_IS_EMBEDDED(bp)) { + if (BPE_GET_ETYPE(bp) > NUM_BP_EMBEDDED_TYPES) { + zfs_panic_recover("blkptr at %p has invalid ETYPE %llu", + bp, (longlong_t)BPE_GET_ETYPE(bp)); + } + } + + /* +* Pool-specific checks. +* +* Note: it would be nice to verify that the blk_birth and +* BP_PHYSICAL_BIRTH() are not too large. However, spa_freeze() +* allows the birth time of log blocks (and dmu_sync()-ed blocks +* that are in the log) to be arbitrarily large. +*/ + for (int i = 0; i < BP_GET_NDVAS(bp); i++) { + uint64_t vdevid = DVA_GET_VDEV(&bp->blk_dva[i]); + if (vdevid >= spa->spa_root_vdev->vdev_children) { + zfs_panic_recover("blkptr at %p DVA %u
svn commit: r275547 - vendor/illumos/dist/man/man1m
Author: delphij Date: Sat Dec 6 00:38:55 2014 New Revision: 275547 URL: https://svnweb.freebsd.org/changeset/base/275547 Log: 4181 zfs(1m): 'zfs allow' examples in the man page are outdated Reviewed by: Richard Lowe Reviewed by: Gordon Ross Reviewed by: Yuri Pankov Approved by: Dan McDonald Author: Marcel Telka illumos/illumos-gate@5619b3f84733e187bc34bca49abbec8bdfcd7d99 Modified: vendor/illumos/dist/man/man1m/zfs.1m Modified: vendor/illumos/dist/man/man1m/zfs.1m == --- vendor/illumos/dist/man/man1m/zfs.1mSat Dec 6 00:37:00 2014 (r275546) +++ vendor/illumos/dist/man/man1m/zfs.1mSat Dec 6 00:38:55 2014 (r275547) @@ -24,11 +24,11 @@ .\" Copyright 2011 Joshua M. Clulow .\" Copyright (c) 2014 by Delphix. All rights reserved. .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. -.\" Copyright 2013 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2014, Joyent, Inc. All rights reserved. .\" Copyright (c) 2014 by Adam Stevko. All rights reserved. +.\" Copyright 2014 Nexenta Systems, Inc. All Rights Reserved. .\" -.TH ZFS 1M "March 6, 2014" +.TH ZFS 1M "November 11, 2014" .SH NAME zfs \- configures ZFS file systems .SH SYNOPSIS @@ -4038,10 +4038,9 @@ permissions on \fBtank/cindys\fR are als .nf # \fBzfs allow cindys create,destroy,mount,snapshot tank/cindys\fR # \fBzfs allow tank/cindys\fR -- -Local+Descendent permissions on (tank/cindys) - user cindys create,destroy,mount,snapshot -- + Permissions on tank/cindys -- +Local+Descendent permissions: +user cindys create,destroy,mount,snapshot .fi .in -2 .sp @@ -4074,12 +4073,11 @@ The permissions on \fBtank/users\fR are # \fBzfs allow staff create,mount tank/users\fR # \fBzfs allow -c destroy tank/users\fR # \fBzfs allow tank/users\fR -- -Create time permissions on (tank/users) - create,destroy -Local+Descendent permissions on (tank/users) - group staff create,mount -- + Permissions on tank/users --- +Permission sets: +destroy +Local+Descendent permissions: +group staff create,mount .fi .in -2 .sp @@ -4098,14 +4096,11 @@ displayed. # \fBzfs allow -s @pset create,destroy,snapshot,mount tank/users\fR # \fBzfs allow staff @pset tank/users\fR # \fBzfs allow tank/users\fR -- -Permission sets on (tank/users) + Permissions on tank/users --- +Permission sets: @pset create,destroy,mount,snapshot -Create time permissions on (tank/users) -create,destroy -Local+Descendent permissions on (tank/users) -group staff @pset,create,mount -- +Local+Descendent permissions: +group staff @pset .fi .in -2 .sp @@ -4123,14 +4118,13 @@ also displayed. .nf # \fBzfs allow cindys quota,reservation users/home\fR # \fBzfs allow users/home\fR -- -Local+Descendent permissions on (users/home) + Permissions on users/home --- +Local+Descendent permissions: user cindys quota,reservation -- cindys% \fBzfs set quota=10G users/home/marks\fR cindys% \fBzfs get quota users/home/marks\fR -NAME PROPERTY VALUE SOURCE -users/home/marks quota 10G local +NAME PROPERTY VALUE SOURCE +users/home/marks quota 10Glocal .fi .in -2 .sp @@ -4148,14 +4142,11 @@ The following example shows how to remov .nf # \fBzfs unallow staff snapshot tank/users\fR # \fBzfs allow tank/users\fR -- -Permission sets on (tank/users) + Permissions on tank/users --- +Permission sets: @pset create,destroy,mount,snapshot -Create time permissions on (tank/users) -create,destroy -Local+Descendent permissions on (tank/users) -group staff @pset,create,mount -- +Local+Descendent permissions: +group staff @pset .fi .in -2 .sp ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275546 - vendor-sys/illumos/dist/uts/common/fs/zfs
Author: delphij Date: Sat Dec 6 00:37:00 2014 New Revision: 275546 URL: https://svnweb.freebsd.org/changeset/base/275546 Log: 5351 scrub goes for an extra second each txg 5352 scrub should pause when there is some dirty data Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@6f6a76adacda33b10633476dc6c5d66d7f17dd94 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.cSat Dec 6 00:34:25 2014(r275545) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.cSat Dec 6 00:37:00 2014(r275546) @@ -389,12 +389,11 @@ dsl_scan_sync_state(dsl_scan_t *scn, dmu &scn->scn_phys, tx)); } +extern int zfs_vdev_async_write_active_min_dirty_percent; + static boolean_t dsl_scan_check_pause(dsl_scan_t *scn, const zbookmark_phys_t *zb) { - uint64_t elapsed_nanosecs; - int mintime; - /* we never skip user/group accounting objects */ if (zb && (int64_t)zb->zb_object < 0) return (B_FALSE); @@ -409,12 +408,28 @@ dsl_scan_check_pause(dsl_scan_t *scn, co if (zb && zb->zb_level != 0) return (B_FALSE); - mintime = (scn->scn_phys.scn_func == POOL_SCAN_RESILVER) ? + /* +* We pause if: +* - we have scanned for the maximum time: an entire txg +*timeout (default 5 sec) +* or +* - we have scanned for at least the minimum time (default 1 sec +*for scrub, 3 sec for resilver), and either we have sufficient +*dirty data that we are starting to write more quickly +*(default 30%), or someone is explicitly waiting for this txg +*to complete. +* or +* - the spa is shutting down because this pool is being exported +*or the machine is rebooting. +*/ + int mintime = (scn->scn_phys.scn_func == POOL_SCAN_RESILVER) ? zfs_resilver_min_time_ms : zfs_scan_min_time_ms; - elapsed_nanosecs = gethrtime() - scn->scn_sync_start_time; - if (elapsed_nanosecs / NANOSEC > zfs_txg_timeout || + uint64_t elapsed_nanosecs = gethrtime() - scn->scn_sync_start_time; + int dirty_pct = scn->scn_dp->dp_dirty_total * 100 / zfs_dirty_data_max; + if (elapsed_nanosecs / NANOSEC >= zfs_txg_timeout || (NSEC2MSEC(elapsed_nanosecs) > mintime && - txg_sync_waiting(scn->scn_dp)) || + (txg_sync_waiting(scn->scn_dp) || + dirty_pct >= zfs_vdev_async_write_active_min_dirty_percent)) || spa_shutting_down(scn->scn_dp->dp_spa)) { if (zb) { dprintf("pausing at bookmark %llx/%llx/%llx/%llx\n", ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275545 - vendor-sys/illumos/dist/uts/common/fs/zfs
Author: delphij Date: Sat Dec 6 00:34:25 2014 New Revision: 275545 URL: https://svnweb.freebsd.org/changeset/base/275545 Log: 5348 zio_checksum_error() only fills in info if ECKSUM Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Steven Hartland Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@373dc1cf9a4e0791397a9b268cdac1f664af58a8 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Sat Dec 6 00:33:09 2014(r275544) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Sat Dec 6 00:34:25 2014(r275545) @@ -2817,7 +2817,8 @@ zio_checksum_verify(zio_t *zio) if ((error = zio_checksum_error(zio, &info)) != 0) { zio->io_error = error; - if (!(zio->io_flags & ZIO_FLAG_SPECULATIVE)) { + if (error == ECKSUM && + !(zio->io_flags & ZIO_FLAG_SPECULATIVE)) { zfs_ereport_start_checksum(zio->io_spa, zio->io_vd, zio, zio->io_offset, zio->io_size, NULL, &info); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275544 - vendor-sys/illumos/dist/uts/common/fs/zfs
Author: delphij Date: Sat Dec 6 00:33:09 2014 New Revision: 275544 URL: https://svnweb.freebsd.org/changeset/base/275544 Log: 5350 clean up code in dnode_sync() Reviewed by: Alex Reece Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@e6518318428d2be1962bf2d47fd83ebfe8cb2736 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Sat Dec 6 00:31:58 2014(r275543) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Sat Dec 6 00:33:09 2014(r275544) @@ -633,12 +633,11 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) dn->dn_free_txg <= tx->tx_txg; /* -* We will either remove a spill block when a file is being removed -* or we have been asked to remove it. +* Remove the spill block if we have been explicitly asked to +* remove it, or if the object is being removed. */ - if (dn->dn_rm_spillblk[txgoff] || - ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) && freeing_dnode)) { - if ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR)) + if (dn->dn_rm_spillblk[txgoff] || freeing_dnode) { + if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) kill_spill = B_TRUE; dn->dn_rm_spillblk[txgoff] = 0; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275543 - vendor-sys/illumos/dist/uts/common/fs/zfs
Author: delphij Date: Sat Dec 6 00:31:58 2014 New Revision: 275543 URL: https://svnweb.freebsd.org/changeset/base/275543 Log: 5310 Remove always true tests for non-NULL ds->ds_phys Reviewed by: Matthew Ahrens Reviewed by: Will Andrews Reviewed by: Andriy Gapon Approved by: Dan McDonald Author: Justin T. Gibbs illumos/illumos-gate@d808a4fc6ac40e878a28e96f1ad7dd2ec439bfbf Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Sat Dec 6 00:18:53 2014(r275542) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Sat Dec 6 00:31:58 2014(r275543) @@ -634,16 +634,14 @@ dsl_dataset_rele(dsl_dataset_t *ds, void void dsl_dataset_disown(dsl_dataset_t *ds, void *tag) { - ASSERT(ds->ds_owner == tag && ds->ds_dbuf != NULL); + ASSERT3P(ds->ds_owner, ==, tag); + ASSERT(ds->ds_dbuf != NULL); mutex_enter(&ds->ds_lock); ds->ds_owner = NULL; mutex_exit(&ds->ds_lock); dsl_dataset_long_rele(ds, tag); - if (ds->ds_dbuf != NULL) - dsl_dataset_rele(ds, tag); - else - dsl_dataset_evict(NULL, ds); + dsl_dataset_rele(ds, tag); } boolean_t Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.cSat Dec 6 00:18:53 2014(r275542) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.cSat Dec 6 00:31:58 2014(r275543) @@ -168,8 +168,8 @@ dsl_prop_get_ds(dsl_dataset_t *ds, const ASSERT(dsl_pool_config_held(ds->ds_dir->dd_pool)); inheritable = (prop == ZPROP_INVAL || zfs_prop_inheritable(prop)); - snapshot = (ds->ds_phys != NULL && dsl_dataset_is_snapshot(ds)); - zapobj = (ds->ds_phys == NULL ? 0 : ds->ds_phys->ds_props_obj); + snapshot = dsl_dataset_is_snapshot(ds); + zapobj = ds->ds_phys->ds_props_obj; if (zapobj != 0) { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; @@ -544,7 +544,7 @@ dsl_prop_set_sync_impl(dsl_dataset_t *ds isint = (dodefault(propname, 8, 1, &intval) == 0); - if (ds->ds_phys != NULL && dsl_dataset_is_snapshot(ds)) { + if (dsl_dataset_is_snapshot(ds)) { ASSERT(version >= SPA_VERSION_SNAP_PROPS); if (ds->ds_phys->ds_props_obj == 0) { dmu_buf_will_dirty(ds->ds_dbuf, tx); @@ -641,7 +641,7 @@ dsl_prop_set_sync_impl(dsl_dataset_t *ds if (isint) { VERIFY0(dsl_prop_get_int_ds(ds, propname, &intval)); - if (ds->ds_phys != NULL && dsl_dataset_is_snapshot(ds)) { + if (dsl_dataset_is_snapshot(ds)) { dsl_prop_cb_record_t *cbr; /* * It's a snapshot; nothing can inherit this ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275542 - vendor-sys/illumos/dist/uts/common/fs/zfs
Author: delphij Date: Sat Dec 6 00:18:53 2014 New Revision: 275542 URL: https://svnweb.freebsd.org/changeset/base/275542 Log: 5311 traverse_dnode may report success when it should not Reviewed by: Matthew Ahrens Reviewed by: Andriy Gapon Reviewed by: Will Andrews Approved by: Dan McDonald Author: Justin T. Gibbs illumos/illumos-gate@2a89c2c59b7c2beb2373c14368cbe7e32af6ffc1 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.cSat Dec 6 00:17:25 2014(r275541) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.cSat Dec 6 00:18:53 2014(r275542) @@ -429,7 +429,7 @@ traverse_dnode(traverse_data_t *td, cons break; } - if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { + if (err == 0 && dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { SET_BOOKMARK(&czb, objset, object, 0, DMU_SPILL_BLKID); err = traverse_visitbp(td, dnp, &dnp->dn_spill, &czb); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275541 - vendor/illumos/dist/lib/libzfs/common/sys
Author: delphij Date: Sat Dec 6 00:17:25 2014 New Revision: 275541 URL: https://svnweb.freebsd.org/changeset/base/275541 Log: 5312 libzfs should be decoupled from kernel's zfs_context.h Reviewed by: Matthew Ahrens Reviewed by: Will Andrews Reviewed by: Andriy Gapon Approved by: Dan McDonald Author: Justin T. Gibbs illumos/illumos-gate@587644a8567e6a9533f88401daa59cbd78c4632f Added: vendor/illumos/dist/lib/libzfs/common/sys/ vendor/illumos/dist/lib/libzfs/common/sys/zfs_context.h (contents, props changed) Added: vendor/illumos/dist/lib/libzfs/common/sys/zfs_context.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/lib/libzfs/common/sys/zfs_context.h Sat Dec 6 00:17:25 2014(r275541) @@ -0,0 +1,37 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ +/* + * Copyright 2014 Spectra Logic Corporation. All rights reserved. + */ + +#ifndef _SYS_ZFS_CONTEXT_H +#define_SYS_ZFS_CONTEXT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +} +#endif + +#endif /* _SYS_ZFS_CONTEXT_H */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275540 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys
Author: delphij Date: Sat Dec 6 00:14:38 2014 New Revision: 275540 URL: https://svnweb.freebsd.org/changeset/base/275540 Log: 5213 panic in metaslab_init due to space_map_open returning ENXIO Reviewed by: Matthew Ahrens Reviewed by: George Wilson Reviewed by: Bayard Bell Reviewed by: Brian Behlendorf Reviewed by: Steven Hartland Approved by: Dan McDonald Author: Prakash Surya illumos/illumos-gate@1e9bd7ec42f2d3bf854c2da35310901194833267 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.cSat Dec 6 00:13:56 2014(r275539) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/metaslab.cSat Dec 6 00:14:38 2014(r275540) @@ -1208,28 +1208,36 @@ metaslab_unload(metaslab_t *msp) msp->ms_weight &= ~METASLAB_ACTIVE_MASK; } -metaslab_t * -metaslab_init(metaslab_group_t *mg, uint64_t id, uint64_t object, uint64_t txg) +int +metaslab_init(metaslab_group_t *mg, uint64_t id, uint64_t object, uint64_t txg, +metaslab_t **msp) { vdev_t *vd = mg->mg_vd; objset_t *mos = vd->vdev_spa->spa_meta_objset; - metaslab_t *msp; + metaslab_t *ms; + int error; - msp = kmem_zalloc(sizeof (metaslab_t), KM_SLEEP); - mutex_init(&msp->ms_lock, NULL, MUTEX_DEFAULT, NULL); - cv_init(&msp->ms_load_cv, NULL, CV_DEFAULT, NULL); - msp->ms_id = id; - msp->ms_start = id << vd->vdev_ms_shift; - msp->ms_size = 1ULL << vd->vdev_ms_shift; + ms = kmem_zalloc(sizeof (metaslab_t), KM_SLEEP); + mutex_init(&ms->ms_lock, NULL, MUTEX_DEFAULT, NULL); + cv_init(&ms->ms_load_cv, NULL, CV_DEFAULT, NULL); + ms->ms_id = id; + ms->ms_start = id << vd->vdev_ms_shift; + ms->ms_size = 1ULL << vd->vdev_ms_shift; /* * We only open space map objects that already exist. All others * will be opened when we finally allocate an object for it. */ if (object != 0) { - VERIFY0(space_map_open(&msp->ms_sm, mos, object, msp->ms_start, - msp->ms_size, vd->vdev_ashift, &msp->ms_lock)); - ASSERT(msp->ms_sm != NULL); + error = space_map_open(&ms->ms_sm, mos, object, ms->ms_start, + ms->ms_size, vd->vdev_ashift, &ms->ms_lock); + + if (error != 0) { + kmem_free(ms, sizeof (metaslab_t)); + return (error); + } + + ASSERT(ms->ms_sm != NULL); } /* @@ -1239,11 +1247,11 @@ metaslab_init(metaslab_group_t *mg, uint * addition of new space; and for debugging, it ensures that we'd * data fault on any attempt to use this metaslab before it's ready. */ - msp->ms_tree = range_tree_create(&metaslab_rt_ops, msp, &msp->ms_lock); - metaslab_group_add(mg, msp); + ms->ms_tree = range_tree_create(&metaslab_rt_ops, ms, &ms->ms_lock); + metaslab_group_add(mg, ms); - msp->ms_fragmentation = metaslab_fragmentation(msp); - msp->ms_ops = mg->mg_class->mc_ops; + ms->ms_fragmentation = metaslab_fragmentation(ms); + ms->ms_ops = mg->mg_class->mc_ops; /* * If we're opening an existing pool (txg == 0) or creating @@ -1252,25 +1260,27 @@ metaslab_init(metaslab_group_t *mg, uint * does not become available until after this txg has synced. */ if (txg <= TXG_INITIAL) - metaslab_sync_done(msp, 0); + metaslab_sync_done(ms, 0); /* * If metaslab_debug_load is set and we're initializing a metaslab * that has an allocated space_map object then load the its space * map so that can verify frees. */ - if (metaslab_debug_load && msp->ms_sm != NULL) { - mutex_enter(&msp->ms_lock); - VERIFY0(metaslab_load(msp)); - mutex_exit(&msp->ms_lock); + if (metaslab_debug_load && ms->ms_sm != NULL) { + mutex_enter(&ms->ms_lock); + VERIFY0(metaslab_load(ms)); + mutex_exit(&ms->ms_lock); } if (txg != 0) { vdev_dirty(vd, 0, NULL, txg); - vdev_dirty(vd, VDD_METASLAB, msp, txg); + vdev_dirty(vd, VDD_METASLAB, ms, txg); } - return (msp); + *msp = ms; + + return (0); } void Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab.h == --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/metaslab.hSat Dec 6 00:13:56 2014(r275539) +++ vendor-sys/illumos/dist/uts/c
svn commit: r275538 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys
Author: delphij Date: Sat Dec 6 00:12:58 2014 New Revision: 275538 URL: https://svnweb.freebsd.org/changeset/base/275538 Log: 5179 Remove unused ZFS ARC functions Reviewed by: Josef 'Jeff' Sipek Reviewed by: Steve Gonczi Reviewed by: Matthew Ahrens Reviewed by: Richard Elling Reviewed by: George Wilson Approved by: Richard Lowe Author: Serapheim Dimitropoulos illumos/illumos-gate@fbefb14f62976763eeaa74a0c1ac68accb38cf44 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Sat Dec 6 00:10:47 2014(r275537) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Sat Dec 6 00:12:58 2014(r275538) @@ -1310,23 +1310,6 @@ arc_space_return(uint64_t space, arc_spa atomic_add_64(&arc_size, -space); } -void * -arc_data_buf_alloc(uint64_t size) -{ - if (arc_evict_needed(ARC_BUFC_DATA)) - cv_signal(&arc_reclaim_thr_cv); - atomic_add_64(&arc_size, size); - return (zio_data_buf_alloc(size)); -} - -void -arc_data_buf_free(void *buf, uint64_t size) -{ - zio_data_buf_free(buf, size); - ASSERT(arc_size >= size); - atomic_add_64(&arc_size, -size); -} - arc_buf_t * arc_buf_alloc(spa_t *spa, int size, void *tag, arc_buf_contents_t type) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h == --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Sat Dec 6 00:10:47 2014(r275537) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Sat Dec 6 00:12:58 2014(r275538) @@ -83,8 +83,6 @@ typedef enum arc_space_type { void arc_space_consume(uint64_t space, arc_space_type_t type); void arc_space_return(uint64_t space, arc_space_type_t type); -void *arc_data_buf_alloc(uint64_t space); -void arc_data_buf_free(void *buf, uint64_t space); arc_buf_t *arc_buf_alloc(spa_t *spa, int size, void *tag, arc_buf_contents_t type); arc_buf_t *arc_loan_buf(spa_t *spa, int size); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275539 - head/sys/dev/cxgbe
Author: np Date: Sat Dec 6 00:13:56 2014 New Revision: 275539 URL: https://svnweb.freebsd.org/changeset/base/275539 Log: cxgbe(4): Allow for different pad and pack boundaries for different adapters. Set the pack boundary for T5 cards to be the same as the PCIe max payload size. The chip likes it this way. In this revision the driver allocate rx buffers that align on both boundaries. This is not a strict requirement and a followup commit will switch the driver to a more relaxed allocation strategy. MFC after:2 weeks Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h == --- head/sys/dev/cxgbe/adapter.hSat Dec 6 00:12:58 2014 (r275538) +++ head/sys/dev/cxgbe/adapter.hSat Dec 6 00:13:56 2014 (r275539) @@ -148,7 +148,7 @@ enum { #else SW_ZONE_SIZES = 3, /* cluster, jumbo9k, jumbo16k */ #endif - CL_METADATA_SIZE = CACHE_LINE_SIZE, + CL_METADATA_SIZE = 256, /* same as MSIZE for now */ SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */ TX_SGL_SEGS = 36, @@ -695,6 +695,7 @@ struct sge { struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */ struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */ + int pad_boundary; int pack_boundary; int8_t safe_hwidx1; /* may not have room for metadata */ int8_t safe_hwidx2; /* with room for metadata and maybe more */ Modified: head/sys/dev/cxgbe/t4_sge.c == --- head/sys/dev/cxgbe/t4_sge.c Sat Dec 6 00:12:58 2014(r275538) +++ head/sys/dev/cxgbe/t4_sge.c Sat Dec 6 00:13:56 2014(r275539) @@ -120,19 +120,10 @@ TUNABLE_INT("hw.cxgbe.buffer_packing", & /* * Start next frame in a packed buffer at this boundary. * -1: driver should figure out a good value. - * T4: - * --- - * if fl_pad != 0 - * value specified here will be overridden by fl_pad. - * else - * power of 2 from 32 to 4096 (both inclusive) is a valid value here. - * T5: - * --- - * 16, or a power of 2 from 64 to 4096 (both inclusive) is a valid value. + * T4: driver will ignore this and use the same value as fl_pad above. + * T5: 16, or a power of 2 from 64 to 4096 (both inclusive) is a valid value. */ static int fl_pack = -1; -static int t4_fl_pack; -static int t5_fl_pack; TUNABLE_INT("hw.cxgbe.fl_pack", &fl_pack); /* @@ -175,8 +166,7 @@ static int service_iq(struct sge_iq *, i static struct mbuf *get_fl_payload(struct adapter *, struct sge_fl *, uint32_t); static int t4_eth_rx(struct sge_iq *, const struct rss_header *, struct mbuf *); static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int); -static inline void init_fl(struct adapter *, struct sge_fl *, int, int, int, -char *); +static inline void init_fl(struct adapter *, struct sge_fl *, int, int, char *); static inline void init_eq(struct sge_eq *, int, int, uint8_t, uint16_t, char *); static int alloc_ring(struct adapter *, size_t, bus_dma_tag_t *, bus_dmamap_t *, @@ -264,15 +254,6 @@ static counter_u64_t extfree_rels; void t4_sge_modload(void) { - int pad; - - /* set pad to a reasonable powerof2 between 16 and 4096 (inclusive) */ -#if defined(__i386__) || defined(__amd64__) - pad = max(cpu_clflush_line_size, 16); -#else - pad = max(CACHE_LINE_SIZE, 16); -#endif - pad = min(pad, 4096); if (fl_pktshift < 0 || fl_pktshift > 7) { printf("Invalid hw.cxgbe.fl_pktshift value (%d)," @@ -280,35 +261,6 @@ t4_sge_modload(void) fl_pktshift = 2; } - if (fl_pad != 0 && - (fl_pad < 32 || fl_pad > 4096 || !powerof2(fl_pad))) { - - if (fl_pad != -1) { - printf("Invalid hw.cxgbe.fl_pad value (%d)," - " using %d instead.\n", fl_pad, max(pad, 32)); - } - fl_pad = max(pad, 32); - } - - /* -* T4 has the same pad and pack boundary. If a pad boundary is set, -* pack boundary must be set to the same value. Otherwise take the -* specified value or auto-calculate something reasonable. -*/ - if (fl_pad) - t4_fl_pack = fl_pad; - else if (fl_pack < 32 || fl_pack > 4096 || !powerof2(fl_pack)) - t4_fl_pack = max(pad, 32); - else - t4_fl_pack = fl_pack; - - /* T5's pack boundary is independent of the pad boundary. */ - if (fl_pack < 16 || fl_pack == 32 || fl_pack > 4096 || - !powerof2(fl_pack)) - t5_fl_pack = max(pad, CACHE_LINE_SIZE); - else - t5_fl_pack = fl_pack; - if (spg_len != 64 && spg_len != 128) { int len; @@ -366,6 +318,71 @@ t4_init_sge_cpl_handlers(st
svn commit: r275537 - in vendor/illumos/dist: cmd/zfs lib/libzfs/common
Author: delphij Date: Sat Dec 6 00:10:47 2014 New Revision: 275537 URL: https://svnweb.freebsd.org/changeset/base/275537 Log: 5316 allow smbadm join to use RPC Reviewed by: Bayard Bell Reviewed by: Dan McDonald Reviewed by: Thomas Keiser Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Gordon Ross illumos/illumos-gate@1ed6b69a5ca1ca3ee5e9a4931f74e2237c7e1c9f Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c == --- vendor/illumos/dist/cmd/zfs/zfs_main.c Sat Dec 6 00:01:19 2014 (r275536) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Sat Dec 6 00:10:47 2014 (r275537) @@ -63,6 +63,7 @@ #include #include #include +#include #include "zfs_iter.h" #include "zfs_util.h" @@ -2372,9 +2373,8 @@ userspace_cb(void *arg, const char *doma /* SMB */ char sid[ZFS_MAXNAMELEN + 32]; uid_t id; - uint64_t classes; int err; - directory_error_t e; + int flag = IDMAP_REQ_FLG_USE_CACHE; smbentity = B_TRUE; @@ -2391,10 +2391,13 @@ userspace_cb(void *arg, const char *doma if (err == 0) { rid = id; if (!cb->cb_sid2posix) { - e = directory_name_from_sid(NULL, sid, &name, - &classes); - if (e != NULL) - directory_error_free(e); + if (type == USTYPE_SMB_USR) { + (void) idmap_getwinnamebyuid(rid, flag, + &name, NULL); + } else { + (void) idmap_getwinnamebygid(rid, flag, + &name, NULL); + } if (name == NULL) name = sid; } Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c == --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Sat Dec 6 00:01:19 2014(r275536) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Sat Dec 6 00:10:47 2014(r275537) @@ -2557,7 +2557,7 @@ userquota_propname_decode(const char *pr boolean_t isuser; domain[0] = '\0'; - + *ridp = 0; /* Figure out the property type ({user|group}{quota|space}) */ for (type = 0; type < ZFS_NUM_USERQUOTA_PROPS; type++) { if (strncmp(propname, zfs_userquota_prop_prefixes[type], @@ -2578,35 +2578,61 @@ userquota_propname_decode(const char *pr * It's a SID name (eg "user@domain") that needs to be * turned into S-1-domainID-RID. */ - directory_error_t e; + int flag = 0; + idmap_stat stat, map_stat; + uid_t pid; + idmap_rid_t rid; + idmap_get_handle_t *gh = NULL; + + stat = idmap_get_create(&gh); + if (stat != IDMAP_SUCCESS) { + idmap_get_destroy(gh); + return (ENOMEM); + } if (zoned && getzoneid() == GLOBAL_ZONEID) return (ENOENT); if (isuser) { - e = directory_sid_from_user_name(NULL, - cp, &numericsid); + stat = idmap_getuidbywinname(cp, NULL, flag, &pid); + if (stat < 0) + return (ENOENT); + stat = idmap_get_sidbyuid(gh, pid, flag, &numericsid, + &rid, &map_stat); } else { - e = directory_sid_from_group_name(NULL, - cp, &numericsid); + stat = idmap_getgidbywinname(cp, NULL, flag, &pid); + if (stat < 0) + return (ENOENT); + stat = idmap_get_sidbygid(gh, pid, flag, &numericsid, + &rid, &map_stat); + } + if (stat < 0) { + idmap_get_destroy(gh); + return (ENOENT); } - if (e != NULL) { - directory_error_free(e); + stat = idmap_get_mappings(gh); + idmap_get_destroy(gh); + + if (stat < 0) { return (ENOENT); } if (numericsid == NULL)
svn commit: r275536 - vendor/illumos/dist/tools/ctf/cvt
Author: delphij Date: Sat Dec 6 00:01:19 2014 New Revision: 275536 URL: https://svnweb.freebsd.org/changeset/base/275536 Log: 3363 Mark non-returning functions in ctftools Reviewed by: Richard Lowe Reviewed by: Josef 'Jeff' Sipek Approved by: Albert Lee Author: Erik Cederstrand illumos/illumos-gate@a6bde1a23b60f140c7ed78df979c2e22b1ed9b2c Modified: vendor/illumos/dist/tools/ctf/cvt/ctftools.h Modified: vendor/illumos/dist/tools/ctf/cvt/ctftools.h == --- vendor/illumos/dist/tools/ctf/cvt/ctftools.hFri Dec 5 23:55:44 2014(r275535) +++ vendor/illumos/dist/tools/ctf/cvt/ctftools.hSat Dec 6 00:01:19 2014(r275536) @@ -26,8 +26,6 @@ #ifndef _CTFTOOLS_H #define_CTFTOOLS_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Functions and data structures used in the manipulation of stabs and CTF data */ @@ -39,6 +37,8 @@ #include #include +#include + #ifdef __cplusplus extern "C" { #endif @@ -434,8 +434,8 @@ int streq(const char *, const char *); int findelfsecidx(Elf *, const char *, const char *); size_t elf_ptrsz(Elf *); char *mktmpname(const char *, const char *); -void terminate(char *, ...); -void aborterr(char *, ...); +void terminate(char *, ...) __NORETURN; +void aborterr(char *, ...) __NORETURN; void set_terminate_cleanup(void (*)()); void elfterminate(const char *, const char *, ...); void warning(char *, ...); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275535 - in vendor-sys/illumos/dist/uts/common: dtrace fs/zfs
Author: delphij Date: Fri Dec 5 23:55:44 2014 New Revision: 275535 URL: https://svnweb.freebsd.org/changeset/base/275535 Log: 5255 uts shouldn't open-code ISP2 Reviewed by: Marcel Telka Reviewed by: Dan McDonald Approved by: Robert Mustacchi Author: Josef 'Jeff' Sipek illumos/illumos-gate@de710d24d2fae4468e64da999e1d952a247f142c Modified: vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Modified: vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c == --- vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c Fri Dec 5 23:51:20 2014(r275534) +++ vendor-sys/illumos/dist/uts/common/dtrace/dtrace.c Fri Dec 5 23:55:44 2014(r275535) @@ -139,7 +139,7 @@ dtrace_optval_t dtrace_ustackframes_defa dtrace_optval_t dtrace_jstackframes_default = 50; dtrace_optval_t dtrace_jstackstrsize_default = 512; intdtrace_msgdsize_max = 128; -hrtime_t dtrace_chill_max = 500 * (NANOSEC / MILLISEC); /* 500 ms */ +hrtime_t dtrace_chill_max = MSEC2NSEC(500); /* 500 ms */ hrtime_t dtrace_chill_interval = NANOSEC;/* 1000 ms */ intdtrace_devdepth_max = 32; intdtrace_err_verbose; @@ -13039,7 +13039,7 @@ dtrace_dof_slurp(dof_hdr_t *dof, dtrace_ if (!(sec->dofs_flags & DOF_SECF_LOAD)) continue; /* just ignore non-loadable sections */ - if (sec->dofs_align & (sec->dofs_align - 1)) { + if (!ISP2(sec->dofs_align)) { dtrace_dof_error(dof, "bad section alignment"); return (-1); } Modified: vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c == --- vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.cFri Dec 5 23:51:20 2014(r275534) +++ vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.cFri Dec 5 23:55:44 2014(r275535) @@ -2156,7 +2156,7 @@ fasttrap_attach(dev_info_t *devi, ddi_at if (nent == 0 || nent > 0x100) nent = FASTTRAP_TPOINTS_DEFAULT_SIZE; - if ((nent & (nent - 1)) == 0) + if (ISP2(nent)) fasttrap_tpoints.fth_nent = nent; else fasttrap_tpoints.fth_nent = 1 << fasttrap_highbit(nent); @@ -2169,7 +2169,7 @@ fasttrap_attach(dev_info_t *devi, ddi_at * ... and the providers hash table... */ nent = FASTTRAP_PROVIDERS_DEFAULT_SIZE; - if ((nent & (nent - 1)) == 0) + if (ISP2(nent)) fasttrap_provs.fth_nent = nent; else fasttrap_provs.fth_nent = 1 << fasttrap_highbit(nent); @@ -2182,7 +2182,7 @@ fasttrap_attach(dev_info_t *devi, ddi_at * ... and the procs hash table. */ nent = FASTTRAP_PROCS_DEFAULT_SIZE; - if ((nent & (nent - 1)) == 0) + if (ISP2(nent)) fasttrap_procs.fth_nent = nent; else fasttrap_procs.fth_nent = 1 << fasttrap_highbit(nent); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c == --- vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Fri Dec 5 23:51:20 2014(r275534) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c Fri Dec 5 23:55:44 2014(r275535) @@ -24,6 +24,7 @@ * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved. */ +#include #include #include #include @@ -121,7 +122,7 @@ zio_init(void) size_t align = 0; size_t cflags = (size > zio_buf_debug_limit) ? KMC_NODEBUG : 0; - while (p2 & (p2 - 1)) + while (!ISP2(p2)) p2 &= p2 - 1; #ifndef _KERNEL ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275534 - vendor-sys/illumos/dist/uts/common/sys
Author: delphij Date: Fri Dec 5 23:51:20 2014 New Revision: 275534 URL: https://svnweb.freebsd.org/changeset/base/275534 Log: 5285 pass in cpu_pause_func via pause_cpus Reviewed by: Robert Mustacchi Reviewed by: Dan McDonald Approved by: Gordon Ross Author: Josef 'Jeff' Sipek illumos/illumos-gate@0ed5c46e82c989cfa9726d9dae452e3d24ef83be Modified: vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Modified: vendor-sys/illumos/dist/uts/common/sys/cpuvar.h == --- vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Fri Dec 5 23:50:16 2014(r275533) +++ vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Fri Dec 5 23:51:20 2014(r275534) @@ -652,7 +652,7 @@ voidpoke_cpu(int cpun); /* interrupt a void mach_cpu_pause(volatile char *); -void pause_cpus(cpu_t *off_cp); +void pause_cpus(cpu_t *off_cp, void *(*func)(void *)); void start_cpus(void); intcpus_paused(void); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275533 - vendor-sys/illumos/dist/uts/common/sys
Author: delphij Date: Fri Dec 5 23:50:16 2014 New Revision: 275533 URL: https://svnweb.freebsd.org/changeset/base/275533 Log: 5100 sparc build failed after 5004 Reviewed by: Garrett D'Amore Reviewed by: Gary Mills Approved by: Robert Mustacchi Author: Igor Kozhukhov illumos/illuoms-gate@6481fd49a4385db15285ddf89f9c80b45eaaa407 Modified: vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Modified: vendor-sys/illumos/dist/uts/common/sys/cpuvar.h == --- vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Fri Dec 5 23:43:15 2014(r275532) +++ vendor-sys/illumos/dist/uts/common/sys/cpuvar.h Fri Dec 5 23:50:16 2014(r275533) @@ -22,6 +22,7 @@ /* * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright 2014 Igor Kozhukhov . */ #ifndef _SYS_CPUVAR_H @@ -32,6 +33,7 @@ #include #include +#include #if (defined(_KERNEL) || defined(_KMEMUSER)) && defined(_MACHDEP) #include #endif @@ -53,15 +55,6 @@ extern "C" { struct squeue_set_s; #defineCPU_CACHE_COHERENCE_SIZE64 -#defineS_LOADAVG_SZ11 -#defineS_MOVAVG_SZ 10 - -struct loadavg_s { - int lg_cur; /* current loadavg entry */ - unsigned int lg_len;/* number entries recorded */ - hrtime_t lg_total; /* used to temporarily hold load totals */ - hrtime_t lg_loads[S_LOADAVG_SZ];/* table of recorded entries */ -}; /* * For fast event tracing. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275532 - vendor/illumos/dist/lib/libnvpair
Author: delphij Date: Fri Dec 5 23:43:15 2014 New Revision: 275532 URL: https://svnweb.freebsd.org/changeset/base/275532 Log: 5005 libnvpair JSON output broken by lint fixes 5006 libnvpair JSON cannot print int16 arrays Reviewed by: Robert Mustacchi Approved by: Gordon Ross Author: Joshua M. Clulow illumos/illumos-gate@37c79205ad46187f54b2edbf6a468160935f14d9 Modified: vendor/illumos/dist/lib/libnvpair/nvpair_json.c Modified: vendor/illumos/dist/lib/libnvpair/nvpair_json.c == --- vendor/illumos/dist/lib/libnvpair/nvpair_json.c Fri Dec 5 23:08:39 2014(r275531) +++ vendor/illumos/dist/lib/libnvpair/nvpair_json.c Fri Dec 5 23:43:15 2014(r275532) @@ -9,7 +9,7 @@ * http://www.illumos.org/license/CDDL. */ /* - * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2014, Joyent, Inc. */ #include @@ -20,9 +20,11 @@ #include "libnvpair.h" -#defineFPRINTF(fp, ...)\ - if (fprintf(fp, __VA_ARGS__) < 0) \ - return (-1) \ +#defineFPRINTF(fp, ...)\ + do {\ + if (fprintf(fp, __VA_ARGS__) < 0) \ + return (-1);\ + } while (0) /* * When formatting a string for JSON output we must escape certain characters, @@ -328,7 +330,7 @@ nvlist_print_json(FILE *fp, nvlist_t *nv for (i = 0; i < valsz; i++) { if (i > 0) FPRINTF(fp, ","); - FPRINTF(fp, "%hhd", val[i]); + FPRINTF(fp, "%hd", val[i]); } FPRINTF(fp, "]"); break; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275531 - head/usr.bin/patch
Author: pfg Date: Fri Dec 5 23:08:39 2014 New Revision: 275531 URL: https://svnweb.freebsd.org/changeset/base/275531 Log: Update OpenBSD CVS revision for our r255232. This is a no-op to make it easier to track changes from OpenBSD MFC after:3 days Modified: head/usr.bin/patch/pch.c Modified: head/usr.bin/patch/pch.c == --- head/usr.bin/patch/pch.cFri Dec 5 22:56:10 2014(r275530) +++ head/usr.bin/patch/pch.cFri Dec 5 23:08:39 2014(r275531) @@ -24,7 +24,7 @@ * -C option added in 1998, original code by Marc Espie, based on FreeBSD * behaviour * - * $OpenBSD: pch.c,v 1.39 2012/04/11 08:07:13 ajacoutot Exp $ + * $OpenBSD: pch.c,v 1.40 2013/07/11 12:39:31 otto Exp $ * $FreeBSD$ */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275530 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: delphij Date: Fri Dec 5 22:56:10 2014 New Revision: 275530 URL: https://svnweb.freebsd.org/changeset/base/275530 Log: Use %d instead of %u for error number. This way we see ERESTART as -1 not 4294967295 when doing DTrace. MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Fri Dec 5 22:38:21 2014(r275529) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Fri Dec 5 22:56:10 2014(r275530) @@ -1483,7 +1483,7 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * } if (scn->scn_visited_this_txg) { zfs_dbgmsg("freed %llu blocks in %llums from " - "free_bpobj/bptree txg %llu; err=%u", + "free_bpobj/bptree txg %llu; err=%d", (longlong_t)scn->scn_visited_this_txg, (longlong_t) NSEC2MSEC(gethrtime() - scn->scn_sync_start_time), ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275528 - vendor/tnftp/dist
Author: gavin Date: Fri Dec 5 22:37:56 2014 New Revision: 275528 URL: https://svnweb.freebsd.org/changeset/base/275528 Log: Import tnftp-20141104. Modified: vendor/tnftp/dist/ChangeLog vendor/tnftp/dist/NEWS vendor/tnftp/dist/configure vendor/tnftp/dist/configure.ac vendor/tnftp/dist/tnftp.h vendor/tnftp/dist/tnftp_config.h.in Modified: vendor/tnftp/dist/ChangeLog == --- vendor/tnftp/dist/ChangeLog Fri Dec 5 22:35:28 2014(r275527) +++ vendor/tnftp/dist/ChangeLog Fri Dec 5 22:37:56 2014(r275528) @@ -1,6 +1,16 @@ -$NetBSD: ChangeLog,v 1.63 2014/10/31 04:13:56 lukem Exp $ +$NetBSD: ChangeLog,v 1.66 2014/11/03 21:48:49 lukem Exp $ +Mon Nov 3 21:43:20 UTC 2014 lukem + + * Release as "tnftp 20141104". + +Fri Oct 31 08:32:28 UTC 2014 lukem + + * Use '=' not '==' with test in configure. + + * Check for for writev() declaration. + Fri Oct 31 04:07:38 UTC 2014 lukem * Release as "tnftp 20141031". Modified: vendor/tnftp/dist/NEWS == --- vendor/tnftp/dist/NEWS Fri Dec 5 22:35:28 2014(r275527) +++ vendor/tnftp/dist/NEWS Fri Dec 5 22:37:56 2014(r275528) @@ -1,6 +1,10 @@ -$NetBSD: NEWS,v 1.10 2014/10/31 04:06:54 lukem Exp $ +$NetBSD: NEWS,v 1.11 2014/11/03 21:48:49 lukem Exp $ -This is tnftp version 20141031. +This is tnftp version 20141104. + +Changes in tnftp from 20141031 to 20141104: + + Portability fixes. Changes in tnftp from 20130505 to 20141031: Modified: vendor/tnftp/dist/configure == --- vendor/tnftp/dist/configure Fri Dec 5 22:35:28 2014(r275527) +++ vendor/tnftp/dist/configure Fri Dec 5 22:37:56 2014(r275528) @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac Revision: 1.26 . +# From configure.ac Revision: 1.29 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for tnftp 20141031. +# Generated by GNU Autoconf 2.69 for tnftp 20141104. # # Report bugs to . # @@ -596,8 +596,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tnftp' PACKAGE_TARNAME='tnftp' -PACKAGE_VERSION='20141031' -PACKAGE_STRING='tnftp 20141031' +PACKAGE_VERSION='20141104' +PACKAGE_STRING='tnftp 20141104' PACKAGE_BUGREPORT='lu...@netbsd.org' PACKAGE_URL='' @@ -1333,7 +1333,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tnftp 20141031 to adapt to many kinds of systems. +\`configure' configures tnftp 20141104 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1403,7 +1403,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tnftp 20141031:";; + short | recursive ) echo "Configuration of tnftp 20141104:";; esac cat <<\_ACEOF @@ -1518,7 +1518,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tnftp configure 20141031 +tnftp configure 20141104 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2103,7 +2103,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tnftp $as_me 20141031, which was +It was created by tnftp $as_me 20141104, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3067,7 +3067,7 @@ fi # Define the identity of the package. PACKAGE='tnftp' - VERSION='20141031' + VERSION='20141104' cat >>confdefs.h <<_ACEOF @@ -12277,7 +12277,7 @@ rm -f core conftest.err conftest.$ac_obj if test "$with_ssl" != no; then : { $as_echo "$as_me:${as_lineno-$LINENO}: --with-ssl=$with_ssl; checking for required OpenSSL features" >&5 $as_echo "$as_me: --with-ssl=$with_ssl; checking for required OpenSSL features" >&6;} - if test "$have_ssl" == yes; then : + if test "$have_ssl" = yes; then : $as_echo "#define WITH_SSL 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: enabling SSL support" >&5 @@ -12383,7 +12383,8 @@ accheck_includes=' ' # accheck_includes for ac_header in sys/types.h sys/ioctl.h sys/param.h sys/stat.h \ - sys/socket.h sys/syslimits.h sys/time.h sys/wait.h + sys/socket.h sys/syslimits.h sys/time.h sys/uio.h \ + sys/wait.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$accheck_includes @@ -15274,7 +15275,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_F
svn commit: r275529 - vendor/tnftp/20141104
Author: gavin Date: Fri Dec 5 22:38:21 2014 New Revision: 275529 URL: https://svnweb.freebsd.org/changeset/base/275529 Log: Tag tnftp-20141104. Added: vendor/tnftp/20141104/ - copied from r275528, vendor/tnftp/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275527 - vendor/tnftp/20141031
Author: gavin Date: Fri Dec 5 22:35:28 2014 New Revision: 275527 URL: https://svnweb.freebsd.org/changeset/base/275527 Log: Tag tnftp-20141031. Added: vendor/tnftp/20141031/ - copied from r275526, vendor/tnftp/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275526 - in vendor/tnftp/dist: . libnetbsd src
Author: gavin Date: Fri Dec 5 22:34:15 2014 New Revision: 275526 URL: https://svnweb.freebsd.org/changeset/base/275526 Log: Import tnftp-20141031. Modified: vendor/tnftp/dist/ChangeLog vendor/tnftp/dist/NEWS vendor/tnftp/dist/THANKS vendor/tnftp/dist/configure vendor/tnftp/dist/configure.ac vendor/tnftp/dist/libnetbsd/glob.c vendor/tnftp/dist/src/fetch.c vendor/tnftp/dist/src/ssl.h vendor/tnftp/dist/src/version.h Modified: vendor/tnftp/dist/ChangeLog == --- vendor/tnftp/dist/ChangeLog Fri Dec 5 21:37:27 2014(r275525) +++ vendor/tnftp/dist/ChangeLog Fri Dec 5 22:34:15 2014(r275526) @@ -1,4 +1,15 @@ -$NetBSD: ChangeLog,v 1.62 2013/05/05 13:53:38 lukem Exp $ +$NetBSD: ChangeLog,v 1.63 2014/10/31 04:13:56 lukem Exp $ + + +Fri Oct 31 04:07:38 UTC 2014 lukem + + * Release as "tnftp 20141031". + + * Merge NetBSD usr.bin/ftp from 20130220 to 20141026: + - Don't pay attention to special characters if they don't + come from the command line (from jmcneill). + Fixes CVE-2014-8517. + - PR/34796: Hauke Fath: ftp does not timeout on http fetches. Sun May 5 13:51:47 UTC 2013 lukem Modified: vendor/tnftp/dist/NEWS == --- vendor/tnftp/dist/NEWS Fri Dec 5 21:37:27 2014(r275525) +++ vendor/tnftp/dist/NEWS Fri Dec 5 22:34:15 2014(r275526) @@ -1,6 +1,14 @@ -$NetBSD: NEWS,v 1.9 2013/05/05 13:53:38 lukem Exp $ +$NetBSD: NEWS,v 1.10 2014/10/31 04:06:54 lukem Exp $ -This is tnftp version 20130505. +This is tnftp version 20141031. + +Changes in tnftp from 20130505 to 20141031: + + Ignore special character behaviour in filenames not provided + by the user. + Fixes CVE-2014-8517. + + Fix timeout on HTTP fetches. Changes in tnftp from 20100108 to 20130505: Modified: vendor/tnftp/dist/THANKS == --- vendor/tnftp/dist/THANKSFri Dec 5 21:37:27 2014(r275525) +++ vendor/tnftp/dist/THANKSFri Dec 5 22:34:15 2014(r275526) @@ -19,9 +19,11 @@ Douwe Kiela Eugene Kotlyarov Geoff Wing Giles Lean +Hauke Fath Havard Eidnes Hubert Feyrer ITOH Yasufumi +Jared McNeill Jason R. Thorpe John Hawkinson Joseph S. Myers Modified: vendor/tnftp/dist/configure == --- vendor/tnftp/dist/configure Fri Dec 5 21:37:27 2014(r275525) +++ vendor/tnftp/dist/configure Fri Dec 5 22:34:15 2014(r275526) @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac Revision: 1.25 . +# From configure.ac Revision: 1.26 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for tnftp 20130505. +# Generated by GNU Autoconf 2.69 for tnftp 20141031. # # Report bugs to . # @@ -13,7 +13,7 @@ # gives unlimited permission to copy, distribute and modify it. # # -# Copyright (c) 1999-2013 The NetBSD Foundation, Inc. +# Copyright (c) 1999-2014 The NetBSD Foundation, Inc. # All rights reserved. # ## ## @@ -596,8 +596,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tnftp' PACKAGE_TARNAME='tnftp' -PACKAGE_VERSION='20130505' -PACKAGE_STRING='tnftp 20130505' +PACKAGE_VERSION='20141031' +PACKAGE_STRING='tnftp 20141031' PACKAGE_BUGREPORT='lu...@netbsd.org' PACKAGE_URL='' @@ -1333,7 +1333,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tnftp 20130505 to adapt to many kinds of systems. +\`configure' configures tnftp 20141031 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1403,7 +1403,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tnftp 20130505:";; + short | recursive ) echo "Configuration of tnftp 20141031:";; esac cat <<\_ACEOF @@ -1518,7 +1518,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tnftp configure 20130505 +tnftp configure 20141031 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1526,7 +1526,7 @@ This configure script is free software; gives unlimited permission to copy, distribute and modify it. -Copyright (c) 1999-2013 The NetBSD Foundation, Inc. +Copyright (c) 1999-2014 The NetBSD Foundation, Inc. All rights reserved. _ACEOF @@ -2103,7 +2103,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tnftp $as_me 20130505, which was +It was created by tnftp $as_m
svn commit: r275525 - in stable/9: contrib/telnet/arpa contrib/telnet/telnet contrib/telnet/telnetd libexec/telnetd
Author: ngie Date: Fri Dec 5 21:37:27 2014 New Revision: 275525 URL: https://svnweb.freebsd.org/changeset/base/275525 Log: MFstable/10 r275508,r275509: r275508: MFC r274364: Add baud rate support to telnet(1) This implements part of RFC-2217 It's based off a patch originally written by Sujal Patel at Isilon, and contributions from other Isilon employees. PR: 173728 Phabric: D995 Reviewed by: markj, markm Sponsored by: EMC / Isilon Storage Division r275509: MFC r274365: Revert WiP to contrib/tzcode accidentally committed with r274364 Added: stable/9/contrib/telnet/telnet/baud.h - copied unchanged from r275508, stable/10/contrib/telnet/telnet/baud.h Modified: stable/9/contrib/telnet/arpa/telnet.h stable/9/contrib/telnet/telnet/commands.c stable/9/contrib/telnet/telnet/externs.h stable/9/contrib/telnet/telnet/main.c stable/9/contrib/telnet/telnet/sys_bsd.c stable/9/contrib/telnet/telnet/telnet.1 stable/9/contrib/telnet/telnet/telnet.c stable/9/contrib/telnet/telnet/types.h stable/9/contrib/telnet/telnetd/sys_term.c stable/9/libexec/telnetd/Makefile Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/telnet/ (props changed) stable/9/contrib/tzcode/ (props changed) stable/9/contrib/tzcode/stdtime/ (props changed) Modified: stable/9/contrib/telnet/arpa/telnet.h == --- stable/9/contrib/telnet/arpa/telnet.h Fri Dec 5 19:23:51 2014 (r275524) +++ stable/9/contrib/telnet/arpa/telnet.h Fri Dec 5 21:37:27 2014 (r275525) @@ -127,6 +127,7 @@ extern char *telcmds[]; #defineTELOPT_KERMIT 47 /* RFC2840 - Kermit */ #defineTELOPT_EXOPL255 /* extended-options-list */ +#defineCOMPORT_SET_BAUDRATE1 /* RFC2217 - Com Port Set Baud Rate */ #defineNTELOPTS(1+TELOPT_KERMIT) #ifdef TELOPTS Copied: stable/9/contrib/telnet/telnet/baud.h (from r275508, stable/10/contrib/telnet/telnet/baud.h) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/telnet/telnet/baud.h Fri Dec 5 21:37:27 2014 (r275525, copy of r275508, stable/10/contrib/telnet/telnet/baud.h) @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2014 EMC Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Try to guess whether speeds are "encoded" (4.2BSD) or just numeric (4.4BSD). + */ +#if B4800 != 4800 +#defineDECODE_BAUD +#endif + +#ifdef DECODE_BAUD +#ifndefB7200 +#define B7200 B4800 +#endif + +#ifndefB14400 +#define B14400 B9600 +#endif + +#ifndefB19200 +#define B19200 B14400 +#endif + +#ifndefB28800 +#define B28800 B19200 +#endif + +#ifndefB38400 +#define B38400 B28800 +#endif + +#ifndef B57600 +#define B57600 B38400 +#endif + +#ifndef B76800 +#define B76800 B57600 +#endif + +#ifndef B115200 +#define B115200 B76800 +#endif + +#ifndef B115200 +#define B115200 B76800 +#endif +#endif + +#ifndef B230400 +#define B230400 B115200 +#endif + +/* + * A table of available terminal speeds + */ +struct termspeeds termspeeds[] = { + { 0, B0 }, + { 50, B50 }, + { 75, B75 }, + { 110,B110 }, + { 134,B134 }, + { 150,B150 }, + { 200,B200 }, + { 300,B300 }, + { 600,B600 }, + { 1200, B1200 }, + { 1800, B1800 }, + { 2400, B2400 }, +
svn commit: r275524 - head/sys/arm/ti
Author: andrew Date: Fri Dec 5 19:23:51 2014 New Revision: 275524 URL: https://svnweb.freebsd.org/changeset/base/275524 Log: Switch to a .cpu directive. These will work when clang 3.5 is imported where the .arch directive is a nop. MFC after:1 week Sponsored by: ABT Systems Ltd Modified: head/sys/arm/ti/ti_smc.S Modified: head/sys/arm/ti/ti_smc.S == --- head/sys/arm/ti/ti_smc.SFri Dec 5 19:19:17 2014(r275523) +++ head/sys/arm/ti/ti_smc.SFri Dec 5 19:23:51 2014(r275524) @@ -26,7 +26,7 @@ #include __FBSDID("$FreeBSD$"); - .arch armv7a + .cpu cortex-a8 .arch_extension sec /* Issue a smc #0 call */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275523 - head/sys/arm/arm
Author: andrew Date: Fri Dec 5 19:19:17 2014 New Revision: 275523 URL: https://svnweb.freebsd.org/changeset/base/275523 Log: Switch to an armv6k cpu, without this clang 3.5 complains "bx lr" is unsupported as it needs a newer cpu. MFC after:1 week Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/cpufunc_asm_arm11x6.S Modified: head/sys/arm/arm/cpufunc_asm_arm11x6.S == --- head/sys/arm/arm/cpufunc_asm_arm11x6.S Fri Dec 5 19:14:05 2014 (r275522) +++ head/sys/arm/arm/cpufunc_asm_arm11x6.S Fri Dec 5 19:19:17 2014 (r275523) @@ -62,7 +62,7 @@ #include __FBSDID("$FreeBSD$"); - .cpu arm1136js + .cpu arm1176jz-s #if 0 #define Invalidate_I_cache(Rtmp1, Rtmp2) \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275522 - head/sys/arm/arm
Author: andrew Date: Fri Dec 5 19:14:05 2014 New Revision: 275522 URL: https://svnweb.freebsd.org/changeset/base/275522 Log: Place the literal pool after a RET otherwise clang 3.5 tries to put it too far away from a ldr psuedo instruction. With this clang will place the literal value here where it's close enough to be loaded. MFC after:1 week Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/support.S Modified: head/sys/arm/arm/support.S == --- head/sys/arm/arm/support.S Fri Dec 5 19:11:25 2014(r275521) +++ head/sys/arm/arm/support.S Fri Dec 5 19:14:05 2014(r275522) @@ -1364,6 +1364,8 @@ ENTRY(memcpy) strbge r2, [r3], #0x01 strbgt ip, [r3] RET +/* Place a literal pool here for the above ldr instructions to use */ +.ltorg /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275521 - head/sys/arm/arm
Author: andrew Date: Fri Dec 5 19:11:25 2014 New Revision: 275521 URL: https://svnweb.freebsd.org/changeset/base/275521 Log: Set the alignment to 4-bytes after a string as clang 3.5 can switch to thumb mode if this is incorrect. MFC after:1 week Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/fusu.S Modified: head/sys/arm/arm/fusu.S == --- head/sys/arm/arm/fusu.S Fri Dec 5 19:08:36 2014(r275520) +++ head/sys/arm/arm/fusu.S Fri Dec 5 19:11:25 2014(r275521) @@ -271,7 +271,7 @@ _C_LABEL(fusubailout): fusupcbfaulttext: .asciz "Yikes - no valid PCB during fusuxxx() addr=%08x\n" - .align 0 + .align 2 #endif /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275520 - in head/sys: arm/arm libkern/arm
Author: andrew Date: Fri Dec 5 19:08:36 2014 New Revision: 275520 URL: https://svnweb.freebsd.org/changeset/base/275520 Log: Use the unified syntax in a few more assembly files MFC after:1 week Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/fusu.S head/sys/libkern/arm/ffs.S Modified: head/sys/arm/arm/fusu.S == --- head/sys/arm/arm/fusu.S Fri Dec 5 19:04:08 2014(r275519) +++ head/sys/arm/arm/fusu.S Fri Dec 5 19:08:36 2014(r275520) @@ -38,6 +38,8 @@ #include "assym.s" __FBSDID("$FreeBSD$"); + .syntax unified + #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ mrc p15, 0, tmp, c13, c0, 4; \ @@ -83,7 +85,7 @@ EENTRY_NP(casuword32) ldrtr5, [r0] cmp r5, r1 movne r0, r5 - streqt r2, [r0] + strteq r2, [r0] #endif moveq r0, r1 2: Modified: head/sys/libkern/arm/ffs.S == --- head/sys/libkern/arm/ffs.S Fri Dec 5 19:04:08 2014(r275519) +++ head/sys/libkern/arm/ffs.S Fri Dec 5 19:08:36 2014(r275520) @@ -31,6 +31,7 @@ #include __FBSDID("$FreeBSD$"); + .syntax unified /* * ffs - find first set bit, this algorithm isolates the first set @@ -62,7 +63,7 @@ ENTRY(ffs) rsbne r0, r0, r0, lsl #16 /* r0 = X * 0x0450fbaf */ /* now lookup in table indexed on top 6 bits of r0 */ - ldrneb r0, [ r2, r0, lsr #26 ] + ldrbne r0, [ r2, r0, lsr #26 ] RET .text; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275519 - head/sys/arm/xscale/ixp425
Author: andrew Date: Fri Dec 5 19:04:08 2014 New Revision: 275519 URL: https://svnweb.freebsd.org/changeset/base/275519 Log: Add missing END macros to some of the xscale functions. MFC after:1 week Sponsored by: ABT Systems Ltd Modified: head/sys/arm/xscale/ixp425/ixp425_a4x_io.S head/sys/arm/xscale/ixp425/ixp425_pci_asm.S Modified: head/sys/arm/xscale/ixp425/ixp425_a4x_io.S == --- head/sys/arm/xscale/ixp425/ixp425_a4x_io.S Fri Dec 5 19:00:55 2014 (r275518) +++ head/sys/arm/xscale/ixp425/ixp425_a4x_io.S Fri Dec 5 19:04:08 2014 (r275519) @@ -56,6 +56,7 @@ ENTRY(a4x_bs_r_1) ldr r0, [r1, r2, LSL #2] and r0, r0, #0xff mov pc, lr +END(a4x_bs_r_1) ENTRY(a4x_bs_r_2) ldr r0, [r1, r2, LSL #2] @@ -63,10 +64,12 @@ ENTRY(a4x_bs_r_2) orr r1, r1, r1, lsl #8 and r0, r0, r1 mov pc, lr +END(a4x_bs_r_2) ENTRY(a4x_bs_r_4) ldr r0, [r1, r2, LSL #2] mov pc, lr +END(a4x_bs_r_4) /* * Write single @@ -75,6 +78,7 @@ ENTRY(a4x_bs_w_1) and r3, r3, #0xff str r3, [r1, r2, LSL #2] mov pc, lr +END(a4x_bs_w_1) ENTRY(a4x_bs_w_2) mov r0, #0xff @@ -82,10 +86,12 @@ ENTRY(a4x_bs_w_2) and r3, r3, r0 str r3, [r1, r2, LSL #2] mov pc, lr +END(a4x_bs_w_2) ENTRY(a4x_bs_w_4) str r3, [r1, r2, LSL #2] mov pc, lr +END(a4x_bs_w_4) /* * Read multiple @@ -101,6 +107,7 @@ ENTRY(a4x_bs_rm_1) strbr3, [r1], #1 bne 1b mov pc, lr +END(a4x_bs_rm_1) ENTRY(a4x_bs_rm_2) add r0, r1, r2, lsl #2 @@ -113,6 +120,7 @@ ENTRY(a4x_bs_rm_2) strhr3, [r1], #2 bne 1b mov pc, lr +END(a4x_bs_rm_2) /* * Write multiple @@ -128,6 +136,7 @@ ENTRY(a4x_bs_wm_1) str r3, [r0] bne 1b mov pc, lr +END(a4x_bs_wm_1) ENTRY(a4x_bs_wm_2) add r0, r1, r2, lsl #2 @@ -140,3 +149,4 @@ ENTRY(a4x_bs_wm_2) str r3, [r0] bne 1b mov pc, lr +END(a4x_bs_wm_2) Modified: head/sys/arm/xscale/ixp425/ixp425_pci_asm.S == --- head/sys/arm/xscale/ixp425/ixp425_pci_asm.S Fri Dec 5 19:00:55 2014 (r275518) +++ head/sys/arm/xscale/ixp425/ixp425_pci_asm.S Fri Dec 5 19:04:08 2014 (r275519) @@ -58,6 +58,7 @@ ENTRY(ixp425_pci_mem_bs_r_1) ldrbr0, [r1, r2] #endif /* __ARMEB__ */ mov pc, lr +END(ixp425_pci_mem_bs_r_1) ENTRY(ixp425_pci_mem_bs_r_2) #ifdef __ARMEB__ @@ -68,10 +69,12 @@ ENTRY(ixp425_pci_mem_bs_r_2) ldrhr0, [r1, r2] #endif /* __ARMEB__ */ mov pc, lr +END(ixp425_pci_mem_bs_r_2) ENTRY(ixp425_pci_mem_bs_r_4) ldr r0, [r1, r2] mov pc, lr +END(ixp425_pci_mem_bs_r_4) /* * write single @@ -86,6 +89,7 @@ ENTRY(ixp425_pci_mem_bs_w_1) strbr3, [r1, r2] #endif /* __ARMEB__ */ mov pc, lr +END(ixp425_pci_mem_bs_w_1) ENTRY(ixp425_pci_mem_bs_w_2) #ifdef __ARMEB__ @@ -96,7 +100,9 @@ ENTRY(ixp425_pci_mem_bs_w_2) strhr3, [r1, r2] #endif /* __ARMEB__ */ mov pc, lr +END(ixp425_pci_mem_bs_w_2) ENTRY(ixp425_pci_mem_bs_w_4) str r3, [r1, r2] mov pc, lr +END(ixp425_pci_mem_bs_w_4) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275518 - head/lib/msun/src
Author: kargl Date: Fri Dec 5 19:00:55 2014 New Revision: 275518 URL: https://svnweb.freebsd.org/changeset/base/275518 Log: Update the constants associated with the evaluation of j0f(x) for |x| small. While here, remove the explicit cast of 0.25 to float. Replace a multiplication involving 0.25 by a division using an integer constant 4. Make a similar change in j0() to minimize the diff. Suggested by: bde Modified: head/lib/msun/src/e_j0.c head/lib/msun/src/e_j0f.c Modified: head/lib/msun/src/e_j0.c == --- head/lib/msun/src/e_j0.cFri Dec 5 18:55:32 2014(r275517) +++ head/lib/msun/src/e_j0.cFri Dec 5 19:00:55 2014(r275518) @@ -115,7 +115,7 @@ __ieee754_j0(double x) if(ix<0x3f20) { /* |x| < 2**-13 */ if(huge+x>one) {/* raise inexact if x != 0 */ if(ix<0x3e40) return one; /* |x|<2**-27 */ - else return one - 0.25*x*x; + else return one - x*x/4; } } z = x*x; Modified: head/lib/msun/src/e_j0f.c == --- head/lib/msun/src/e_j0f.c Fri Dec 5 18:55:32 2014(r275517) +++ head/lib/msun/src/e_j0f.c Fri Dec 5 19:00:55 2014(r275518) @@ -69,10 +69,10 @@ __ieee754_j0f(float x) } return z; } - if(ix<0x3900) { /* |x| < 2**-13 */ + if(ix<0x3c00) { /* |x| < 2**-7 */ if(huge+x>one) {/* raise inexact if x != 0 */ - if(ix<0x3200) return one; /* |x|<2**-27 */ - else return one - (float)0.25*x*x; + if(ix<0x3980) return one; /* |x|<2**-12 */ + else return one - x*x/4; } } z = x*x; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275516 - in stable/10/cddl/contrib/opensolaris/lib: libctf/common libdtrace/common
Author: markj Date: Fri Dec 5 18:55:31 2014 New Revision: 275516 URL: https://svnweb.freebsd.org/changeset/base/275516 Log: MFC r271695: Fix some incorrect endianness checks. Modified: stable/10/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c == --- stable/10/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Fri Dec 5 18:29:01 2014(r275515) +++ stable/10/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Fri Dec 5 18:55:31 2014(r275516) @@ -274,7 +274,7 @@ ctf_fdopen(int fd, int *errp) */ if (nbytes >= (ssize_t) sizeof (Elf32_Ehdr) && bcmp(&hdr.e32.e_ident[EI_MAG0], ELFMAG, SELFMAG) == 0) { -#ifdef _BIG_ENDIAN +#if BYTE_ORDER == _BIG_ENDIAN uchar_t order = ELFDATA2MSB; #else uchar_t order = ELFDATA2LSB; Modified: stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c == --- stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c Fri Dec 5 18:29:01 2014(r275515) +++ stable/10/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c Fri Dec 5 18:55:31 2014(r275516) @@ -167,7 +167,7 @@ print_bitfield(dt_printarg_t *pap, ulong * to the lowest 'size' bytes in 'value', and we need to shift based on * the offset from the end of the data, not the offset of the start. */ -#ifdef _BIG_ENDIAN +#if BYTE_ORDER == _BIG_ENDIAN buf += sizeof (value) - size; off += ep->cte_bits; #endif @@ -178,7 +178,7 @@ print_bitfield(dt_printarg_t *pap, ulong * Offsets are counted from opposite ends on little- and * big-endian machines. */ -#ifdef _BIG_ENDIAN +#if BYTE_ORDER == _BIG_ENDIAN shift = NBBY - shift; #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275517 - in stable/9/cddl/contrib/opensolaris/lib: libctf/common libdtrace/common
Author: markj Date: Fri Dec 5 18:55:32 2014 New Revision: 275517 URL: https://svnweb.freebsd.org/changeset/base/275517 Log: MFC r271695: Fix some incorrect endianness checks. Modified: stable/9/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c == --- stable/9/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Fri Dec 5 18:55:31 2014(r275516) +++ stable/9/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Fri Dec 5 18:55:32 2014(r275517) @@ -273,7 +273,7 @@ ctf_fdopen(int fd, int *errp) */ if (nbytes >= (ssize_t) sizeof (Elf32_Ehdr) && bcmp(&hdr.e32.e_ident[EI_MAG0], ELFMAG, SELFMAG) == 0) { -#ifdef _BIG_ENDIAN +#if BYTE_ORDER == _BIG_ENDIAN uchar_t order = ELFDATA2MSB; #else uchar_t order = ELFDATA2LSB; Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c == --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c Fri Dec 5 18:55:31 2014(r275516) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c Fri Dec 5 18:55:32 2014(r275517) @@ -167,7 +167,7 @@ print_bitfield(dt_printarg_t *pap, ulong * to the lowest 'size' bytes in 'value', and we need to shift based on * the offset from the end of the data, not the offset of the start. */ -#ifdef _BIG_ENDIAN +#if BYTE_ORDER == _BIG_ENDIAN buf += sizeof (value) - size; off += ep->cte_bits; #endif @@ -178,7 +178,7 @@ print_bitfield(dt_printarg_t *pap, ulong * Offsets are counted from opposite ends on little- and * big-endian machines. */ -#ifdef _BIG_ENDIAN +#if BYTE_ORDER == _BIG_ENDIAN shift = NBBY - shift; #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275515 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: delphij Date: Fri Dec 5 18:29:01 2014 New Revision: 275515 URL: https://svnweb.freebsd.org/changeset/base/275515 Log: Fix a regression introduced in r274337 (large block support) In dsl_dataset_hold_obj() we used zap_contains(.., DS_FIELD_LARGE_BLOCKS) to determine whether the extensible (zapifyed) dataset have large blocks. The code expects the result be either 0 (found) or ENOENT (not found), however reused the variable 'err' which later code expects to be 0. Fix this by adopting similar code construct that is used later for DS_FIELD_BOOKMARK_NAMES, which uses a temporary variable zaperr to catch errors from zap_* rountines. Reported by: Peter J. Creath (on FreeNAS; FreeNAS bug #6848) Illumos issue:5393 spurious failures from dsl_dataset_hold_obj() Reviewed by: mahrens Sponsored by: iXsystems, Inc. X-MFC with: r274337 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Dec 5 15:24:42 2014(r275514) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Dec 5 18:29:01 2014(r275515) @@ -409,11 +409,11 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin offsetof(dmu_sendarg_t, dsa_link)); if (doi.doi_type == DMU_OTN_ZAP_METADATA) { - err = zap_contains(mos, dsobj, DS_FIELD_LARGE_BLOCKS); - if (err == 0) + int zaperr = zap_contains(mos, dsobj, DS_FIELD_LARGE_BLOCKS); + if (zaperr != ENOENT) { + VERIFY0(zaperr); ds->ds_large_blocks = B_TRUE; - else - ASSERT3U(err, ==, ENOENT); + } } if (err == 0) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275514 - in head/sys: sys vm
Author: jhb Date: Fri Dec 5 15:24:42 2014 New Revision: 275514 URL: https://svnweb.freebsd.org/changeset/base/275514 Log: Always ignore the deprecated MAP_RENAME and MAP_NORESERVE flags to mmap(). Some old libraries may be used even with newer binaries (specifically the Nvidia driver libraries). Differential Revision:https://reviews.freebsd.org/D1262 Reviewed by: kib Modified: head/sys/sys/param.h head/sys/vm/vm_mmap.c Modified: head/sys/sys/param.h == --- head/sys/sys/param.hFri Dec 5 15:02:30 2014(r275513) +++ head/sys/sys/param.hFri Dec 5 15:24:42 2014(r275514) @@ -81,7 +81,6 @@ #defineP_OSREL_SIGSEGV 74 #defineP_OSREL_MAP_ANON800104 #defineP_OSREL_MAP_FSTRICT 1100036 -#defineP_OSREL_MAP_RENAME 1100039 #defineP_OSREL_MAJOR(x)((x) / 10) #endif Modified: head/sys/vm/vm_mmap.c == --- head/sys/vm/vm_mmap.c Fri Dec 5 15:02:30 2014(r275513) +++ head/sys/vm/vm_mmap.c Fri Dec 5 15:24:42 2014(r275514) @@ -222,8 +222,7 @@ sys_mmap(td, uap) /* * Ignore old flags that used to be defined but did not do anything. */ - if (td->td_proc->p_osrel < P_OSREL_MAP_RENAME) - flags &= ~(MAP_RESERVED0020 | MAP_RESERVED0040); + flags &= ~(MAP_RESERVED0020 | MAP_RESERVED0040); /* * Enforce the constraints. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275513 - head/sys/vm
Author: kib Date: Fri Dec 5 15:02:30 2014 New Revision: 275513 URL: https://svnweb.freebsd.org/changeset/base/275513 Log: When the last reference on the vnode' vm object is dropped, read the vp->v_vflag without taking vnode lock and without bypass. We do know that vp is the lowest level in the stack, since the pointer is obtained from the object' handle. Stale VV_TEXT flag read can only happen if parallel execve() is performed and not yet activated the image, since process takes reference for text mapping. In this case, the execve() code manages the VV_TEXT flag on its own already. It was observed that otherwise read-only sendfile(2) requires exclusive vnode lock and contending on it on some loads for VV_TEXT handling. Reported by: glebius, scottl Tested by:glebius, pho Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c == --- head/sys/vm/vm_object.c Fri Dec 5 13:30:45 2014(r275512) +++ head/sys/vm/vm_object.c Fri Dec 5 15:02:30 2014(r275513) @@ -468,7 +468,12 @@ vm_object_vndeallocate(vm_object_t objec } #endif - if (object->ref_count > 1) { + /* +* The test for text of vp vnode does not need a bypass to +* reach right VV_TEXT there, since it is obtained from +* object->handle. +*/ + if (object->ref_count > 1 || (vp->v_vflag & VV_TEXT) == 0) { object->ref_count--; VM_OBJECT_WUNLOCK(object); /* vrele may need the vnode lock. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275512 - head/sys/cam/ctl
Author: mav Date: Fri Dec 5 13:30:45 2014 New Revision: 275512 URL: https://svnweb.freebsd.org/changeset/base/275512 Log: In addition to r275481 allow threshold notifications work without UNMAP. While without UNMAP support there is not much initiator can do about it, the administrator still better be notified about the storage overflow. MFC after:2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c == --- head/sys/cam/ctl/ctl.c Fri Dec 5 12:51:27 2014(r275511) +++ head/sys/cam/ctl/ctl.c Fri Dec 5 13:30:45 2014(r275512) @@ -4347,8 +4347,7 @@ ctl_init_log_page_index(struct ctl_lun * continue; if (page_index->page_code == SLS_LOGICAL_BLOCK_PROVISIONING && - ((lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) == 0 || -lun->backend->lun_attr == NULL)) +lun->backend->lun_attr == NULL) continue; if (page_index->page_code != prev) { @@ -10253,8 +10252,8 @@ ctl_inquiry_evpd_lbp(struct ctl_scsiio * lbp_ptr->page_code = SVPD_LBP; scsi_ulto2b(sizeof(*lbp_ptr) - 4, lbp_ptr->page_length); + lbp_ptr->threshold_exponent = CTL_LBP_EXPONENT; if (lun != NULL && lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) { - lbp_ptr->threshold_exponent = CTL_LBP_EXPONENT; lbp_ptr->flags = SVPD_LBP_UNMAP | SVPD_LBP_WS16 | SVPD_LBP_WS10 | SVPD_LBP_RZ | SVPD_LBP_ANC_SUP; lbp_ptr->prov_type = SVPD_LBP_THIN; @@ -14002,7 +14001,6 @@ ctl_thresh_thread(void *arg) be_lun = lun->be_lun; if ((lun->flags & CTL_LUN_DISABLED) || (lun->flags & CTL_LUN_OFFLINE) || - (be_lun->flags & CTL_LUN_FLAG_UNMAP) == 0 || lun->backend->lun_attr == NULL) continue; rwpage = &lun->mode_pages.rw_er_page[CTL_PAGE_CURRENT]; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275511 - in stable/10: . sbin/mdconfig/tests
Author: ngie Date: Fri Dec 5 12:51:27 2014 New Revision: 275511 URL: https://svnweb.freebsd.org/changeset/base/275511 Log: MFC r275170: Convert sbin/mdconfig/tests from prove format tests to ATF format tests As a side effect... 1. The tests now checks for the root user before continuing with kyua, which is more visible than the test being skipped with the TAP protocol 2. The tests work with devices that aren't /dev/md0 by caching the device attached during the test to a file, and later use the cached information to detach the device in the cleanup routine 3. The tests no longer require perl to run PR: 191191 Sponsored by: EMC / Isilon Storage Division Added: stable/10/sbin/mdconfig/tests/mdconfig_test.sh - copied unchanged from r275170, head/sbin/mdconfig/tests/mdconfig_test.sh Deleted: stable/10/sbin/mdconfig/tests/legacy_test.sh stable/10/sbin/mdconfig/tests/mdconfig.test stable/10/sbin/mdconfig/tests/run.pl Modified: stable/10/ObsoleteFiles.inc stable/10/sbin/mdconfig/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc == --- stable/10/ObsoleteFiles.inc Fri Dec 5 12:38:01 2014(r275510) +++ stable/10/ObsoleteFiles.inc Fri Dec 5 12:51:27 2014(r275511) @@ -38,6 +38,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20141205: convert sbin/mdconfig/tests to ATF format tests +OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test +OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test +OLD_FILES+=usr/tests/sbin/mdconfig/run.pl # 20141028: debug files accidentally installed as directory name OLD_FILES+=usr/lib/debug/usr/lib/i18n OLD_FILES+=usr/lib/debug/usr/lib/private Modified: stable/10/sbin/mdconfig/tests/Makefile == --- stable/10/sbin/mdconfig/tests/Makefile Fri Dec 5 12:38:01 2014 (r275510) +++ stable/10/sbin/mdconfig/tests/Makefile Fri Dec 5 12:51:27 2014 (r275511) @@ -2,12 +2,9 @@ TESTSDIR= ${TESTSBASE}/sbin/mdconfig -TAP_TESTS_SH= legacy_test -TAP_TESTS_SH_SED_legacy_test= 's,__PERL__,${TAP_PERL_INTERPRETER},g' -TEST_METADATA.legacy_test+=required_programs="${TAP_PERL_INTERPRETER}" +ATF_TESTS_SH= mdconfig_test -FILESDIR= ${TESTSDIR} -FILES= mdconfig.test -FILES+=run.pl + +TEST_METADATA.mdconfig_test+= required_user="root" .include Copied: stable/10/sbin/mdconfig/tests/mdconfig_test.sh (from r275170, head/sbin/mdconfig/tests/mdconfig_test.sh) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sbin/mdconfig/tests/mdconfig_test.sh Fri Dec 5 12:51:27 2014(r275511, copy of r275170, head/sbin/mdconfig/tests/mdconfig_test.sh) @@ -0,0 +1,281 @@ +# Copyright (c) 2012 Edward Tomasz Napierała +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +check_diskinfo() +{ + local md=$1 + local mediasize_in_bytes=$2 + local mediasize_in_sectors=$3 + local sectorsize=${4:-512} + local stripesize=${5:-0} + local stripeoffset=${6:-0} + + atf_check -s exit:0 \ + -o match:"/dev/$md *$sectorsize *$mediasize_in_bytes *$mediasize_in_sectors *$stripesize *$stripeoffset" \ + -x "diskinfo /dev/$md | expand" +} + +cleanup_common() +{ + if [ -f mdconfig.out ]; then + mdconfig -d -u $(sed -e 's/md//' mdconfig
svn commit: r275510 - in head: sbin/iscontrol usr.bin/iscsictl
Author: trasz Date: Fri Dec 5 12:38:01 2014 New Revision: 275510 URL: https://svnweb.freebsd.org/changeset/base/275510 Log: Move iscsi.conf.5 from sbin/iscontrol/ to usr.bin/iscsictl/, as the former is obsolete. MFC after:2 weeks Sponsored by: The FreeBSD Foundation Added: head/usr.bin/iscsictl/iscsi.conf.5 - copied unchanged from r275500, head/sbin/iscontrol/iscsi.conf.5 Deleted: head/sbin/iscontrol/iscsi.conf.5 Modified: head/sbin/iscontrol/Makefile head/usr.bin/iscsictl/Makefile Modified: head/sbin/iscontrol/Makefile == --- head/sbin/iscontrol/MakefileFri Dec 5 12:25:36 2014 (r275509) +++ head/sbin/iscontrol/MakefileFri Dec 5 12:38:01 2014 (r275510) @@ -8,6 +8,6 @@ S= ${.CURDIR}/../../sys WARNS?=3 CFLAGS+= -I$S -MAN= iscsi.conf.5 iscontrol.8 +MAN= iscontrol.8 .include Modified: head/usr.bin/iscsictl/Makefile == --- head/usr.bin/iscsictl/Makefile Fri Dec 5 12:25:36 2014 (r275509) +++ head/usr.bin/iscsictl/Makefile Fri Dec 5 12:38:01 2014 (r275510) @@ -4,7 +4,7 @@ PROG= iscsictl SRCS= iscsictl.c periphs.c parse.y token.l y.tab.h CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi -MAN= iscsictl.8 +MAN= iscsi.conf.5 iscsictl.8 LIBADD=cam util Copied: head/usr.bin/iscsictl/iscsi.conf.5 (from r275500, head/sbin/iscontrol/iscsi.conf.5) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/iscsictl/iscsi.conf.5 Fri Dec 5 12:38:01 2014 (r275510, copy of r275500, head/sbin/iscontrol/iscsi.conf.5) @@ -0,0 +1,188 @@ +.\" Copyright (c) 2007-2010 Daniel Braniss +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 17, 2013 +.Dt ISCSI.CONF 5 +.Os +.Sh NAME +.Nm iscsi.conf +.Nd iSCSI initiator configuration file +.Sh DESCRIPTION +The file +.Nm , +is used by the +.Xr iscsictl 8 +and +.Xr iscontrol 8 +utilities. +It contains declarations and parameter/key-options. +The syntax is very simple, +.D1 Li variable = value; +and they can be grouped via a +.Em block +declaration: +.Bf Li +.Bd -literal + # this is a comment + target_1 { # nickname + variable = value; + ... + } # this must be on a line by itself. +.Ed +.Ef +.Pp +The following are specified in the iSCSI RFC 3720, +for a full description see sections 11/12 of the RFC. +.Bl -tag -width MaxConnections +.It Cm AuthMethod +currently only supported authentication method is CHAP, with +digest either MD5 or SHA. +Default is none. +.It Cm HeaderDigest +a +.Em digest +is calculated on the header of all iSCSI PDUs, and +checked. +Only CRC32C is implemented. +Default is none. +.It Cm DataDigest +same as for HeaderDigest, but on the data part of the iSCSI PDU. +(not yet tested) +.It Cm TargetName +is the name by which the target is known, not to be confused with +target address, either obtained via the target administrator, or +from a +.Em discovery session . +.It Cm InitiatorName +if not specified, defaults to +.Sy iqn.2005-01.il.ac.huji.cs: +.Aq hostname . +.It Cm TargetAddress +is of the form +.Sy domainname[:port][,portal-group-tag] +to quote the RFC: +.Bd -ragged -compact +The domainname can be specified as either a DNS host name, a +dotted-decimal IPv4 address, or a bracketed IPv6 address as specified +in [RFC2732]. +.Ed +Note: portal-group-tag is unu
svn commit: r275509 - stable/10/contrib/tzcode/stdtime
Author: ngie Date: Fri Dec 5 12:25:36 2014 New Revision: 275509 URL: https://svnweb.freebsd.org/changeset/base/275509 Log: MFC r274365: Revert WiP to contrib/tzcode accidentally committed with r274364 Modified: stable/10/contrib/tzcode/stdtime/localtime.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tzcode/stdtime/localtime.c == --- stable/10/contrib/tzcode/stdtime/localtime.cFri Dec 5 12:23:29 2014(r275508) +++ stable/10/contrib/tzcode/stdtime/localtime.cFri Dec 5 12:25:36 2014(r275509) @@ -1792,11 +1792,7 @@ int delta; number0 = *number; *number += delta; - if ((*number < number0) != (delta < 0)) { - errno = EOVERFLOW; - return (1); - } - return (0); + return (*number < number0) != (delta < 0); } static int @@ -1808,11 +1804,7 @@ int delta; number0 = *number; *number += delta; - if ((*number < number0) != (delta < 0)) { - errno = EOVERFLOW; - return (1); - } - return (0); + return (*number < number0) != (delta < 0); } static int ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275508 - in stable/10: contrib/telnet/arpa contrib/telnet/telnet contrib/telnet/telnetd contrib/tzcode/stdtime libexec/telnetd
Author: ngie Date: Fri Dec 5 12:23:29 2014 New Revision: 275508 URL: https://svnweb.freebsd.org/changeset/base/275508 Log: MFC r274364: Add baud rate support to telnet(1) This implements part of RFC-2217 It's based off a patch originally written by Sujal Patel at Isilon, and contributions from other Isilon employees. PR: 173728 Phabric: D995 Reviewed by: markj, markm Sponsored by: EMC / Isilon Storage Division Added: stable/10/contrib/telnet/telnet/baud.h - copied unchanged from r274364, head/contrib/telnet/telnet/baud.h Modified: stable/10/contrib/telnet/arpa/telnet.h stable/10/contrib/telnet/telnet/commands.c stable/10/contrib/telnet/telnet/externs.h stable/10/contrib/telnet/telnet/main.c stable/10/contrib/telnet/telnet/sys_bsd.c stable/10/contrib/telnet/telnet/telnet.1 stable/10/contrib/telnet/telnet/telnet.c stable/10/contrib/telnet/telnet/types.h stable/10/contrib/telnet/telnetd/sys_term.c stable/10/contrib/tzcode/stdtime/localtime.c stable/10/libexec/telnetd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/telnet/arpa/telnet.h == --- stable/10/contrib/telnet/arpa/telnet.h Fri Dec 5 12:07:53 2014 (r275507) +++ stable/10/contrib/telnet/arpa/telnet.h Fri Dec 5 12:23:29 2014 (r275508) @@ -127,6 +127,7 @@ extern char *telcmds[]; #defineTELOPT_KERMIT 47 /* RFC2840 - Kermit */ #defineTELOPT_EXOPL255 /* extended-options-list */ +#defineCOMPORT_SET_BAUDRATE1 /* RFC2217 - Com Port Set Baud Rate */ #defineNTELOPTS(1+TELOPT_KERMIT) #ifdef TELOPTS Copied: stable/10/contrib/telnet/telnet/baud.h (from r274364, head/contrib/telnet/telnet/baud.h) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/telnet/telnet/baud.h Fri Dec 5 12:23:29 2014 (r275508, copy of r274364, head/contrib/telnet/telnet/baud.h) @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2014 EMC Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Try to guess whether speeds are "encoded" (4.2BSD) or just numeric (4.4BSD). + */ +#if B4800 != 4800 +#defineDECODE_BAUD +#endif + +#ifdef DECODE_BAUD +#ifndefB7200 +#define B7200 B4800 +#endif + +#ifndefB14400 +#define B14400 B9600 +#endif + +#ifndefB19200 +#define B19200 B14400 +#endif + +#ifndefB28800 +#define B28800 B19200 +#endif + +#ifndefB38400 +#define B38400 B28800 +#endif + +#ifndef B57600 +#define B57600 B38400 +#endif + +#ifndef B76800 +#define B76800 B57600 +#endif + +#ifndef B115200 +#define B115200 B76800 +#endif + +#ifndef B115200 +#define B115200 B76800 +#endif +#endif + +#ifndef B230400 +#define B230400 B115200 +#endif + +/* + * A table of available terminal speeds + */ +struct termspeeds termspeeds[] = { + { 0, B0 }, + { 50, B50 }, + { 75, B75 }, + { 110,B110 }, + { 134,B134 }, + { 150,B150 }, + { 200,B200 }, + { 300,B300 }, + { 600,B600 }, + { 1200, B1200 }, + { 1800, B1800 }, + { 2400, B2400 }, + { 4800, B4800 }, +#ifdef B7200 + { 7200, B7200 }, +#endif + { 9600, B9600 }, +#ifdef B14400 + { 14400, B14400 }, +#endif +#ifdef B19200 + { 19200, B19200 }, +#endif +#ifdef B28800 + { 28800, B28800 }, +#endif +#ifdef B38400 + { 38400, B38400 }, +#endif +#ifdef B
Re: svn commit: r275468 - head/sys/dev/usb/controller
Done. See r275507 . --HPS ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275507 - head/sys/dev/usb/controller
Author: hselasky Date: Fri Dec 5 12:07:53 2014 New Revision: 275507 URL: https://svnweb.freebsd.org/changeset/base/275507 Log: Optimise bit searching loop by using the ffs() function. Make some related bit shifts unsigned while at it. Modified: head/sys/dev/usb/controller/saf1761_otg.c Modified: head/sys/dev/usb/controller/saf1761_otg.c == --- head/sys/dev/usb/controller/saf1761_otg.c Fri Dec 5 12:04:47 2014 (r275506) +++ head/sys/dev/usb/controller/saf1761_otg.c Fri Dec 5 12:07:53 2014 (r275507) @@ -58,6 +58,7 @@ #include #include #include +#include #include #include @@ -216,7 +217,7 @@ static uint8_t saf1761_host_channel_alloc(struct saf1761_otg_softc *sc, struct saf1761_otg_td *td) { uint32_t map; - uint32_t x; + int x; if (td->channel < SOTG_HOST_CHANNEL_MAX) return (0); @@ -227,41 +228,38 @@ saf1761_host_channel_alloc(struct saf176 switch (td->ep_type) { case UE_INTERRUPT: - map = sc->sc_host_intr_map | + map = ~(sc->sc_host_intr_map | sc->sc_host_intr_busy_map[0] | - sc->sc_host_intr_busy_map[1]; - for (x = ((map & 0x) == 0x) ? 16 : 0; x != 32; x++) { - if (map & (1 << x)) - continue; - sc->sc_host_intr_map |= (1 << x); - td->channel = 32 + x; - return (0); - } - break; + sc->sc_host_intr_busy_map[1]); + /* find first set bit */ + x = ffs(map) - 1; + if (x < 0 || x > 31) + break; + sc->sc_host_intr_map |= (1U << x); + td->channel = 32 + x; + return (0); case UE_ISOCHRONOUS: - map = sc->sc_host_isoc_map | + map = ~(sc->sc_host_isoc_map | sc->sc_host_isoc_busy_map[0] | - sc->sc_host_isoc_busy_map[1]; - for (x = ((map & 0x) == 0x) ? 16 : 0; x != 32; x++) { - if (map & (1 << x)) - continue; - sc->sc_host_isoc_map |= (1 << x); - td->channel = x; - return (0); - } - break; + sc->sc_host_isoc_busy_map[1]); + /* find first set bit */ + x = ffs(map) - 1; + if (x < 0 || x > 31) + break; + sc->sc_host_isoc_map |= (1U << x); + td->channel = x; + return (0); default: - map = sc->sc_host_async_map | + map = ~(sc->sc_host_async_map | sc->sc_host_async_busy_map[0] | - sc->sc_host_async_busy_map[1]; - for (x = ((map & 0x) == 0x) ? 16 : 0; x != 32; x++) { - if (map & (1 << x)) - continue; - sc->sc_host_async_map |= (1 << x); - td->channel = 64 + x; - return (0); - } - break; + sc->sc_host_async_busy_map[1]); + /* find first set bit */ + x = ffs(map) - 1; + if (x < 0 || x > 31) + break; + sc->sc_host_async_map |= (1U << x); + td->channel = 64 + x; + return (0); } return (1); } @@ -278,27 +276,27 @@ saf1761_host_channel_free(struct saf1761 case UE_INTERRUPT: x = td->channel - 32; td->channel = SOTG_HOST_CHANNEL_MAX; - sc->sc_host_intr_map &= ~(1 << x); - sc->sc_host_intr_suspend_map &= ~(1 << x); - sc->sc_host_intr_busy_map[0] |= (1 << x); + sc->sc_host_intr_map &= ~(1U << x); + sc->sc_host_intr_suspend_map &= ~(1U << x); + sc->sc_host_intr_busy_map[0] |= (1U << x); SAF1761_WRITE_LE_4(sc, SOTG_INT_PTD_SKIP_PTD, (~sc->sc_host_intr_map) | sc->sc_host_intr_suspend_map); break; case UE_ISOCHRONOUS: x = td->channel; td->channel = SOTG_HOST_CHANNEL_MAX; - sc->sc_host_isoc_map &= ~(1 << x); - sc->sc_host_isoc_suspend_map &= ~(1 << x); - sc->sc_host_isoc_busy_map[0] |= (1 << x); + sc->sc_host_isoc_map &= ~(1U << x); + sc->sc_host_isoc_suspend_map &= ~(1U << x); + sc->sc_host_isoc_busy_map[0] |= (1U << x); SAF1761_WRITE_LE_4(sc, SOTG_ISO_PTD_SKIP_PTD, (~sc->sc_host_isoc_map) | sc->sc_host_isoc_suspend_map); break;
svn commit: r275506 - head/sys/boot/kshim
Author: hselasky Date: Fri Dec 5 12:04:47 2014 New Revision: 275506 URL: https://svnweb.freebsd.org/changeset/base/275506 Log: Define the ffs() function in the USB bootloader's global and independent header file. Modified: head/sys/boot/kshim/bsd_kernel.h Modified: head/sys/boot/kshim/bsd_kernel.h == --- head/sys/boot/kshim/bsd_kernel.hFri Dec 5 11:58:32 2014 (r275505) +++ head/sys/boot/kshim/bsd_kernel.hFri Dec 5 12:04:47 2014 (r275506) @@ -109,6 +109,8 @@ SYSINIT_ENTRY(uniq##_entry, "sysuninit", #definecold 0 #defineBUS_PROBE_GENERIC 0 #defineCALLOUT_RETURNUNLOCKED 0x1 +#undef ffs +#defineffs(x) __builtin_ffs(x) #undef va_list #defineva_list __builtin_va_list #undef va_size ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275505 - stable/9/tools/regression/pjdfstest
Author: ngie Date: Fri Dec 5 11:58:32 2014 New Revision: 275505 URL: https://svnweb.freebsd.org/changeset/base/275505 Log: MFstable/10 r275501: MFC r271796 (by will): Use 'cc' for the C compiler instead of 'gcc'. Sponsored by: Spectra Logic MFSpectraBSD: 1079507 on 2014/07/24 Modified: stable/9/tools/regression/pjdfstest/Makefile Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) Modified: stable/9/tools/regression/pjdfstest/Makefile == --- stable/9/tools/regression/pjdfstest/MakefileFri Dec 5 11:44:18 2014(r275504) +++ stable/9/tools/regression/pjdfstest/MakefileFri Dec 5 11:58:32 2014(r275505) @@ -18,7 +18,7 @@ ${PROG}: ${PROG}.c echo "Unsupported operating system: ${OSTYPE}."; \ exit 1; \ fi; \ - cmd="gcc -Wall $$CFLAGS ${PROG}.c -o ${PROG}"; \ + cmd="cc -Wall $$CFLAGS ${PROG}.c -o ${PROG}"; \ echo $$cmd; \ $$cmd ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r275468 - head/sys/dev/usb/controller
Hans Petter Selasky writes: > I see. Who can update the cpufunc.h header file to use the builtins? Ask someone involved with porting FreeBSD to that platform. > Are these also available with GCC? They are enabled unconditionally for amd64 and i386. They may or may not be compiler-dependent on other platforms. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275504 - in stable/10: . contrib/pjdfstest contrib/pjdfstest/tests/chflags contrib/pjdfstest/tests/chmod contrib/pjdfstest/tests/chown contrib/pjdfstest/tests/ftruncate contrib/pjdfste...
Author: ngie Date: Fri Dec 5 11:44:18 2014 New Revision: 275504 URL: https://svnweb.freebsd.org/changeset/base/275504 Log: MFC r272057,r272083,r272084,r272087,r274016: r272057: Import pjdfstest from ^/vendor/pjdfstest/abf03c3a47745d4521b0e4aa141317553ca48f91 - Remove tools/regression/pjdfstest - Add upgrade directions for contrib/pjdfstest - Add a note to UPDATING for the move (the reachover Makefiles are coming soon) Functional differences: - ftruncate testcases are added from upstream (github) Non-functional differences: - The copyright for the project has been updated to 2012 - pjd's contact information has been updated Discussed with: -testing, jmmv, pjd Sponsored by: EMC / Isilon Storage Division r272083: Expect ELOOP on Darwin/Linux with "O_NOFOLLOW was specified and the target is a symbolic link" case. Assume EMLINK on the rest of the OSes (FreeBSD, Solaris, etc) Sponsored by: EMC / Isilon Storage Division r272084: Fix the executed testplan count Sponsored by: EMC / Isilon Storage Division r272087: Increase the memory disk size in the following testcases to avoid mount failures, which would cause cascade failures in the rest of the test run: link/15.t, open/19.t, mkdir/11.t, mkfifo/11.t, symlink/11.t Fail quickly in all of the testcases if mdconfig, mount, umount, etc fails to avoid issues similar to this in the future Submitted by: Casey Peel Sponsored by: EMC / Isilon Storage Division r274016: Integrate pjdfstest test suite execution into kyua pjdfstest execution is opt-in and must be done as root due to some of the assumptions made by the test suite and lack of error checking in the non-root case A description of how to execute pjdfstest with kyua is provided in share/pjdfstest/README Phabric: D824 (an earlier prototype patch) Relnotes: yes Sponsored by: EMC / Isilon Storage Division Added: stable/10/contrib/pjdfstest/ - copied from r272057, head/contrib/pjdfstest/ stable/10/share/doc/pjdfstest/ - copied from r274016, head/share/doc/pjdfstest/ stable/10/tests/sys/pjdfstest/ - copied from r274016, head/tests/sys/pjdfstest/ Modified: stable/10/UPDATING stable/10/contrib/pjdfstest/tests/chflags/12.t stable/10/contrib/pjdfstest/tests/chmod/09.t stable/10/contrib/pjdfstest/tests/chown/09.t stable/10/contrib/pjdfstest/tests/ftruncate/00.t stable/10/contrib/pjdfstest/tests/ftruncate/10.t stable/10/contrib/pjdfstest/tests/link/05.t stable/10/contrib/pjdfstest/tests/link/14.t stable/10/contrib/pjdfstest/tests/link/15.t stable/10/contrib/pjdfstest/tests/link/16.t stable/10/contrib/pjdfstest/tests/mkdir/09.t stable/10/contrib/pjdfstest/tests/mkdir/11.t stable/10/contrib/pjdfstest/tests/mkfifo/08.t stable/10/contrib/pjdfstest/tests/mkfifo/11.t stable/10/contrib/pjdfstest/tests/open/14.t stable/10/contrib/pjdfstest/tests/open/15.t stable/10/contrib/pjdfstest/tests/open/16.t stable/10/contrib/pjdfstest/tests/open/19.t stable/10/contrib/pjdfstest/tests/rename/15.t stable/10/contrib/pjdfstest/tests/rename/16.t stable/10/contrib/pjdfstest/tests/rmdir/13.t stable/10/contrib/pjdfstest/tests/rmdir/14.t stable/10/contrib/pjdfstest/tests/symlink/10.t stable/10/contrib/pjdfstest/tests/symlink/11.t stable/10/contrib/pjdfstest/tests/truncate/10.t stable/10/contrib/pjdfstest/tests/unlink/12.t stable/10/etc/mtree/BSD.tests.dist stable/10/share/doc/Makefile stable/10/tests/sys/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING == --- stable/10/UPDATING Fri Dec 5 10:23:18 2014(r275503) +++ stable/10/UPDATING Fri Dec 5 11:44:18 2014(r275504) @@ -16,6 +16,11 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20141205: + pjdfstest has been integrated into kyua as an opt-in test suite. + Please see share/doc/pjdfstest/README for a more details on how to + execute it. + 20141118: 10.1-RELEASE. Modified: stable/10/contrib/pjdfstest/tests/chflags/12.t == --- head/contrib/pjdfstest/tests/chflags/12.t Wed Sep 24 07:00:35 2014 (r272057) +++ stable/10/contrib/pjdfstest/tests/chflags/12.t Fri Dec 5 11:44:18 2014(r275504) @@ -16,8 +16,8 @@ FreeBSD:UFS) n1=`namegen` expect 0 mkdir ${n0} 0755 - n=`mdconfig -a -n -t malloc -s 1m` - newfs /dev/md${n} >/dev/null + n=`mdconfig -a -n -t malloc -s 1m` || exit + newfs /dev/md${n} >/dev/null || exit
svn commit: r275503 - head/sys/geom/raid
Author: mav Date: Fri Dec 5 10:23:18 2014 New Revision: 275503 URL: https://svnweb.freebsd.org/changeset/base/275503 Log: Avoid unneeded malloc/memcpy/free if there is no metadata on disk. Submitted by: Dmitry Luhtionov MFC after:2 weeks Modified: head/sys/geom/raid/md_nvidia.c head/sys/geom/raid/md_sii.c Modified: head/sys/geom/raid/md_nvidia.c == --- head/sys/geom/raid/md_nvidia.c Fri Dec 5 09:30:07 2014 (r275502) +++ head/sys/geom/raid/md_nvidia.c Fri Dec 5 10:23:18 2014 (r275503) @@ -256,23 +256,24 @@ nvidia_meta_read(struct g_consumer *cp) pp->name, error); return (NULL); } - meta = malloc(sizeof(*meta), M_MD_NVIDIA, M_WAITOK); - memcpy(meta, buf, min(sizeof(*meta), pp->sectorsize)); - g_free(buf); + meta = (struct nvidia_raid_conf *)buf; /* Check if this is an NVIDIA RAID struct */ if (strncmp(meta->nvidia_id, NVIDIA_MAGIC, strlen(NVIDIA_MAGIC))) { G_RAID_DEBUG(1, "NVIDIA signature check failed on %s", pp->name); - free(meta, M_MD_NVIDIA); + g_free(buf); return (NULL); } if (meta->config_size > 128 || meta->config_size < 30) { G_RAID_DEBUG(1, "NVIDIA metadata size looks wrong: %d", meta->config_size); - free(meta, M_MD_NVIDIA); + g_free(buf); return (NULL); } + meta = malloc(sizeof(*meta), M_MD_NVIDIA, M_WAITOK); + memcpy(meta, buf, min(sizeof(*meta), pp->sectorsize)); + g_free(buf); /* Check metadata checksum. */ for (checksum = 0, ptr = (uint32_t *)meta, Modified: head/sys/geom/raid/md_sii.c == --- head/sys/geom/raid/md_sii.c Fri Dec 5 09:30:07 2014(r275502) +++ head/sys/geom/raid/md_sii.c Fri Dec 5 10:23:18 2014(r275503) @@ -277,15 +277,13 @@ sii_meta_read(struct g_consumer *cp) pp->name, error); return (NULL); } - meta = malloc(sizeof(*meta), M_MD_SII, M_WAITOK); - memcpy(meta, buf, min(sizeof(*meta), pp->sectorsize)); - g_free(buf); + meta = (struct sii_raid_conf *)buf; /* Check vendor ID. */ if (meta->vendor_id != 0x1095) { G_RAID_DEBUG(1, "SiI vendor ID check failed on %s (0x%04x)", pp->name, meta->vendor_id); - free(meta, M_MD_SII); + g_free(buf); return (NULL); } @@ -293,9 +291,12 @@ sii_meta_read(struct g_consumer *cp) if (meta->version_major != 2) { G_RAID_DEBUG(1, "SiI version check failed on %s (%d.%d)", pp->name, meta->version_major, meta->version_minor); - free(meta, M_MD_SII); + g_free(buf); return (NULL); } + meta = malloc(sizeof(*meta), M_MD_SII, M_WAITOK); + memcpy(meta, buf, min(sizeof(*meta), pp->sectorsize)); + g_free(buf); /* Check metadata checksum. */ for (checksum = 0, ptr = (uint16_t *)meta, i = 0; i <= 159; i++) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r275468 - head/sys/dev/usb/controller
Hans Petter Selasky writes: > Is ffs() available in the loader too? Because this code is also built > for the loader? I guess I could figure this out myself though ... The loader usues libkern, so yes. But it's easy enough to check - just modify the code to use ffs() and see if it builds. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r275468 - head/sys/dev/usb/controller
On 12/05/14 10:33, Dag-Erling Smørgrav wrote: John-Mark Gurney writes: So this says that you think it should be using the builtin, yet when I suggested it, you say no? Which is it? Use ffs(), let libkern worry about how it's implemented. DES Hi, One more question. Is ffs() available in the loader too? Because this code is also built for the loader? I guess I could figure this out myself though ... --HPS ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r275468 - head/sys/dev/usb/controller
John-Mark Gurney writes: > So this says that you think it should be using the builtin, yet when I > suggested it, you say no? Which is it? Use ffs(), let libkern worry about how it's implemented. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275502 - stable/10/sys/kern
Author: kib Date: Fri Dec 5 09:30:07 2014 New Revision: 275502 URL: https://svnweb.freebsd.org/changeset/base/275502 Log: MFC r275206: Assert the state of the process lock and sigact mutex in kern_sigprocmask() and reschedule_signals(). Modified: stable/10/sys/kern/kern_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sig.c == --- stable/10/sys/kern/kern_sig.c Fri Dec 5 08:46:15 2014 (r275501) +++ stable/10/sys/kern/kern_sig.c Fri Dec 5 09:30:07 2014 (r275502) @@ -1003,8 +1003,12 @@ kern_sigprocmask(struct thread *td, int int error; p = td->td_proc; - if (!(flags & SIGPROCMASK_PROC_LOCKED)) + if ((flags & SIGPROCMASK_PROC_LOCKED) != 0) + PROC_LOCK_ASSERT(p, MA_OWNED); + else PROC_LOCK(p); + mtx_assert(&p->p_sigacts->ps_mtx, (flags & SIGPROCMASK_PS_LOCKED) != 0 + ? MA_OWNED : MA_NOTOWNED); if (oset != NULL) *oset = td->td_sigmask; @@ -2519,9 +2523,11 @@ reschedule_signals(struct proc *p, sigse int sig; PROC_LOCK_ASSERT(p, MA_OWNED); + ps = p->p_sigacts; + mtx_assert(&ps->ps_mtx, (flags & SIGPROCMASK_PS_LOCKED) != 0 ? + MA_OWNED : MA_NOTOWNED); if (SIGISEMPTY(p->p_siglist)) return; - ps = p->p_sigacts; SIGSETAND(block, p->p_siglist); while ((sig = sig_ffs(&block)) != 0) { SIGDELSET(block, sig); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r275501 - stable/10/tools/regression/pjdfstest
Author: ngie Date: Fri Dec 5 08:46:15 2014 New Revision: 275501 URL: https://svnweb.freebsd.org/changeset/base/275501 Log: MFC r271796 (by will): Use 'cc' for the C compiler instead of 'gcc'. Sponsored by: Spectra Logic MFSpectraBSD: 1079507 on 2014/07/24 Modified: stable/10/tools/regression/pjdfstest/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/pjdfstest/Makefile == --- stable/10/tools/regression/pjdfstest/Makefile Fri Dec 5 07:51:50 2014(r275500) +++ stable/10/tools/regression/pjdfstest/Makefile Fri Dec 5 08:46:15 2014(r275501) @@ -18,7 +18,7 @@ ${PROG}: ${PROG}.c echo "Unsupported operating system: ${OSTYPE}."; \ exit 1; \ fi; \ - cmd="gcc -Wall $$CFLAGS ${PROG}.c -o ${PROG}"; \ + cmd="cc -Wall $$CFLAGS ${PROG}.c -o ${PROG}"; \ echo $$cmd; \ $$cmd ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"