svn commit: r272806 - head/cddl/contrib/opensolaris/cmd/zdb
Author: delphij Date: Thu Oct 9 06:02:53 2014 New Revision: 272806 URL: https://svnweb.freebsd.org/changeset/base/272806 Log: MFV r272802: - Limit ARC for zdb at 256MB. zdb do not typically revisit data in the ARC. - Increase default max_inflight from 200 to 1000 (can be overriden by -I) so we can queue more I/Os when doing scrubbing. - Print status while loading meataslabs for leak detection. Illumos issues: 5169 zdb should limit its ARC size 5170 zdb -c should create more scrub i/os by default 5171 zdb should print status while loading metaslabs for leak detection MFC after:2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c == --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Oct 9 05:53:58 2014 (r272805) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Oct 9 06:02:53 2014 (r272806) @@ -76,8 +76,10 @@ #ifndef lint extern boolean_t zfs_recover; +extern uint64_t zfs_arc_max, zfs_arc_meta_limit; #else boolean_t zfs_recover; +uint64_t zfs_arc_max, zfs_arc_meta_limit; #endif const char cmdname[] = zdb; @@ -89,7 +91,7 @@ extern void dump_intent_log(zilog_t *); uint64_t *zopt_object = NULL; int zopt_objects = 0; libzfs_handle_t *g_zfs; -uint64_t max_inflight = 200; +uint64_t max_inflight = 1000; /* * These libumem hooks provide a reasonable set of defaults for the allocator's @@ -2382,7 +2384,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog zcb-zcb_readfails = 0; - if (dump_opt['b'] 5 isatty(STDERR_FILENO) + if (dump_opt['b'] 5 gethrtime() zcb-zcb_lastprint + NANOSEC) { uint64_t now = gethrtime(); char buf[10]; @@ -2467,9 +2469,9 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) if (!dump_opt['L']) { vdev_t *rvd = spa-spa_root_vdev; - for (int c = 0; c rvd-vdev_children; c++) { + for (uint64_t c = 0; c rvd-vdev_children; c++) { vdev_t *vd = rvd-vdev_child[c]; - for (int m = 0; m vd-vdev_ms_count; m++) { + for (uint64_t m = 0; m vd-vdev_ms_count; m++) { metaslab_t *msp = vd-vdev_ms[m]; mutex_enter(msp-ms_lock); metaslab_unload(msp); @@ -2482,6 +2484,15 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) * interfaces. */ if (msp-ms_sm != NULL) { + (void) fprintf(stderr, + \rloading space map for + vdev %llu of %llu, + metaslab %llu of %llu ..., + (longlong_t)c, + (longlong_t)rvd-vdev_children, + (longlong_t)m, + (longlong_t)vd-vdev_ms_count); + msp-ms_ops = zdb_metaslab_ops; VERIFY0(space_map_load(msp-ms_sm, msp-ms_tree, SM_ALLOC)); @@ -2490,6 +2501,7 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) mutex_exit(msp-ms_lock); } } + (void) fprintf(stderr, \n); } spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); @@ -3490,6 +3502,12 @@ main(int argc, char **argv) usage(); } + /* +* ZDB does not typically re-read blocks; therefore limit the ARC +* to 256 MB, which can be used entirely for metadata. +*/ + zfs_arc_max = zfs_arc_meta_limit = 256 * 1024 * 1024; + kernel_init(FREAD); g_zfs = libzfs_init(); ASSERT(g_zfs != NULL); ___ 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: r272805 - head/sys/cam
Also... On Oct 8, 2014, at 22:53, Alexander Motin m...@freebsd.org wrote: Author: mav Date: Thu Oct 9 05:53:58 2014 New Revision: 272805 URL: https://svnweb.freebsd.org/changeset/base/272805 Log: Use proper variable when looping through periphs with CAM_PERIPH_FREE. PR:194256 Submitted by:Scott M. Ferris smfer...@gmail.com MFC after:3 days Sponsored by:EMC/Isilon Storage Division Reported by: Anton Rang anton.rang AT Isilon DOT com Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c == --- head/sys/cam/cam_xpt.cThu Oct 9 05:53:04 2014(r272804) +++ head/sys/cam/cam_xpt.cThu Oct 9 05:53:58 2014(r272805) @@ -2195,7 +2195,7 @@ xptperiphtraverse(struct cam_ed *device, next_periph = SLIST_NEXT(periph, periph_links); while (next_periph != NULL (next_periph-flags CAM_PERIPH_FREE) != 0) -next_periph = SLIST_NEXT(periph, periph_links); +next_periph = SLIST_NEXT(next_periph, periph_links); if (next_periph) next_periph-refcount++; mtx_unlock(bus-eb_mtx); @@ -2269,7 +2269,7 @@ xptpdperiphtraverse(struct periph_driver next_periph = TAILQ_NEXT(periph, unit_links); while (next_periph != NULL (next_periph-flags CAM_PERIPH_FREE) != 0) -next_periph = TAILQ_NEXT(periph, unit_links); +next_periph = TAILQ_NEXT(next_periph, unit_links); if (next_periph) next_periph-refcount++; xpt_unlock_buses(); ___ 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: r272807 - in head/sys/dev/usb: . controller
Author: hselasky Date: Thu Oct 9 06:24:06 2014 New Revision: 272807 URL: https://svnweb.freebsd.org/changeset/base/272807 Log: Refine support for disabling USB enumeration to allow device detach and suspend and resume of existing devices. MFC after:2 weeks Modified: head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/controller/usb_controller.c == --- head/sys/dev/usb/controller/usb_controller.cThu Oct 9 06:02:53 2014(r272806) +++ head/sys/dev/usb/controller/usb_controller.cThu Oct 9 06:24:06 2014(r272807) @@ -102,14 +102,6 @@ static int usb_no_shutdown_wait = 0; SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RWTUN, usb_no_shutdown_wait, 0, No USB device waiting at system shutdown.); -#if USB_HAVE_DISABLE_ENUM -static int usb_disable_enumeration = 0; -SYSCTL_INT(_hw_usb, OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, -usb_disable_enumeration, 0, Set to disable all USB device enumeration.); -#else -#defineusb_disable_enumeration 0 -#endif - static devclass_t usb_devclass; static device_method_t usb_methods[] = { @@ -379,8 +371,7 @@ usb_bus_explore(struct usb_proc_msg *pm) USB_BUS_LOCK(bus); } - if (usb_disable_enumeration == 0 - udev != NULL udev-hub != NULL) { + if (udev != NULL udev-hub != NULL) { if (bus-do_probe) { bus-do_probe = 0; Modified: head/sys/dev/usb/usb_hub.c == --- head/sys/dev/usb/usb_hub.c Thu Oct 9 06:02:53 2014(r272806) +++ head/sys/dev/usb/usb_hub.c Thu Oct 9 06:24:06 2014(r272807) @@ -97,6 +97,12 @@ SYSCTL_INT(_hw_usb, OID_AUTO, power_time usb_power_timeout, 0, USB power timeout); #endif +#if USB_HAVE_DISABLE_ENUM +static int usb_disable_enumeration = 0; +SYSCTL_INT(_hw_usb, OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, +usb_disable_enumeration, 0, Set to disable all USB device enumeration.); +#endif + struct uhub_current_state { uint16_t port_change; uint16_t port_status; @@ -621,9 +627,9 @@ repeat: err = usbd_req_clear_port_feature(udev, NULL, portno, UHF_C_PORT_CONNECTION); - if (err) { + if (err) goto error; - } + /* check if there is a child */ if (child != NULL) { @@ -636,14 +642,22 @@ repeat: /* get fresh status */ err = uhub_read_port_status(sc, portno); - if (err) { + if (err) + goto error; + +#if USB_HAVE_DISABLE_ENUM + /* check if we should skip enumeration from this USB HUB */ + if (usb_disable_enumeration != 0 || + sc-sc_disable_enumeration != 0) { + DPRINTF(Enumeration is disabled!\n); goto error; } +#endif /* check if nothing is connected to the port */ - if (!(sc-sc_st.port_status UPS_CURRENT_CONNECT_STATUS)) { + if (!(sc-sc_st.port_status UPS_CURRENT_CONNECT_STATUS)) goto error; - } + /* check if there is no power on the port and print a warning */ switch (udev-speed) { @@ -996,13 +1010,6 @@ uhub_explore(struct usb_device *udev) DPRINTFN(11, udev=%p addr=%d\n, udev, udev-address); -#if USB_HAVE_DISABLE_ENUM - /* check if we should skip enumeration from this USB HUB */ - if (sc-sc_disable_enumeration != 0) { - DPRINTF(Enumeration is disabled!\n); - return (0); - } -#endif /* ignore devices that are too deep */ if (uhub_is_too_deep(udev)) return (USB_ERR_TOO_DEEP); ___ 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: r272808 - head/include/rpcsvc
Author: bapt Date: Thu Oct 9 06:58:33 2014 New Revision: 272808 URL: https://svnweb.freebsd.org/changeset/base/272808 Log: Fix build with rpcgen using a recent (tested with gcc 4.9.1) GNU cpp Modified: head/include/rpcsvc/nis.x Modified: head/include/rpcsvc/nis.x == --- head/include/rpcsvc/nis.x Thu Oct 9 06:24:06 2014(r272807) +++ head/include/rpcsvc/nis.x Thu Oct 9 06:58:33 2014(r272808) @@ -400,10 +400,7 @@ program NIS_PROG { %#define OARIGHTS(d, n) (((d)-do_armask.do_armask_val+n)-oa_rights) %#define WORLD_DEFAULT (NIS_READ_ACC) %#define GROUP_DEFAULT (NIS_READ_ACC 8) -%#define OWNER_DEFAULT ((NIS_READ_ACC +\ -NIS_MODIFY_ACC +\ -NIS_CREATE_ACC +\ -NIS_DESTROY_ACC) 16) +%#define OWNER_DEFAULT ((NIS_READ_ACC + NIS_MODIFY_ACC + NIS_CREATE_ACC + NIS_DESTROY_ACC) 16) %#define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT) % %/* Result manipulation defines ... */ @@ -432,10 +429,8 @@ program NIS_PROG { % * these definitions they take an nis_object *, and an int and return % * a u_char * for Value, and an int for length. % */ -%#define ENTRY_VAL(obj, col) \ - (obj)-EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val -%#define ENTRY_LEN(obj, col) \ - (obj)-EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len +%#define ENTRY_VAL(obj, col) (obj)-EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val +%#define ENTRY_LEN(obj, col) (obj)-EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len % %#ifdef __cplusplus %} ___ 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: r272809 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: delphij Date: Thu Oct 9 07:18:40 2014 New Revision: 272809 URL: https://svnweb.freebsd.org/changeset/base/272809 Log: MFV r272803: Illumos issue: 5175 implement dmu_read_uio_dbuf() to improve cached read performance MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Thu Oct 9 06:58:33 2014(r272808) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Thu Oct 9 07:18:40 2014(r272809) @@ -1021,8 +1021,8 @@ xuio_stat_wbuf_nocopy() } #ifdef _KERNEL -int -dmu_read_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size) +static int +dmu_read_uio_dnode(dnode_t *dn, uio_t *uio, uint64_t size) { dmu_buf_t **dbp; int numbufs, i, err; @@ -1032,8 +1032,8 @@ dmu_read_uio(objset_t *os, uint64_t obje * NB: we could do this block-at-a-time, but it's nice * to be reading in parallel. */ - err = dmu_buf_hold_array(os, object, uio-uio_loffset, size, TRUE, FTAG, - numbufs, dbp); + err = dmu_buf_hold_array_by_dnode(dn, uio-uio_loffset, size, + TRUE, FTAG, numbufs, dbp, 0); if (err) return (err); @@ -1080,6 +1080,58 @@ dmu_read_uio(objset_t *os, uint64_t obje return (err); } +/* + * Read 'size' bytes into the uio buffer. + * From object zdb-db_object. + * Starting at offset uio-uio_loffset. + * + * If the caller already has a dbuf in the target object + * (e.g. its bonus buffer), this routine is faster than dmu_read_uio(), + * because we don't have to find the dnode_t for the object. + */ +int +dmu_read_uio_dbuf(dmu_buf_t *zdb, uio_t *uio, uint64_t size) +{ + dmu_buf_impl_t *db = (dmu_buf_impl_t *)zdb; + dnode_t *dn; + int err; + + if (size == 0) + return (0); + + DB_DNODE_ENTER(db); + dn = DB_DNODE(db); + err = dmu_read_uio_dnode(dn, uio, size); + DB_DNODE_EXIT(db); + + return (err); +} + +/* + * Read 'size' bytes into the uio buffer. + * From the specified object + * Starting at offset uio-uio_loffset. + */ +int +dmu_read_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size) +{ + dnode_t *dn; + int err; + + if (size == 0) + return (0); + + err = dnode_hold(os, object, FTAG, dn); + if (err) + return (err); + + err = dmu_read_uio_dnode(dn, uio, size); + + dnode_rele(dn, FTAG); + + return (err); +} + static int dmu_write_uio_dnode(dnode_t *dn, uio_t *uio, uint64_t size, dmu_tx_t *tx) { @@ -1132,6 +1184,15 @@ dmu_write_uio_dnode(dnode_t *dn, uio_t * return (err); } +/* + * Write 'size' bytes from the uio buffer. + * To object zdb-db_object. + * Starting at offset uio-uio_loffset. + * + * If the caller already has a dbuf in the target object + * (e.g. its bonus buffer), this routine is faster than dmu_write_uio(), + * because we don't have to find the dnode_t for the object. + */ int dmu_write_uio_dbuf(dmu_buf_t *zdb, uio_t *uio, uint64_t size, dmu_tx_t *tx) @@ -1151,6 +1212,11 @@ dmu_write_uio_dbuf(dmu_buf_t *zdb, uio_t return (err); } +/* + * Write 'size' bytes from the uio buffer. + * To the specified object. + * Starting at offset uio-uio_loffset. + */ int dmu_write_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size, dmu_tx_t *tx) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Oct 9 06:58:33 2014(r272808) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Oct 9 07:18:40 2014(r272809) @@ -616,6 +616,7 @@ void dmu_write(objset_t *os, uint64_t ob void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, dmu_tx_t *tx); int dmu_read_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size); +int dmu_read_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size); int dmu_write_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size, dmu_tx_t *tx); int dmu_write_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size, Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Oct 9 06:58:33 2014(r272808) +++
svn commit: r272810 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: delphij Date: Thu Oct 9 07:52:51 2014 New Revision: 272810 URL: https://svnweb.freebsd.org/changeset/base/272810 Log: MFV r272804: Refactor the code and stop restore_object from creating two transactions. Illumos issue: 3693 restore_object uses at least two transactions to restore an object MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Thu Oct 9 07:18:40 2014(r272809) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Thu Oct 9 07:52:51 2014(r272810) @@ -1918,6 +1918,7 @@ dmu_object_info_from_dnode(dnode_t *dn, doi-doi_indirection = dn-dn_nlevels; doi-doi_checksum = dn-dn_checksum; doi-doi_compress = dn-dn_compress; + doi-doi_nblkptr = dn-dn_nblkptr; doi-doi_physical_blocks_512 = (DN_USED_BYTES(dnp) + 256) 9; doi-doi_max_offset = (dn-dn_maxblkid + 1) * dn-dn_datablksz; doi-doi_fill_count = 0; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.cThu Oct 9 07:18:40 2014(r272809) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.cThu Oct 9 07:52:51 2014(r272810) @@ -20,7 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright 2014 HybridCluster. All rights reserved. */ #include sys/dmu.h @@ -107,11 +108,9 @@ dmu_object_claim(objset_t *os, uint64_t int dmu_object_reclaim(objset_t *os, uint64_t object, dmu_object_type_t ot, -int blocksize, dmu_object_type_t bonustype, int bonuslen) +int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx) { dnode_t *dn; - dmu_tx_t *tx; - int nblkptr; int err; if (object == DMU_META_DNODE_OBJECT) @@ -122,44 +121,9 @@ dmu_object_reclaim(objset_t *os, uint64_ if (err) return (err); - if (dn-dn_type == ot dn-dn_datablksz == blocksize - dn-dn_bonustype == bonustype dn-dn_bonuslen == bonuslen) { - /* nothing is changing, this is a noop */ - dnode_rele(dn, FTAG); - return (0); - } - - if (bonustype == DMU_OT_SA) { - nblkptr = 1; - } else { - nblkptr = 1 + ((DN_MAX_BONUSLEN - bonuslen) SPA_BLKPTRSHIFT); - } - - /* -* If we are losing blkptrs or changing the block size this must -* be a new file instance. We must clear out the previous file -* contents before we can change this type of metadata in the dnode. -*/ - if (dn-dn_nblkptr nblkptr || dn-dn_datablksz != blocksize) { - err = dmu_free_long_range(os, object, 0, DMU_OBJECT_END); - if (err) - goto out; - } - - tx = dmu_tx_create(os); - dmu_tx_hold_bonus(tx, object); - err = dmu_tx_assign(tx, TXG_WAIT); - if (err) { - dmu_tx_abort(tx); - goto out; - } - dnode_reallocate(dn, ot, blocksize, bonustype, bonuslen, tx); - dmu_tx_commit(tx); -out: dnode_rele(dn, FTAG); - return (err); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Oct 9 07:18:40 2014(r272809) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Oct 9 07:52:51 2014(r272810) @@ -24,6 +24,7 @@ * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2012, Martin Matuska m...@freebsd.org. All rights reserved. + * Copyright 2014 HybridCluster. All rights reserved. */ #include sys/dmu.h @@ -1392,12 +1393,25 @@ backup_byteswap(dmu_replay_record_t *drr #undef DO32 } +static inline uint8_t +deduce_nblkptr(dmu_object_type_t bonus_type, uint64_t bonus_size) +{ + if (bonus_type == DMU_OT_SA) { + return (1); + } else { + return (1 + + ((DN_MAX_BONUSLEN - bonus_size) SPA_BLKPTRSHIFT)); + }
RE: svn commit: r272752 - releng/10.1/sys/kern
-Original Message- From: owner-src-committ...@freebsd.org [mailto:owner-src- committ...@freebsd.org] On Behalf Of Neel Natu Sent: Wednesday, October 8, 2014 10:47 PM To: dte...@freebsd.org Cc: Neel Natu; src-committ...@freebsd.org; svn-src-all@freebsd.org; svn- src-rel...@freebsd.org Subject: Re: svn commit: r272752 - releng/10.1/sys/kern Hi Devin, On Wed, Oct 8, 2014 at 9:53 PM, dte...@freebsd.org wrote: -Original Message- From: owner-src-committ...@freebsd.org [mailto:owner-src- committ...@freebsd.org] On Behalf Of Neel Natu Sent: Wednesday, October 8, 2014 8:39 AM To: src-committ...@freebsd.org; svn-src-all@freebsd.org; svn-src- rel...@freebsd.org Subject: svn commit: r272752 - releng/10.1/sys/kern Author: neel Date: Wed Oct 8 15:39:24 2014 New Revision: 272752 URL: https://svnweb.freebsd.org/changeset/base/272752 Log: MFC r272270: I hate to pick nits, but I believe this revision (272752 in releng/10.1) should (I suggest; deferring to re@ for final prognosis) perhaps have _not_ been an MFC from head (r272270; as was performed) but perhaps have instead been MFS from stable/10 (r272726). The svn command used to do the merge was: # svn merge -c 272726 ^/stable/10 releng/10.1 This is exactly as per the SVN merge guidelines into releng as documented here: https://www.freebsd.org/doc/en/articles/committers-guide/subversion- primer.html Hi Neel, Nowhere in that document does it describe MFS. I'm happy you did the merge as it was supposed to be done. However, your commit message is inaccurate. The commit message used MFC r272270 because that was the origin of the change and has the full details about the patch. I don't care if the subversion primer doesn't talk about MFS versus MFC, but it is technically inaccurate to call your commit an MFC [of] r272270 because it is in-fact (as you admit) an MFS of r272726 -- which is indeed indicated by mergeinfo. Making someone look up the mergeinfo because the commit message is a inaccurate doesn't make for an efficient/predictable setup. -- Cheers, Devin P.S. If I was really on your case, I'd insist that you had put MFS10 r# but in all reality, MFS r# would have been perfectly acceptable where MFC r# is clearly just plain wrong and misleading. best Neel The nit being that mergeinfo now shows (unnaturally) that things flowed from head - stable / head - releng versus head - stable - releng as I suggest would have been cleaner for historical analysis. -- Cheers, Devin tty_rel_free() can be called more than once for the same tty so make sure that the tty is dequeued from 'tty_list' only the first time. Approved by:re (glebius) Modified: releng/10.1/sys/kern/tty.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/kern/tty.c == --- releng/10.1/sys/kern/tty.cWed Oct 8 15:30:59 2014 (r272751) +++ releng/10.1/sys/kern/tty.cWed Oct 8 15:39:24 2014 (r272752) @@ -1055,13 +1055,13 @@ tty_rel_free(struct tty *tp) tp-t_dev = NULL; tty_unlock(tp); - sx_xlock(tty_list_sx); - TAILQ_REMOVE(tty_list, tp, t_list); - tty_list_count--; - sx_xunlock(tty_list_sx); - - if (dev != NULL) + if (dev != NULL) { + sx_xlock(tty_list_sx); + TAILQ_REMOVE(tty_list, tp, t_list); + tty_list_count--; + sx_xunlock(tty_list_sx); destroy_dev_sched_cb(dev, tty_dealloc, tp); + } } 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: r272811 - head
Author: bapt Date: Thu Oct 9 09:04:01 2014 New Revision: 272811 URL: https://svnweb.freebsd.org/changeset/base/272811 Log: Add CROSS_TOOLCHAIN macro select pre seeded external toolchain configuration files The goal is to provide pre seeded toolchain configurations withing the ports tree to allow the use of an external toolchain in a simple way: make CROSS_TOOLCHAIN=powerpc64-gcc TARGET=powerpc TARGET_ARCH=powerpc64 buildworld This will look for the external toolchain definition in /usr/local/share/mk/powerpc64-gcc.mk While here add the notion of X_COMPILER_TYPE to the external toolchain framework to allow to deal with differences between gcc and clang in regards of cross building Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 9 07:52:51 2014(r272810) +++ head/Makefile.inc1 Thu Oct 9 09:04:01 2014(r272811) @@ -299,6 +299,10 @@ HMAKE+=PATH=${TMPPATH} METALOG=${METAL WMAKEENV+= MK_CTF=no .endif +.if defined(CROSS_TOOLCHAIN) +LOCALBASE?=/usr/local +.include ${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk +.endif .if defined(CROSS_TOOLCHAIN_PREFIX) CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} @@ -343,10 +347,14 @@ TARGET_ABI= gnueabihf TARGET_ABI=gnueabi .endif .endif +.if ${X_COMPILER_TYPE} == gcc +XFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib +.else TARGET_ABI?= unknown TARGET_TRIPLE?=${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 XFLAGS+= -target ${TARGET_TRIPLE} .endif +.endif WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 DESTDIR=${WORLDTMP} ___ 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: r272812 - in head/sys: cam/ctl dev/iscsi
Author: mav Date: Thu Oct 9 09:12:08 2014 New Revision: 272812 URL: https://svnweb.freebsd.org/changeset/base/272812 Log: Make iSCSI connection close somewhat less aggressive. It allows to push out some final data from the send queue to the socket before its close. In particular, it increases chances for logout response to be delivered to the initiator. Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/dev/iscsi/icl.c head/sys/dev/iscsi/icl.h head/sys/dev/iscsi/iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c == --- head/sys/cam/ctl/ctl_frontend_iscsi.c Thu Oct 9 09:04:01 2014 (r272811) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Thu Oct 9 09:12:08 2014 (r272812) @@ -1135,7 +1135,6 @@ cfiscsi_maintenance_thread(void *arg) * that anymore. We might need to revisit that. */ callout_drain(cs-cs_callout); - icl_conn_shutdown(cs-cs_conn); icl_conn_close(cs-cs_conn); /* Modified: head/sys/dev/iscsi/icl.c == --- head/sys/dev/iscsi/icl.cThu Oct 9 09:04:01 2014(r272811) +++ head/sys/dev/iscsi/icl.cThu Oct 9 09:12:08 2014(r272812) @@ -873,8 +873,6 @@ icl_conn_send_pdus(struct icl_conn *ic, SOCKBUF_UNLOCK(so-so_snd); while (!STAILQ_EMPTY(queue)) { - if (ic-ic_disconnecting) - return; request = STAILQ_FIRST(queue); size = icl_pdu_size(request); if (available size) { @@ -971,11 +969,6 @@ icl_send_thread(void *arg) ic-ic_send_running = true; for (;;) { - if (ic-ic_disconnecting) { - //ICL_DEBUG(terminating); - break; - } - for (;;) { /* * If the local queue is empty, populate it from @@ -1014,6 +1007,11 @@ icl_send_thread(void *arg) break; } + if (ic-ic_disconnecting) { + //ICL_DEBUG(terminating); + break; + } + cv_wait(ic-ic_send_cv, ic-ic_lock); } @@ -1298,21 +1296,6 @@ icl_conn_handoff(struct icl_conn *ic, in } void -icl_conn_shutdown(struct icl_conn *ic) -{ - ICL_CONN_LOCK_ASSERT_NOT(ic); - - ICL_CONN_LOCK(ic); - if (ic-ic_socket == NULL) { - ICL_CONN_UNLOCK(ic); - return; - } - ICL_CONN_UNLOCK(ic); - - soshutdown(ic-ic_socket, SHUT_RDWR); -} - -void icl_conn_close(struct icl_conn *ic) { struct icl_pdu *pdu; Modified: head/sys/dev/iscsi/icl.h == --- head/sys/dev/iscsi/icl.hThu Oct 9 09:04:01 2014(r272811) +++ head/sys/dev/iscsi/icl.hThu Oct 9 09:12:08 2014(r272812) @@ -107,7 +107,6 @@ struct icl_conn { struct icl_conn*icl_conn_new(const char *name, struct mtx *lock); void icl_conn_free(struct icl_conn *ic); inticl_conn_handoff(struct icl_conn *ic, int fd); -void icl_conn_shutdown(struct icl_conn *ic); void icl_conn_close(struct icl_conn *ic); bool icl_conn_connected(struct icl_conn *ic); Modified: head/sys/dev/iscsi/iscsi.c == --- head/sys/dev/iscsi/iscsi.c Thu Oct 9 09:04:01 2014(r272811) +++ head/sys/dev/iscsi/iscsi.c Thu Oct 9 09:12:08 2014(r272812) @@ -367,7 +367,6 @@ static void iscsi_maintenance_thread_reconnect(struct iscsi_session *is) { - icl_conn_shutdown(is-is_conn); icl_conn_close(is-is_conn); ISCSI_SESSION_LOCK(is); ___ 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: r272813 - head
Author: bapt Date: Thu Oct 9 09:46:44 2014 New Revision: 272813 URL: https://svnweb.freebsd.org/changeset/base/272813 Log: Fix build when XCC is defined and X_COMPILER_TYPE is not Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 9 09:12:08 2014(r272812) +++ head/Makefile.inc1 Thu Oct 9 09:46:44 2014(r272813) @@ -347,7 +347,7 @@ TARGET_ABI= gnueabihf TARGET_ABI=gnueabi .endif .endif -.if ${X_COMPILER_TYPE} == gcc +.if defined(X_COMPILER_TYPE) ${X_COMPILER_TYPE} == gcc XFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib .else TARGET_ABI?= unknown ___ 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: r272814 - head
Author: bapt Date: Thu Oct 9 10:47:14 2014 New Revision: 272814 URL: https://svnweb.freebsd.org/changeset/base/272814 Log: Add OBJCOPY to the list of external tools Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 9 09:46:44 2014(r272813) +++ head/Makefile.inc1 Thu Oct 9 10:47:14 2014(r272814) @@ -315,7 +315,7 @@ X${COMPILER}?= ${CROSS_COMPILER_PREFIX}$ X${COMPILER}?= ${${COMPILER}} .endif .endfor -XBINUTILS= AS AR LD NM OBJDUMP RANLIB STRINGS +XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB STRINGS .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}} @@ -326,7 +326,8 @@ X${BINUTIL}?= ${${BINUTIL}} WMAKEENV+= CC=${XCC} ${XFLAGS} CXX=${XCXX} ${XFLAGS} \ CPP=${XCPP} ${XFLAGS} \ AS=${XAS} AR=${XAR} LD=${XLD} NM=${XNM} \ - OBJDUMP=${XOBJDUMP} RANLIB=${XRANLIB} STRINGS=${XSTRINGS} + OBJDUMP=${XOBJDUMP} OBJCOPY=${OBJCOPY} \ + RANLIB=${XRANLIB} STRINGS=${XSTRINGS} .if ${XCC:M/*} XFLAGS=--sysroot=${WORLDTMP} ___ 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: r272815 - head
Author: bapt Date: Thu Oct 9 12:20:00 2014 New Revision: 272815 URL: https://svnweb.freebsd.org/changeset/base/272815 Log: Fix typo Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 9 10:47:14 2014(r272814) +++ head/Makefile.inc1 Thu Oct 9 12:20:00 2014(r272815) @@ -326,7 +326,7 @@ X${BINUTIL}?= ${${BINUTIL}} WMAKEENV+= CC=${XCC} ${XFLAGS} CXX=${XCXX} ${XFLAGS} \ CPP=${XCPP} ${XFLAGS} \ AS=${XAS} AR=${XAR} LD=${XLD} NM=${XNM} \ - OBJDUMP=${XOBJDUMP} OBJCOPY=${OBJCOPY} \ + OBJDUMP=${XOBJDUMP} OBJCOPY=${XOBJCOPY} \ RANLIB=${XRANLIB} STRINGS=${XSTRINGS} .if ${XCC:M/*} ___ 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: r272816 - head/sys/conf
Author: bapt Date: Thu Oct 9 12:35:17 2014 New Revision: 272816 URL: https://svnweb.freebsd.org/changeset/base/272816 Log: Only catch the line from the compiler output where 'version' is a word This allows to build the kernel with gcc 4.9.1 from ports Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh == --- head/sys/conf/newvers.shThu Oct 9 12:20:00 2014(r272815) +++ head/sys/conf/newvers.shThu Oct 9 12:35:17 2014(r272816) @@ -89,7 +89,7 @@ fi touch version v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date` i=`${MAKE:-make} -V KERN_IDENT` -compiler_v=$($(${MAKE:-make} -V CC) -v 21 | grep 'version') +compiler_v=$($(${MAKE:-make} -V CC) -v 21 | grep -w 'version') for dir in /usr/bin /usr/local/bin; do if [ ! -z ${svnversion} ] ; then ___ 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: r272819 - releng/10.1/usr.bin/mkimg
Author: marcel Date: Thu Oct 9 13:36:37 2014 New Revision: 272819 URL: https://svnweb.freebsd.org/changeset/base/272819 Log: MF10 r272773: Add QCOW v1 v2 support Requested by: gjb@ Approved by: re (marius) Relnotes: yes Added: releng/10.1/usr.bin/mkimg/qcow.c - copied unchanged from r272773, stable/10/usr.bin/mkimg/qcow.c Modified: releng/10.1/usr.bin/mkimg/Makefile Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/usr.bin/mkimg/Makefile == --- releng/10.1/usr.bin/mkimg/Makefile Thu Oct 9 12:54:56 2014 (r272818) +++ releng/10.1/usr.bin/mkimg/Makefile Thu Oct 9 13:36:37 2014 (r272819) @@ -8,6 +8,7 @@ CFLAGS+=-DSPARSE_WRITE # List of formats to support SRCS+= \ + qcow.c \ raw.c \ vhd.c \ vmdk.c Copied: releng/10.1/usr.bin/mkimg/qcow.c (from r272773, stable/10/usr.bin/mkimg/qcow.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/10.1/usr.bin/mkimg/qcow.cThu Oct 9 13:36:37 2014 (r272819, copy of r272773, stable/10/usr.bin/mkimg/qcow.c) @@ -0,0 +1,369 @@ +/*- + * Copyright (c) 2014 Marcel Moolenaar + * 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. + */ + +#include sys/cdefs.h +__FBSDID($FreeBSD$); + +#include sys/types.h +#include sys/endian.h +#include sys/errno.h +#include stdint.h +#include stdio.h +#include stdlib.h +#include string.h +#include unistd.h + +#include image.h +#include format.h +#include mkimg.h + +/* Default cluster sizes. */ +#defineQCOW1_CLSTR_LOG2SZ 12 /* 4KB */ +#defineQCOW2_CLSTR_LOG2SZ 16 /* 64KB */ + +/* Flag bits in cluster offsets */ +#defineQCOW_CLSTR_COMPRESSED (1ULL 62) +#defineQCOW_CLSTR_COPIED (1ULL 63) + +struct qcow_header { + uint32_tmagic; +#defineQCOW_MAGIC 0x514649fb + uint32_tversion; +#defineQCOW_VERSION_1 1 +#defineQCOW_VERSION_2 2 + uint64_tpath_offset; + uint32_tpath_length; + uint32_tclstr_log2sz; /* v2 only */ + uint64_tdisk_size; + union { + struct { + uint8_t clstr_log2sz; + uint8_t l2_log2sz; + uint16_t_pad; + uint32_tencryption; + uint64_tl1_offset; + } v1; + struct { + uint32_tencryption; + uint32_tl1_entries; + uint64_tl1_offset; + uint64_trefcnt_offset; + uint32_trefcnt_entries; + uint32_tsnapshot_count; + uint64_tsnapshot_offset; + } v2; + } u; +}; + +static u_int clstr_log2sz; + +static uint64_t +round_clstr(uint64_t ofs) +{ + uint64_t clstrsz; + + clstrsz = 1UL clstr_log2sz; + return ((ofs + clstrsz - 1) ~(clstrsz - 1)); +} + +static int +qcow_resize(lba_t imgsz, u_int version) +{ + uint64_t imagesz; + + switch (version) { + case QCOW_VERSION_1: + clstr_log2sz = QCOW1_CLSTR_LOG2SZ; + break; + case QCOW_VERSION_2: + clstr_log2sz = QCOW2_CLSTR_LOG2SZ; + break; + default: + return (EDOOFUS); + } + + imagesz = round_clstr(imgsz * secsz); + + if
svn commit: r272820 - head/etc/devd
Author: hselasky Date: Thu Oct 9 13:58:19 2014 New Revision: 272820 URL: https://svnweb.freebsd.org/changeset/base/272820 Log: Add example devd configuration file for USB printers. Added: head/etc/devd/ulpt.conf (contents, props changed) Modified: head/etc/devd/Makefile Modified: head/etc/devd/Makefile == --- head/etc/devd/Makefile Thu Oct 9 13:36:37 2014(r272819) +++ head/etc/devd/Makefile Thu Oct 9 13:58:19 2014(r272820) @@ -11,7 +11,7 @@ FILES+= asus.conf .endif .if ${MK_USB} != no -FILES+=uath.conf usb.conf +FILES+=uath.conf ulpt.conf usb.conf .endif .if ${MK_ZFS} != no Added: head/etc/devd/ulpt.conf == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/devd/ulpt.conf Thu Oct 9 13:58:19 2014(r272820) @@ -0,0 +1,18 @@ +# +# $FreeBSD$ +# + +# +# Example devd configuration file for USB printers. +# Uncomment the notify rule below to enable. +# +# Generic USB printer devices +#notify 100 { +# match system USB; +# match subsystem INTERFACE; +# match typeATTACH; +# match intclass0x07; +# match intsubclass 0x01; +# match intprotocol (0x01|0x02|0x03); +# action chown root:wheel /dev/$cdev; +#}; ___ 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: r272822 - head/sys/dev/usb
Author: hselasky Date: Thu Oct 9 14:43:43 2014 New Revision: 272822 URL: https://svnweb.freebsd.org/changeset/base/272822 Log: Add sysctl knob to disable port power on a specific USB HUB. You need to reset the USB HUB using usbconfig -d X.Y reset or boot having the setting in /boot/loader.conf before it activates. Modified: head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/usb_hub.c == --- head/sys/dev/usb/usb_hub.c Thu Oct 9 14:33:20 2014(r272821) +++ head/sys/dev/usb/usb_hub.c Thu Oct 9 14:43:43 2014(r272822) @@ -101,6 +101,10 @@ SYSCTL_INT(_hw_usb, OID_AUTO, power_time static int usb_disable_enumeration = 0; SYSCTL_INT(_hw_usb, OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, usb_disable_enumeration, 0, Set to disable all USB device enumeration.); + +static int usb_disable_port_power = 0; +SYSCTL_INT(_hw_usb, OID_AUTO, disable_port_power, CTLFLAG_RWTUN, +usb_disable_port_power, 0, Set to disable all USB port power.); #endif struct uhub_current_state { @@ -119,6 +123,7 @@ struct uhub_softc { struct usb_xfer *sc_xfer[UHUB_N_TRANSFER]; /* interrupt xfer */ #if USB_HAVE_DISABLE_ENUM int sc_disable_enumeration; + int sc_disable_port_power; #endif uint8_t sc_flags; #defineUHUB_FLAG_DID_EXPLORE 0x01 @@ -1406,6 +1411,24 @@ uhub_attach(device_t dev) /* wait with power off for a while */ usb_pause_mtx(NULL, USB_MS_TO_TICKS(USB_POWER_DOWN_TIME)); +#if USB_HAVE_DISABLE_ENUM + /* Add device sysctls */ + + sysctl_ctx = device_get_sysctl_ctx(dev); + sysctl_tree = device_get_sysctl_tree(dev); + + if (sysctl_ctx != NULL sysctl_tree != NULL) { + (void) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, + sc-sc_disable_enumeration, 0, + Set to disable enumeration on this USB HUB.); + + (void) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, disable_port_power, CTLFLAG_RWTUN, + sc-sc_disable_port_power, 0, + Set to disable USB port power on this USB HUB.); + } +#endif /* * To have the best chance of success we do things in the exact same * order as Windoze98. This should not be necessary, but some @@ -1460,13 +1483,27 @@ uhub_attach(device_t dev) removable++; break; } - if (!err) { - /* turn the power on */ - err = usbd_req_set_port_feature(udev, NULL, - portno, UHF_PORT_POWER); + if (err == 0) { +#if USB_HAVE_DISABLE_ENUM + /* check if we should disable USB port power or not */ + if (usb_disable_port_power != 0 || + sc-sc_disable_port_power != 0) { + /* turn the power off */ + DPRINTFN(0, Turning port %d power off\n, portno); + err = usbd_req_clear_port_feature(udev, NULL, + portno, UHF_PORT_POWER); + } else { +#endif + /* turn the power on */ + DPRINTFN(0, Turning port %d power on\n, portno); + err = usbd_req_set_port_feature(udev, NULL, + portno, UHF_PORT_POWER); +#if USB_HAVE_DISABLE_ENUM + } +#endif } - if (err) { - DPRINTFN(0, port %d power on failed, %s\n, + if (err != 0) { + DPRINTFN(0, port %d power on or off failed, %s\n, portno, usbd_errstr(err)); } DPRINTF(turn on port %d power\n, @@ -1490,19 +1527,6 @@ uhub_attach(device_t dev) usbd_set_power_mode(udev, USB_POWER_MODE_SAVE); -#if USB_HAVE_DISABLE_ENUM - /* Add device sysctls */ - - sysctl_ctx = device_get_sysctl_ctx(dev); - sysctl_tree = device_get_sysctl_tree(dev); - - if (sysctl_ctx != NULL sysctl_tree != NULL) { - (void) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, - sc-sc_disable_enumeration, 0, - Set to disable enumeration on this USB HUB.); - } -#endif return (0); error: ___ 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: r272822 - head/sys/dev/usb
*join free social network clickcare https://www.globallshare.com/en/3076994.html* On Thursday, October 9, 2014 8:13:51 PM UTC+5:30, Hans Petter Selasky wrote: Author: hselasky Date: Thu Oct 9 14:43:43 2014 New Revision: 272822 URL: https://svnweb.freebsd.org/changeset/base/272822 Log: Add sysctl knob to disable port power on a specific USB HUB. You need to reset the USB HUB using usbconfig -d X.Y reset or boot having the setting in /boot/loader.conf before it activates. Modified: head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/usb_hub.c == --- head/sys/dev/usb/usb_hub.cThu Oct 9 14:33:20 2014(r272821) +++ head/sys/dev/usb/usb_hub.cThu Oct 9 14:43:43 2014(r272822) @@ -101,6 +101,10 @@ SYSCTL_INT(_hw_usb, OID_AUTO, power_time static int usb_disable_enumeration = 0; SYSCTL_INT(_hw_usb, OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, usb_disable_enumeration, 0, Set to disable all USB device enumeration.); + +static int usb_disable_port_power = 0; +SYSCTL_INT(_hw_usb, OID_AUTO, disable_port_power, CTLFLAG_RWTUN, +usb_disable_port_power, 0, Set to disable all USB port power.); #endif struct uhub_current_state { @@ -119,6 +123,7 @@ struct uhub_softc { struct usb_xfer *sc_xfer[UHUB_N_TRANSFER];/* interrupt xfer */ #if USB_HAVE_DISABLE_ENUM int sc_disable_enumeration; +int sc_disable_port_power; #endif uint8_tsc_flags; #defineUHUB_FLAG_DID_EXPLORE 0x01 @@ -1406,6 +1411,24 @@ uhub_attach(device_t dev) /* wait with power off for a while */ usb_pause_mtx(NULL, USB_MS_TO_TICKS(USB_POWER_DOWN_TIME)); +#if USB_HAVE_DISABLE_ENUM +/* Add device sysctls */ + +sysctl_ctx = device_get_sysctl_ctx(dev); +sysctl_tree = device_get_sysctl_tree(dev); + +if (sysctl_ctx != NULL sysctl_tree != NULL) { +(void) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), +OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, +sc-sc_disable_enumeration, 0, +Set to disable enumeration on this USB HUB.); + +(void) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), +OID_AUTO, disable_port_power, CTLFLAG_RWTUN, +sc-sc_disable_port_power, 0, +Set to disable USB port power on this USB HUB.); +} +#endif /* * To have the best chance of success we do things in the exact same * order as Windoze98. This should not be necessary, but some @@ -1460,13 +1483,27 @@ uhub_attach(device_t dev) removable++; break; } -if (!err) { -/* turn the power on */ -err = usbd_req_set_port_feature(udev, NULL, -portno, UHF_PORT_POWER); +if (err == 0) { +#if USB_HAVE_DISABLE_ENUM +/* check if we should disable USB port power or not */ +if (usb_disable_port_power != 0 || +sc-sc_disable_port_power != 0) { +/* turn the power off */ +DPRINTFN(0, Turning port %d power off\n, portno); +err = usbd_req_clear_port_feature(udev, NULL, +portno, UHF_PORT_POWER); +} else { +#endif +/* turn the power on */ +DPRINTFN(0, Turning port %d power on\n, portno); +err = usbd_req_set_port_feature(udev, NULL, +portno, UHF_PORT_POWER); +#if USB_HAVE_DISABLE_ENUM +} +#endif } -if (err) { -DPRINTFN(0, port %d power on failed, %s\n, +if (err != 0) { +DPRINTFN(0, port %d power on or off failed, %s\n, portno, usbd_errstr(err)); } DPRINTF(turn on port %d power\n, @@ -1490,19 +1527,6 @@ uhub_attach(device_t dev) usbd_set_power_mode(udev, USB_POWER_MODE_SAVE); -#if USB_HAVE_DISABLE_ENUM -/* Add device sysctls */ - -sysctl_ctx = device_get_sysctl_ctx(dev); -sysctl_tree = device_get_sysctl_tree(dev); - -if (sysctl_ctx != NULL sysctl_tree != NULL) { -(void) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), -OID_AUTO,
svn commit: r272823 - in head/sys: compat/freebsd32 conf kern netinet sys
Author: marcel Date: Thu Oct 9 15:16:52 2014 New Revision: 272823 URL: https://svnweb.freebsd.org/changeset/base/272823 Log: Move the SCTP syscalls to netinet with the rest of the SCTP code. The syscalls themselves are tightly coupled with the network stack and therefore should not be in the generic socket code. The following four syscalls have been marked as NOSTD so they can be dynamically registered in sctp_syscalls_init() function: sys_sctp_peeloff sys_sctp_generic_sendmsg sys_sctp_generic_sendmsg_iov sys_sctp_generic_recvmsg The syscalls are also set up to be dynamically registered when COMPAT32 option is configured. As a side effect of moving the SCTP syscalls, getsock_cap needs to be made available outside of the uipc_syscalls.c source file. A proper prototype has been added to the sys/socketvar.h header file. API tests from the SCTP reference implementation have been run to ensure compatibility. (http://code.google.com/p/sctp-refimpl/source/checkout) Submitted by: Steve Kiernan ste...@juniper.net Reviewed by: tuexen, rrs Obtained from:Juniper Networks, Inc. Added: head/sys/netinet/sctp_syscalls.c - copied, changed from r272821, head/sys/kern/uipc_syscalls.c Modified: head/sys/compat/freebsd32/syscalls.master head/sys/conf/files head/sys/kern/syscalls.master head/sys/kern/uipc_syscalls.c head/sys/sys/socketvar.h Modified: head/sys/compat/freebsd32/syscalls.master == --- head/sys/compat/freebsd32/syscalls.master Thu Oct 9 14:43:43 2014 (r272822) +++ head/sys/compat/freebsd32/syscalls.master Thu Oct 9 15:16:52 2014 (r272823) @@ -845,14 +845,14 @@ 468AUE_NULLUNIMPL nosys 469AUE_NULLUNIMPL __getpath_fromfd 470AUE_NULLUNIMPL __getpath_fromaddr -471AUE_NULLNOPROTO { int sctp_peeloff(int sd, uint32_t name); } -472AUE_NULLNOPROTO { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ +471AUE_NULLNOPROTO|NOSTD { int sctp_peeloff(int sd, uint32_t name); } +472AUE_NULLNOPROTO|NOSTD { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ caddr_t to, __socklen_t tolen, \ struct sctp_sndrcvinfo *sinfo, int flags); } -473AUE_NULLNOPROTO { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ +473AUE_NULLNOPROTO|NOSTD { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ caddr_t to, __socklen_t tolen, \ struct sctp_sndrcvinfo *sinfo, int flags); } -474AUE_NULLNOPROTO { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ +474AUE_NULLNOPROTO|NOSTD { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ struct sockaddr * from, __socklen_t *fromlenaddr, \ struct sctp_sndrcvinfo *sinfo, int *msg_flags); } #ifdef PAD64_REQUIRED Modified: head/sys/conf/files == --- head/sys/conf/files Thu Oct 9 14:43:43 2014(r272822) +++ head/sys/conf/files Thu Oct 9 15:16:52 2014(r272823) @@ -3429,6 +3429,7 @@ netinet/sctp_output.c optional inet sct netinet/sctp_pcb.c optional inet sctp | inet6 sctp netinet/sctp_peeloff.c optional inet sctp | inet6 sctp netinet/sctp_ss_functions.coptional inet sctp | inet6 sctp +netinet/sctp_syscalls.coptional inet sctp | inet6 sctp netinet/sctp_sysctl.c optional inet sctp | inet6 sctp netinet/sctp_timer.c optional inet sctp | inet6 sctp netinet/sctp_usrreq.c optional inet sctp | inet6 sctp Modified: head/sys/kern/syscalls.master == --- head/sys/kern/syscalls.master Thu Oct 9 14:43:43 2014 (r272822) +++ head/sys/kern/syscalls.master Thu Oct 9 15:16:52 2014 (r272823) @@ -837,14 +837,14 @@ 468AUE_NULLUNIMPL nosys 469AUE_NULLUNIMPL __getpath_fromfd 470AUE_NULLUNIMPL __getpath_fromaddr -471AUE_NULLSTD { int sctp_peeloff(int sd, uint32_t name); } -472 AUE_NULLSTD{ int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ +471AUE_NULLNOSTD { int sctp_peeloff(int sd, uint32_t name); } +472 AUE_NULLNOSTD { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ caddr_t to, __socklen_t tolen, \ struct sctp_sndrcvinfo *sinfo, int flags); } -473 AUE_NULLSTD{ int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int
svn commit: r272824 - in head/sys: compat/freebsd32 kern sys
Author: marcel Date: Thu Oct 9 15:19:35 2014 New Revision: 272824 URL: https://svnweb.freebsd.org/changeset/base/272824 Log: Regenerate after r272823: Move the SCTP syscalls to netinet with the rest of the SCTP code. Submitted by: Steve Kiernan ste...@juniper.net Reviewed by: tuexen, rrs Obtained from:Juniper Networks, Inc. Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h == --- head/sys/compat/freebsd32/freebsd32_proto.h Thu Oct 9 15:16:52 2014 (r272823) +++ head/sys/compat/freebsd32/freebsd32_proto.h Thu Oct 9 15:19:35 2014 (r272824) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 270691 2014-08-27 01:02:02Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 272823 2014-10-09 15:16:52Z marcel */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h == --- head/sys/compat/freebsd32/freebsd32_syscall.h Thu Oct 9 15:16:52 2014(r272823) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Thu Oct 9 15:19:35 2014(r272824) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 270691 2014-08-27 01:02:02Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 272823 2014-10-09 15:16:52Z marcel */ #defineFREEBSD32_SYS_syscall 0 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c == --- head/sys/compat/freebsd32/freebsd32_syscalls.c Thu Oct 9 15:16:52 2014(r272823) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Thu Oct 9 15:19:35 2014(r272824) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 270691 2014-08-27 01:02:02Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 272823 2014-10-09 15:16:52Z marcel */ const char *freebsd32_syscallnames[] = { Modified: head/sys/compat/freebsd32/freebsd32_sysent.c == --- head/sys/compat/freebsd32/freebsd32_sysent.cThu Oct 9 15:16:52 2014(r272823) +++ head/sys/compat/freebsd32/freebsd32_sysent.cThu Oct 9 15:19:35 2014(r272824) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 270691 2014-08-27 01:02:02Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 272823 2014-10-09 15:16:52Z marcel */ #include opt_compat.h @@ -518,10 +518,10 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 468 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 469 = __getpath_fromfd */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 470 = __getpath_fromaddr */ - { AS(sctp_peeloff_args), (sy_call_t *)sys_sctp_peeloff, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 471 = sctp_peeloff */ - { AS(sctp_generic_sendmsg_args), (sy_call_t *)sys_sctp_generic_sendmsg, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 472 = sctp_generic_sendmsg */ - { AS(sctp_generic_sendmsg_iov_args), (sy_call_t *)sys_sctp_generic_sendmsg_iov, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 473 = sctp_generic_sendmsg_iov */ - { AS(sctp_generic_recvmsg_args), (sy_call_t *)sys_sctp_generic_recvmsg, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 474 = sctp_generic_recvmsg */ + { AS(sctp_peeloff_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 471 = sctp_peeloff */ + { AS(sctp_generic_sendmsg_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 472 = sctp_generic_sendmsg */ + { AS(sctp_generic_sendmsg_iov_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 473 = sctp_generic_sendmsg_iov */ + { AS(sctp_generic_recvmsg_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 474 = sctp_generic_recvmsg */
svn commit: r272825 - head/sys/ufs/ufs
Author: bapt Date: Thu Oct 9 15:26:22 2014 New Revision: 272825 URL: https://svnweb.freebsd.org/changeset/base/272825 Log: Use offsetof() from sys/types.h instead of a custom one This fixes build with recent gcc versions Modified: head/sys/ufs/ufs/dir.h Modified: head/sys/ufs/ufs/dir.h == --- head/sys/ufs/ufs/dir.h Thu Oct 9 15:19:35 2014(r272824) +++ head/sys/ufs/ufs/dir.h Thu Oct 9 15:26:22 2014(r272825) @@ -110,7 +110,7 @@ struct direct { * */ #defineDIRECTSIZ(namlen) \ - (((uintptr_t)((struct direct *)0)-d_name +\ + ((offsetof(struct direct, d_name) + \ ((namlen)+1)*sizeof(((struct direct *)0)-d_name[0]) + 3) ~3) #if (BYTE_ORDER == LITTLE_ENDIAN) #defineDIRSIZ(oldfmt, dp) \ ___ 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: r272825 - head/sys/ufs/ufs
On Thu, Oct 09, 2014 at 03:26:23PM +, Baptiste Daroussin wrote: Author: bapt Date: Thu Oct 9 15:26:22 2014 New Revision: 272825 URL: https://svnweb.freebsd.org/changeset/base/272825 Log: Use offsetof() from sys/types.h instead of a custom one This fixes build with recent gcc versions I forgot: Reviewed by: kan, imp Differential revision: https://reviews.freebsd.org/D925 regards, Bapt pgpsVLRHNGhLJ.pgp Description: PGP signature
svn commit: r272827 - head
Author: bapt Date: Thu Oct 9 15:52:01 2014 New Revision: 272827 URL: https://svnweb.freebsd.org/changeset/base/272827 Log: Add size(1) to the cross build toolchain Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 9 15:35:28 2014(r272826) +++ head/Makefile.inc1 Thu Oct 9 15:52:01 2014(r272827) @@ -315,7 +315,7 @@ X${COMPILER}?= ${CROSS_COMPILER_PREFIX}$ X${COMPILER}?= ${${COMPILER}} .endif .endfor -XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB STRINGS +XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB SIZE STRINGS .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}} @@ -327,7 +327,8 @@ WMAKEENV+= CC=${XCC} ${XFLAGS} CXX=${ CPP=${XCPP} ${XFLAGS} \ AS=${XAS} AR=${XAR} LD=${XLD} NM=${XNM} \ OBJDUMP=${XOBJDUMP} OBJCOPY=${XOBJCOPY} \ - RANLIB=${XRANLIB} STRINGS=${XSTRINGS} + RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ + SIZE=${XSIZE} .if ${XCC:M/*} XFLAGS=--sysroot=${WORLDTMP} ___ 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: r272752 - releng/10.1/sys/kern
Hi Devin, On Thu, Oct 9, 2014 at 1:35 AM, dte...@freebsd.org wrote: -Original Message- From: owner-src-committ...@freebsd.org [mailto:owner-src- committ...@freebsd.org] On Behalf Of Neel Natu Sent: Wednesday, October 8, 2014 10:47 PM To: dte...@freebsd.org Cc: Neel Natu; src-committ...@freebsd.org; svn-src-all@freebsd.org; svn- src-rel...@freebsd.org Subject: Re: svn commit: r272752 - releng/10.1/sys/kern Hi Devin, On Wed, Oct 8, 2014 at 9:53 PM, dte...@freebsd.org wrote: -Original Message- From: owner-src-committ...@freebsd.org [mailto:owner-src- committ...@freebsd.org] On Behalf Of Neel Natu Sent: Wednesday, October 8, 2014 8:39 AM To: src-committ...@freebsd.org; svn-src-all@freebsd.org; svn-src- rel...@freebsd.org Subject: svn commit: r272752 - releng/10.1/sys/kern Author: neel Date: Wed Oct 8 15:39:24 2014 New Revision: 272752 URL: https://svnweb.freebsd.org/changeset/base/272752 Log: MFC r272270: I hate to pick nits, but I believe this revision (272752 in releng/10.1) should (I suggest; deferring to re@ for final prognosis) perhaps have _not_ been an MFC from head (r272270; as was performed) but perhaps have instead been MFS from stable/10 (r272726). The svn command used to do the merge was: # svn merge -c 272726 ^/stable/10 releng/10.1 This is exactly as per the SVN merge guidelines into releng as documented here: https://www.freebsd.org/doc/en/articles/committers-guide/subversion- primer.html Hi Neel, Nowhere in that document does it describe MFS. I'm happy you did the merge as it was supposed to be done. However, your commit message is inaccurate. I don't agree - the commit message is entirely self-consistent but I see why you might think otherwise. FWIW here is an analysis of all commits into releng/10.1. There are six commits with a commit message of MFC head_revision: https://svnweb.freebsd.org/changeset/base/272684 https://svnweb.freebsd.org/changeset/base/272669 https://svnweb.freebsd.org/changeset/base/272612 https://svnweb.freebsd.org/changeset/base/272611 https://svnweb.freebsd.org/changeset/base/272608 https://svnweb.freebsd.org/changeset/base/272752 There is one commit with a commit message of MFC stable_10_revision: https://svnweb.freebsd.org/changeset/base/272682 There is one commit with a commit message of MF10 stable_10_revision: https://svnweb.freebsd.org/changeset/base/272819 Clearly there are different styles used by developers but the numbers suggest that MFC head_revision is the preferred one. best Neel The commit message used MFC r272270 because that was the origin of the change and has the full details about the patch. I don't care if the subversion primer doesn't talk about MFS versus MFC, but it is technically inaccurate to call your commit an MFC [of] r272270 because it is in-fact (as you admit) an MFS of r272726 -- which is indeed indicated by mergeinfo. Making someone look up the mergeinfo because the commit message is a inaccurate doesn't make for an efficient/predictable setup. -- Cheers, Devin P.S. If I was really on your case, I'd insist that you had put MFS10 r# but in all reality, MFS r# would have been perfectly acceptable where MFC r# is clearly just plain wrong and misleading. best Neel The nit being that mergeinfo now shows (unnaturally) that things flowed from head - stable / head - releng versus head - stable - releng as I suggest would have been cleaner for historical analysis. -- Cheers, Devin tty_rel_free() can be called more than once for the same tty so make sure that the tty is dequeued from 'tty_list' only the first time. Approved by:re (glebius) Modified: releng/10.1/sys/kern/tty.c Directory Properties: releng/10.1/ (props changed) Modified: releng/10.1/sys/kern/tty.c == --- releng/10.1/sys/kern/tty.cWed Oct 8 15:30:59 2014 (r272751) +++ releng/10.1/sys/kern/tty.cWed Oct 8 15:39:24 2014 (r272752) @@ -1055,13 +1055,13 @@ tty_rel_free(struct tty *tp) tp-t_dev = NULL; tty_unlock(tp); - sx_xlock(tty_list_sx); - TAILQ_REMOVE(tty_list, tp, t_list); - tty_list_count--; - sx_xunlock(tty_list_sx); - - if (dev != NULL) + if (dev != NULL) { + sx_xlock(tty_list_sx); + TAILQ_REMOVE(tty_list, tp, t_list); + tty_list_count--; + sx_xunlock(tty_list_sx); destroy_dev_sched_cb(dev, tty_dealloc, tp); + } } 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: r272829 - head/sys/conf
Author: imp Date: Thu Oct 9 16:39:10 2014 New Revision: 272829 URL: https://svnweb.freebsd.org/changeset/base/272829 Log: When building with a newer GCC, suppress some warnings for the moment. The kernel isn't ready for them without a lot of work. Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Thu Oct 9 16:12:01 2014(r272828) +++ head/sys/conf/kern.mk Thu Oct 9 16:39:10 2014(r272829) @@ -33,7 +33,13 @@ CWARNEXTRA?= -Wno-error-tautological-com .endif .if ${COMPILER_TYPE} == gcc ${COMPILER_VERSION} = 40300 -CWARNEXTRA?= -Wno-inline +# Catch-all for all the things that are in our tree, but for which we're +# not yet ready for this compiler. Note: we likely only really support +# building with gcc 4.8 and newer. Nothing older has been tested. +CWARNEXTRA?= -Wno-error=inline -Wno-error=enum-compare -Wno-error=unused-but-set-variable \ + -Wno-error=aggressive-loop-optimizations -Wno-error=maybe-uninitialized \ + -Wno-error=unused-local-typedefs -Wno-error=array-bounds -Wno-error=address \ + -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes .endif # External compilers may not support our format extensions. Allow them ___ 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: r272752 - releng/10.1/sys/kern
Hi Neel, -Original Message- From: Neel Natu [mailto:neeln...@gmail.com] Sent: Thursday, October 9, 2014 9:01 AM To: dte...@freebsd.org Cc: Neel Natu; src-committ...@freebsd.org; svn-src-all@freebsd.org; svn- src-rel...@freebsd.org Subject: Re: svn commit: r272752 - releng/10.1/sys/kern Hi Devin, On Thu, Oct 9, 2014 at 1:35 AM, dte...@freebsd.org wrote: -Original Message- From: owner-src-committ...@freebsd.org [mailto:owner-src- committ...@freebsd.org] On Behalf Of Neel Natu Sent: Wednesday, October 8, 2014 10:47 PM To: dte...@freebsd.org Cc: Neel Natu; src-committ...@freebsd.org; svn-src-all@freebsd.org; svn- src-rel...@freebsd.org Subject: Re: svn commit: r272752 - releng/10.1/sys/kern Hi Devin, On Wed, Oct 8, 2014 at 9:53 PM, dte...@freebsd.org wrote: -Original Message- From: owner-src-committ...@freebsd.org [mailto:owner-src- committ...@freebsd.org] On Behalf Of Neel Natu Sent: Wednesday, October 8, 2014 8:39 AM To: src-committ...@freebsd.org; svn-src-all@freebsd.org; svn-src- rel...@freebsd.org Subject: svn commit: r272752 - releng/10.1/sys/kern Author: neel Date: Wed Oct 8 15:39:24 2014 New Revision: 272752 URL: https://svnweb.freebsd.org/changeset/base/272752 Log: MFC r272270: I hate to pick nits, but I believe this revision (272752 in releng/10.1) should (I suggest; deferring to re@ for final prognosis) perhaps have _not_ been an MFC from head (r272270; as was performed) but perhaps have instead been MFS from stable/10 (r272726). The svn command used to do the merge was: # svn merge -c 272726 ^/stable/10 releng/10.1 This is exactly as per the SVN merge guidelines into releng as documented here: https://www.freebsd.org/doc/en/articles/committers-guide/subversion- primer.html Hi Neel, Nowhere in that document does it describe MFS. I'm happy you did the merge as it was supposed to be done. However, your commit message is inaccurate. I don't agree - the commit message is entirely self-consistent but I see why you might think otherwise. FWIW here is an analysis of all commits into releng/10.1. There are six commits with a commit message of MFC head_revision: https://svnweb.freebsd.org/changeset/base/272684 https://svnweb.freebsd.org/changeset/base/272669 https://svnweb.freebsd.org/changeset/base/272612 https://svnweb.freebsd.org/changeset/base/272611 https://svnweb.freebsd.org/changeset/base/272608 https://svnweb.freebsd.org/changeset/base/272752 There is one commit with a commit message of MFC stable_10_revision: https://svnweb.freebsd.org/changeset/base/272682 There is one commit with a commit message of MF10 stable_10_revision: https://svnweb.freebsd.org/changeset/base/272819 Clearly there are different styles used by developers but the numbers suggest that MFC head_revision is the preferred one. best Neel [Devin Teske] Thank you for the recent sampling. I was extrapolating more from a longer experience encompassing multiple releases, and -- thanks to your recent poll -- it looks like what I have often deemed the better acronyms are falling out-of-use. ;( It would appear as though commits into lower branches are describing the intent of the commit, not the letter of the commit. Or in other words, I've always tried to make my commit messages (because I've found others whom have done-so have a laudable history with the project) reflect the action of the commit (MFS if merging from stable; MFV if merging from vendor/contrib, etc.) rather than reflect the higher-level meaning of the commit (which will almost always be MFC, except perhaps if say merging from project space; MFP). I believe I have observed waxing and waning use of these acronyms, and your recent poll shows a current waning trend; however I wish more commits would: a. describe the individual action in the message rather than the over-arching, higer-level action b. Use these acronyms more If there is strong number of yay's that agree, perhaps maybe even an addendum or slight modification to the committer's guide? -- Devin The commit message used MFC r272270 because that was the origin of the change and has the full details about the patch. I don't care if the subversion primer doesn't talk about MFS versus MFC, but it is technically inaccurate to call your commit an MFC [of] r272270 because it is in-fact (as you admit) an MFS of r272726 -- which is indeed indicated by mergeinfo. Making someone look up the mergeinfo because the commit message is a inaccurate doesn't make for an efficient/predictable setup. -- Cheers, Devin P.S. If I was really on your case, I'd insist that you had put MFS10 r# but in all reality, MFS r# would have been perfectly acceptable where MFC r# is clearly just plain wrong and misleading. best Neel The nit being that mergeinfo now shows (unnaturally) that things
svn commit: r272830 - head/lib/libcrypt
Author: des Date: Thu Oct 9 16:45:11 2014 New Revision: 272830 URL: https://svnweb.freebsd.org/changeset/base/272830 Log: Change the hardcoded default back from SHA512 to DES. PR: 192277 MFC after:3 days Modified: head/lib/libcrypt/crypt.c Modified: head/lib/libcrypt/crypt.c == --- head/lib/libcrypt/crypt.c Thu Oct 9 16:39:10 2014(r272829) +++ head/lib/libcrypt/crypt.c Thu Oct 9 16:45:11 2014(r272830) @@ -37,24 +37,26 @@ __FBSDID($FreeBSD$); #include crypt.h /* - * List of supported crypt(3) formats. The first element in the list will - * be the default. + * List of supported crypt(3) formats. + * + * The default algorithm is the last entry in the list (second-to-last + * array element since the last is a sentinel). The reason for placing + * the default last rather than first is that DES needs to be at the + * bottom for the algorithm guessing logic in crypt(3) to work correctly, + * and it needs to be the default for backward compatibility. */ static const struct crypt_format { const char *const name; char *(*const func)(const char *, const char *); const char *const magic; } crypt_formats[] = { - /* default format */ - { sha512, crypt_sha512, $6$ }, - - /* other supported formats */ { md5,crypt_md5, $1$ }, #ifdef HAS_BLOWFISH { blf,crypt_blowfish, $2}, #endif { nth,crypt_nthash, $3$ }, { sha256, crypt_sha256, $5$ }, + { sha512, crypt_sha512, $6$ }, #ifdef HAS_DES { des,crypt_des, _ }, #endif @@ -63,7 +65,8 @@ static const struct crypt_format { { NULL, NULL, NULL} }; -static const struct crypt_format *crypt_format = crypt_formats[0]; +static const struct crypt_format *crypt_format = +crypt_formats[(sizeof crypt_formats / sizeof *crypt_formats) - 2]; #define DES_SALT_ALPHABET \ ./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ___ 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: r272831 - head/sys/sys
Author: adrian Date: Thu Oct 9 16:48:42 2014 New Revision: 272831 URL: https://svnweb.freebsd.org/changeset/base/272831 Log: Shuffle things. Suggested by: jhb Differential Revision:D906 Sponsored by: Norse Corp Modified: head/sys/sys/bus.h Modified: head/sys/sys/bus.h == --- head/sys/sys/bus.h Thu Oct 9 16:45:11 2014(r272830) +++ head/sys/sys/bus.h Thu Oct 9 16:48:42 2014(r272831) @@ -327,6 +327,7 @@ int bus_generic_detach(device_t dev); void bus_generic_driver_added(device_t dev, driver_t *driver); bus_dma_tag_t bus_generic_get_dma_tag(device_t dev, device_t child); +intbus_generic_get_domain(device_t dev, device_t child, int *domain); struct resource_list * bus_generic_get_resource_list (device_t, device_t); void bus_generic_new_pass(device_t dev); @@ -365,8 +366,6 @@ int bus_generic_teardown_intr(device_t d intbus_generic_write_ivar(device_t dev, device_t child, int which, uintptr_t value); -intbus_generic_get_domain(device_t dev, device_t child, int *domain); - /* * Wrapper functions for the BUS_*_RESOURCE methods to make client code * a little simpler. ___ 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: r272832 - head/sys/ufs/ufs
Author: bapt Date: Thu Oct 9 17:26:29 2014 New Revision: 272832 URL: https://svnweb.freebsd.org/changeset/base/272832 Log: Backout r272825 every useland usage of ufs/ufs/dir.h are now broken with that change Modified: head/sys/ufs/ufs/dir.h Modified: head/sys/ufs/ufs/dir.h == --- head/sys/ufs/ufs/dir.h Thu Oct 9 16:48:42 2014(r272831) +++ head/sys/ufs/ufs/dir.h Thu Oct 9 17:26:29 2014(r272832) @@ -110,7 +110,7 @@ struct direct { * */ #defineDIRECTSIZ(namlen) \ - ((offsetof(struct direct, d_name) + \ + (((uintptr_t)((struct direct *)0)-d_name +\ ((namlen)+1)*sizeof(((struct direct *)0)-d_name[0]) + 3) ~3) #if (BYTE_ORDER == LITTLE_ENDIAN) #defineDIRSIZ(oldfmt, dp) \ ___ 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: r272833 - head/usr.sbin/pw
Author: des Date: Thu Oct 9 17:39:11 2014 New Revision: 272833 URL: https://svnweb.freebsd.org/changeset/base/272833 Log: Two more places where login_setcryptfmt() defaults to MD5 were missed in r252688. MFC after:3 days Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c == --- head/usr.sbin/pw/pw_user.c Thu Oct 9 17:26:29 2014(r272832) +++ head/usr.sbin/pw/pw_user.c Thu Oct 9 17:39:11 2014(r272833) @@ -615,7 +615,7 @@ pw_user(struct userconf * cnf, int mode, pwd-pw_dir = pw_homepolicy(cnf, args, pwd-pw_name); pwd-pw_shell = pw_shellpolicy(cnf, args, NULL); lc = login_getpwclass(pwd); - if (lc == NULL || login_setcryptfmt(lc, md5, NULL) == NULL) + if (lc == NULL || login_setcryptfmt(lc, sha512, NULL) == NULL) warn(setting crypt(3) format); login_close(lc); pwd-pw_passwd = pw_password(cnf, args, pwd-pw_name); @@ -690,7 +690,7 @@ pw_user(struct userconf * cnf, int mode, } else { lc = login_getpwclass(pwd); if (lc == NULL || - login_setcryptfmt(lc, md5, NULL) == NULL) + login_setcryptfmt(lc, sha512, NULL) == NULL) warn(setting crypt(3) format); login_close(lc); pwd-pw_passwd = pw_pwcrypt(line); ___ 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: r272834 - head/cddl/contrib/opensolaris/cmd/lockstat
Author: markj Date: Thu Oct 9 17:45:58 2014 New Revision: 272834 URL: https://svnweb.freebsd.org/changeset/base/272834 Log: Document the CPU+Pri_Class column rather than CPU+PRI, as the latter isn't used or implemented on FreeBSD. Reported by: kmacy Reviewed by: kmacy, rpaulo MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Modified: head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 == --- head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Thu Oct 9 17:39:11 2014(r272833) +++ head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Thu Oct 9 17:45:58 2014(r272834) @@ -21,7 +21,7 @@ .\ .\ $FreeBSD$ .\ -.Dd October 24, 2013 +.Dd October 8, 2014 .Dt LOCKSTAT 1 .Os .Sh NAME @@ -238,10 +238,11 @@ Average duration of the events in nanose For the profiling event, duration means interrupt latency. .It Lock Address of the lock; displayed symbolically if possible. -.It CPU+PIL -CPU plus processor interrupt level (PIL). -For example, if CPU 4 is interrupted while at PIL 6, this will be reported as -cpu[4]+6. +.It CPU+Pri_Class +CPU plus the priority class of the interrupted thread. +For example, if CPU 4 is interrupted while running a timeshare thread, this +will be reported as +.Ql cpu[4]+TShar . .It Caller Address of the caller; displayed symbolically if possible. .El ___ 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: r272800 - head/sys/x86/acpica
On Thu, Oct 09, 2014 at 05:34:29AM +, Adrian Chadd wrote: Author: adrian Date: Thu Oct 9 05:34:28 2014 New Revision: 272800 URL: https://svnweb.freebsd.org/changeset/base/272800 Log: Missing from previous commit - keep the VM domain - PXM mapping array and use it to map PXM - VM domain when needed. Differential Revision: D906 Reviewed by:jhb Modified: head/sys/x86/acpica/srat.c Modified: head/sys/x86/acpica/srat.c == --- head/sys/x86/acpica/srat.cThu Oct 9 05:33:25 2014 (r272799) +++ head/sys/x86/acpica/srat.cThu Oct 9 05:34:28 2014 (r272800) @@ -62,6 +62,8 @@ int num_mem; static ACPI_TABLE_SRAT *srat; static vm_paddr_t srat_physaddr; +static int vm_domains[VM_PHYSSEG_MAX]; + static void srat_walk_table(acpi_subtable_handler *handler, void *arg); /* @@ -247,7 +249,6 @@ check_phys_avail(void) static int renumber_domains(void) { - int domains[VM_PHYSSEG_MAX]; int i, j, slot; /* Enumerate all the domains. */ @@ -255,17 +256,17 @@ renumber_domains(void) for (i = 0; i num_mem; i++) { /* See if this domain is already known. */ for (j = 0; j vm_ndomains; j++) { - if (domains[j] = mem_info[i].domain) + if (vm_domains[j] = mem_info[i].domain) break; } - if (j vm_ndomains domains[j] == mem_info[i].domain) + if (j vm_ndomains vm_domains[j] == mem_info[i].domain) continue; /* Insert the new domain at slot 'j'. */ slot = j; for (j = vm_ndomains; j slot; j--) - domains[j] = domains[j - 1]; - domains[slot] = mem_info[i].domain; + vm_domains[j] = vm_domains[j - 1]; + vm_domains[slot] = mem_info[i].domain; vm_ndomains++; if (vm_ndomains MAXMEMDOM) { vm_ndomains = 1; @@ -280,15 +281,15 @@ renumber_domains(void) * If the domain is already the right value, no need * to renumber. */ - if (domains[i] == i) + if (vm_domains[i] == i) continue; /* Walk the cpu[] and mem_info[] arrays to renumber. */ for (j = 0; j num_mem; j++) - if (mem_info[j].domain == domains[i]) + if (mem_info[j].domain == vm_domains[i]) mem_info[j].domain = i; for (j = 0; j = MAX_APIC_ID; j++) - if (cpus[j].enabled cpus[j].domain == domains[i]) + if (cpus[j].enabled cpus[j].domain == vm_domains[i]) cpus[j].domain = i; } KASSERT(vm_ndomains 0, @@ -368,4 +369,23 @@ srat_set_cpus(void *dummy) } } SYSINIT(srat_set_cpus, SI_SUB_CPU, SI_ORDER_ANY, srat_set_cpus, NULL); + +/* + * Map a _PXM value to a VM domain ID. + * + * Returns the domain ID, or -1 if no domain ID was found. + */ +int +acpi_map_pxm_to_vm_domainid(int pxm) +{ + int i; + + for (i = 0; i vm_ndomains; i++) { + if (vm_domains[i] == pxm) + return (i); + } + + return (-1); +} + #endif /* MAXMEMDOM 1 */ I do not like it. Sorry for not looking at the web thing, I have very little time. It never was an intention that one proximity domain reported by ACPI was mapped to single VM domain. VM could split domains (in terms of vm_domains) further for other reasons. Main motivation is that there is 1:1 relations between domain/page queues/page queues locks/pagedaemons. I have patches in WIP stage which split firmware proximity domains further, to decrease congestion on the page queue locks. I wrote about this in the pgsql performance report. The short version is that there is/will be N:1 relation between VM domains and proximity domains (which is reported by ACPI for devices). ___ 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: r272752 - releng/10.1/sys/kern
On 9 October 2014 12:43, dte...@freebsd.org wrote: I believe I have observed waxing and waning use of these acronyms, and your recent poll shows a current waning trend; however I wish more commits would: a. describe the individual action in the message rather than the over-arching, higer-level action b. Use these acronyms more I think it's silly to have to manually specify metadata in a commit message which is already perfectly captured by the tool itself. The manually-entered metadata is not 100% reliable across the projects history anyway. That said, I'd be happy to help review a proposed patch to the committer's handbook or Subversion primer that documents these terms and presents examples of their use. ___ 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: r272836 - head/sys/fs/autofs
Author: trasz Date: Thu Oct 9 18:49:58 2014 New Revision: 272836 URL: https://svnweb.freebsd.org/changeset/base/272836 Log: Remove remnants of some cleanup; no functional changes. Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs_vnops.c Modified: head/sys/fs/autofs/autofs_vnops.c == --- head/sys/fs/autofs/autofs_vnops.c Thu Oct 9 18:03:12 2014 (r272835) +++ head/sys/fs/autofs/autofs_vnops.c Thu Oct 9 18:49:58 2014 (r272836) @@ -459,8 +459,8 @@ autofs_readdir(struct vop_readdir_args * static int autofs_reclaim(struct vop_reclaim_args *ap) { - struct vnode *vp = ap-a_vp; - struct autofs_node *anp = vp-v_data; + struct vnode *vp; + struct autofs_node *anp; vp = ap-a_vp; anp = vp-v_data; ___ 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: r272838 - head/usr.sbin/bhyve
Author: neel Date: Thu Oct 9 19:02:32 2014 New Revision: 272838 URL: https://svnweb.freebsd.org/changeset/base/272838 Log: iasl(8) expects integer fields in data tables to be specified as hexadecimal values. Therefore the bit width of the PM Timer Block was actually being interpreted as 50-bits instead of the expected 32-bit. This eliminates an error message emitted by a Linux 3.17 guest during boot: Invalid length for FADT/PmTimerBlock: 50, using default 32 Reviewed by: grehan MFC after:1 week Modified: head/usr.sbin/bhyve/acpi.c Modified: head/usr.sbin/bhyve/acpi.c == --- head/usr.sbin/bhyve/acpi.c Thu Oct 9 18:50:37 2014(r272837) +++ head/usr.sbin/bhyve/acpi.c Thu Oct 9 19:02:32 2014(r272838) @@ -492,7 +492,7 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, [0012]\t\tPM Timer Block : [Generic Address Structure]\n); EFPRINTF(fp, [0001]\t\tSpace ID : 01 [SystemIO]\n); - EFPRINTF(fp, [0001]\t\tBit Width : 32\n); + EFPRINTF(fp, [0001]\t\tBit Width : 20\n); EFPRINTF(fp, [0001]\t\tBit Offset : 00\n); EFPRINTF(fp, [0001]\t\tEncoded Access Width : 03 [DWord Access:32]\n); @@ -502,7 +502,7 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, [0012]\t\tGPE0 Block : [Generic Address Structure]\n); EFPRINTF(fp, [0001]\t\tSpace ID : 01 [SystemIO]\n); - EFPRINTF(fp, [0001]\t\tBit Width : 80\n); + EFPRINTF(fp, [0001]\t\tBit Width : 00\n); EFPRINTF(fp, [0001]\t\tBit Offset : 00\n); EFPRINTF(fp, [0001]\t\tEncoded Access Width : 01 [Byte Access:8]\n); EFPRINTF(fp, [0008]\t\tAddress : \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: r272839 - in head: sys/amd64/vmm/intel sys/x86/include usr.sbin/bhyve
Author: neel Date: Thu Oct 9 19:13:33 2014 New Revision: 272839 URL: https://svnweb.freebsd.org/changeset/base/272839 Log: Support Intel-specific MSRs that are accessed when booting up a linux in bhyve: - MSR_PLATFORM_INFO - MSR_TURBO_RATIO_LIMITx - MSR_RAPL_POWER_UNIT Reviewed by: grehan MFC after:1 week Modified: head/sys/amd64/vmm/intel/vmx_msr.c head/sys/x86/include/specialreg.h head/usr.sbin/bhyve/xmsr.c Modified: head/sys/amd64/vmm/intel/vmx_msr.c == --- head/sys/amd64/vmm/intel/vmx_msr.c Thu Oct 9 19:02:32 2014 (r272838) +++ head/sys/amd64/vmm/intel/vmx_msr.c Thu Oct 9 19:13:33 2014 (r272839) @@ -33,7 +33,9 @@ __FBSDID($FreeBSD$); #include sys/systm.h #include sys/cpuset.h +#include machine/clock.h #include machine/cpufunc.h +#include machine/md_var.h #include machine/specialreg.h #include machine/vmm.h @@ -176,11 +178,64 @@ msr_bitmap_change_access(char *bitmap, u } static uint64_t misc_enable; +static uint64_t platform_info; +static uint64_t turbo_ratio_limit; static uint64_t host_msrs[GUEST_MSR_NUM]; +static bool +nehalem_cpu(void) +{ + u_int family, model; + + /* +* The family:model numbers belonging to the Nehalem microarchitecture +* are documented in Section 35.5, Intel SDM dated Feb 2014. +*/ + family = CPUID_TO_FAMILY(cpu_id); + model = CPUID_TO_MODEL(cpu_id); + if (family == 0x6) { + switch (model) { + case 0x1A: + case 0x1E: + case 0x1F: + case 0x2E: + return (true); + default: + break; + } + } + return (false); +} + +static bool +westmere_cpu(void) +{ + u_int family, model; + + /* +* The family:model numbers belonging to the Westmere microarchitecture +* are documented in Section 35.6, Intel SDM dated Feb 2014. +*/ + family = CPUID_TO_FAMILY(cpu_id); + model = CPUID_TO_MODEL(cpu_id); + if (family == 0x6) { + switch (model) { + case 0x25: + case 0x2C: + return (true); + default: + break; + } + } + return (false); +} + void vmx_msr_init(void) { + uint64_t bus_freq, ratio; + int i; + /* * It is safe to cache the values of the following MSRs because * they don't change based on curcpu, curproc or curthread. @@ -204,6 +259,44 @@ vmx_msr_init(void) */ misc_enable |= (1 12) | (1 11); misc_enable = ~((1 18) | (1 16)); + + if (nehalem_cpu() || westmere_cpu()) + bus_freq = 1; /* 133Mhz */ + else + bus_freq = 1; /* 100Mhz */ + + /* +* XXXtime +* The ratio should really be based on the virtual TSC frequency as +* opposed to the host TSC. +*/ + ratio = (tsc_freq / bus_freq) 0xff; + + /* +* The register definition is based on the micro-architecture +* but the following bits are always the same: +* [15:8] Maximum Non-Turbo Ratio +* [28]Programmable Ratio Limit for Turbo Mode +* [29]Programmable TDC-TDP Limit for Turbo Mode +* [47:40] Maximum Efficiency Ratio +* +* The other bits can be safely set to 0 on all +* micro-architectures up to Haswell. +*/ + platform_info = (ratio 8) | (ratio 40); + + /* +* The number of valid bits in the MSR_TURBO_RATIO_LIMITx register is +* dependent on the maximum cores per package supported by the micro- +* architecture. For e.g., Westmere supports 6 cores per package and +* uses the low 48 bits. Sandybridge support 8 cores per package and +* uses up all 64 bits. +* +* However, the unused bits are reserved so we pretend that all bits +* in this MSR are valid. +*/ + for (i = 0; i 8; i++) + turbo_ratio_limit = (turbo_ratio_limit 8) | ratio; } void @@ -266,6 +359,13 @@ vmx_rdmsr(struct vmx *vmx, int vcpuid, u case MSR_IA32_MISC_ENABLE: *val = misc_enable; break; + case MSR_PLATFORM_INFO: + *val = platform_info; + break; + case MSR_TURBO_RATIO_LIMIT: + case MSR_TURBO_RATIO_LIMIT1: + *val = turbo_ratio_limit; + break; default: error = EINVAL; break; Modified: head/sys/x86/include/specialreg.h == --- head/sys/x86/include/specialreg.h Thu Oct 9 19:02:32 2014 (r272838) +++ head/sys/x86/include/specialreg.h Thu Oct 9 19:13:33
svn commit: r272840 - in head: sbin/ipfw sys/conf sys/modules/ipfw sys/netgraph sys/netinet sys/netpfil/ipfw
Author: melifaro Date: Thu Oct 9 19:32:35 2014 New Revision: 272840 URL: https://svnweb.freebsd.org/changeset/base/272840 Log: Merge projects/ipfw to HEAD. Main user-visible changes are related to tables: * Tables are now identified by names, not numbers. There can be up to 65k tables with up to 63-byte long names. * Tables are now set-aware (default off), so you can switch/move them atomically with rules. * More functionality is supported (swap, lock, limits, user-level lookup, batched add/del) by generic table code. * New table types are added (flow) so you can match multiple packet fields at once. * Ability to add different type of lookup algorithms for particular table type has been added. * New table algorithms are added (cidr:hash, iface:array, number:array and flow:hash) to make certain types of lookup more effective. * Table value are now capable of holding multiple data fields for different tablearg users Performance changes: * Main ipfw lock was converted to rmlock * Rule counters were separated from rule itself and made per-cpu. * Radix table entries fits into 128 bytes * struct ip_fw is now more compact so more rules will fit into 64 bytes * interface tables uses array of existing ifindexes for faster match ABI changes: All functionality supported by old ipfw(8) remains functional. Old new binaries can work together with the following restrictions: * Tables named other than ^\d+$ are shown as table(65535) in ruleset in old binaries Internal changes:. Changing table ids to numbers resulted in format modification for most sockopt codes. Old sopt format was compact, but very hard to extend (no versioning, inability to add more opcodes), so * All relevant opcodes were converted to TLV-based versioned IP_FW3-based codes. * The remaining opcodes were also converted to be able to eliminate all older opcodes at once * All IP_FW3 handlers uses special API instead of calling sooptcopy* directly to ease adding another communication methods * struct ip_fw is now different for kernel and userland * tablearg value has been changed to 0 to ease future extensions * table values are now indexes in special value array which holds extended data for given index * Batched add/delete has been added to tables code * Most changes has been done to permit batched rule addition. * interface tracking API has been added (started on demand) to permit effective interface tables operations * O(1) skipto cache, currently turned off by default at compile-time (eats 512K). * Several steps has been made towards making libipfw: * most of new functions were separated into parse/prepare/show and actuall-do-stuff pieces (already merged). * there are separate functions for parsing text string into struct ip_fw and printing struct ip_fw to supplied buffer (already merged). * Probably some more less significant/forgotten features MFC after:1 month Sponsored by: Yandex LLC Added: head/sbin/ipfw/tables.c - copied unchanged from r272837, projects/ipfw/sbin/ipfw/tables.c head/sys/netpfil/ipfw/ip_fw_iface.c - copied unchanged from r272837, projects/ipfw/sys/netpfil/ipfw/ip_fw_iface.c head/sys/netpfil/ipfw/ip_fw_table.h (contents, props changed) - copied, changed from r272837, projects/ipfw/sys/netpfil/ipfw/ip_fw_table.h head/sys/netpfil/ipfw/ip_fw_table_algo.c (contents, props changed) - copied, changed from r272837, projects/ipfw/sys/netpfil/ipfw/ip_fw_table_algo.c head/sys/netpfil/ipfw/ip_fw_table_value.c - copied unchanged from r272837, projects/ipfw/sys/netpfil/ipfw/ip_fw_table_value.c Modified: head/sbin/ipfw/Makefile head/sbin/ipfw/ipfw.8 head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sbin/ipfw/main.c head/sbin/ipfw/nat.c head/sys/conf/files head/sys/modules/ipfw/Makefile head/sys/netgraph/ng_ipfw.c head/sys/netinet/ip_fw.h head/sys/netpfil/ipfw/ip_dummynet.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_dynamic.c head/sys/netpfil/ipfw/ip_fw_log.c head/sys/netpfil/ipfw/ip_fw_nat.c head/sys/netpfil/ipfw/ip_fw_private.h head/sys/netpfil/ipfw/ip_fw_sockopt.c head/sys/netpfil/ipfw/ip_fw_table.c Directory Properties: head/ (props changed) head/sbin/ (props changed) head/sbin/ipfw/ (props changed) head/sys/ (props changed) head/sys/conf/ (props changed) Modified: head/sbin/ipfw/Makefile == --- head/sbin/ipfw/Makefile Thu Oct 9 19:13:33 2014(r272839) +++ head/sbin/ipfw/Makefile Thu Oct 9 19:32:35 2014(r272840) @@ -3,7 +3,7 @@ .include src.opts.mk PROG= ipfw -SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c +SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c tables.c WARNS?=2 .if ${MK_PF} != no Modified: head/sbin/ipfw/ipfw.8
Re: svn commit: r272752 - releng/10.1/sys/kern
On Oct 9, 2014, at 11:32, Ed Maste ema...@freebsd.org wrote: On 9 October 2014 12:43, dte...@freebsd.org wrote: I believe I have observed waxing and waning use of these acronyms, and your recent poll shows a current waning trend; however I wish more commits would: a. describe the individual action in the message rather than the over-arching, higer-level action b. Use these acronyms more I think it's silly to have to manually specify metadata in a commit message which is already perfectly captured by the tool itself. The manually-entered metadata is not 100% reliable across the projects history anyway. That said, I'd be happy to help review a proposed patch to the committer's handbook or Subversion primer that documents these terms and presents examples of their use. +1. Seems like a lot of drama over pedanticisms. Let me dig up the MFC script I have when I get home -- it automates the entire process. Thanks! ___ 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: r272800 - head/sys/x86/acpica
On 9 October 2014 11:23, Konstantin Belousov kostik...@gmail.com wrote: I do not like it. Sorry for not looking at the web thing, I have very little time. It never was an intention that one proximity domain reported by ACPI was mapped to single VM domain. VM could split domains (in terms of vm_domains) further for other reasons. Main motivation is that there is 1:1 relations between domain/page queues/page queues locks/pagedaemons. I have patches in WIP stage which split firmware proximity domains further, to decrease congestion on the page queue locks. I wrote about this in the pgsql performance report. The short version is that there is/will be N:1 relation between VM domains and proximity domains (which is reported by ACPI for devices). Hi, Well, we'll have to come up with an alternate design for all of this then. If we're going to actively define VM domains to be more than 1:1 VM domain to proximity domain then we're going to have to introduce proximity domains as a separate construct to the VM/NUMA system. (This is all fallout from this stuff not really being well defined and multiple people having differing ideas of what things may mean.) So let's flesh out what that's going to look like so we can mutate this interface and the general NUMA side of things into something that's useful. It may be enough to store the PXM map (renumbered to origin from 0 and be non-sparse) and then have a different mapping from PXM to VM domain. -a ___ 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: r272840 - in head: sbin/ipfw sys/conf sys/modules/ipfw sys/netgraph sys/netinet sys/netpfil/ipfw
On Oct 9, 2014, at 12:32, Alexander V. Chernikov melif...@freebsd.org wrote: Author: melifaro Date: Thu Oct 9 19:32:35 2014 New Revision: 272840 URL: https://svnweb.freebsd.org/changeset/base/272840 ... MFC after:1 month Should this be MFCed? Does it break existing usability? Sponsored by:Yandex LLC Relnotes: YES ___ 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: r272841 - head/sys/netinet
Author: tuexen Date: Thu Oct 9 20:08:12 2014 New Revision: 272841 URL: https://svnweb.freebsd.org/changeset/base/272841 Log: Ensure that the flags field of sctp_tmit_chunks is initialized. Thanks to Peter Bostroem from Google for reporting the issue. MFC after: 3 days Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_input.c == --- head/sys/netinet/sctp_input.c Thu Oct 9 19:32:35 2014 (r272840) +++ head/sys/netinet/sctp_input.c Thu Oct 9 20:08:12 2014 (r272841) @@ -4069,8 +4069,10 @@ __attribute__((noinline)) if (chk == NULL) { return (ret_code); } + chk-copy_by_ref = 0; chk-rec.chunk_id.id = SCTP_STREAM_RESET; chk-rec.chunk_id.can_take_data = 0; + chk-flags = 0; chk-asoc = stcb-asoc; chk-no_fr_allowed = 0; chk-book_size = chk-send_size = sizeof(struct sctp_chunkhdr); Modified: head/sys/netinet/sctp_output.c == --- head/sys/netinet/sctp_output.c Thu Oct 9 19:32:35 2014 (r272840) +++ head/sys/netinet/sctp_output.c Thu Oct 9 20:08:12 2014 (r272841) @@ -8925,16 +8925,11 @@ sctp_queue_op_err(struct sctp_tcb *stcb, return; } chk-send_size = 0; - mat = op_err; - while (mat != NULL) { + for (mat = op_err; mat != NULL; mat = SCTP_BUF_NEXT(mat)) { chk-send_size += SCTP_BUF_LEN(mat); - mat = SCTP_BUF_NEXT(mat); } - chk-rec.chunk_id.id = SCTP_OPERATION_ERROR; - chk-rec.chunk_id.can_take_data = 1; chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; - chk-flags = 0; chk-asoc = stcb-asoc; chk-data = op_err; chk-whoTo = NULL; @@ -9022,12 +9017,12 @@ sctp_send_cookie_echo(struct mbuf *m, return (-5); } chk-copy_by_ref = 0; - chk-send_size = plen; chk-rec.chunk_id.id = SCTP_COOKIE_ECHO; chk-rec.chunk_id.can_take_data = 0; + chk-flags = CHUNK_FLAGS_FRAGMENT_OK; + chk-send_size = plen; chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; - chk-flags = CHUNK_FLAGS_FRAGMENT_OK; chk-asoc = stcb-asoc; chk-data = cookie; chk-whoTo = net; @@ -9090,12 +9085,12 @@ sctp_send_heartbeat_ack(struct sctp_tcb return; } chk-copy_by_ref = 0; - chk-send_size = chk_length; chk-rec.chunk_id.id = SCTP_HEARTBEAT_ACK; chk-rec.chunk_id.can_take_data = 1; + chk-flags = 0; + chk-send_size = chk_length; chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; - chk-flags = 0; chk-asoc = stcb-asoc; chk-data = outchain; chk-whoTo = net; @@ -9127,12 +9122,12 @@ sctp_send_cookie_ack(struct sctp_tcb *st return; } chk-copy_by_ref = 0; - chk-send_size = sizeof(struct sctp_chunkhdr); chk-rec.chunk_id.id = SCTP_COOKIE_ACK; chk-rec.chunk_id.can_take_data = 1; + chk-flags = 0; + chk-send_size = sizeof(struct sctp_chunkhdr); chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; - chk-flags = 0; chk-asoc = stcb-asoc; chk-data = cookie_ack; if (chk-asoc-last_control_chunk_from != NULL) { @@ -9173,9 +9168,10 @@ sctp_send_shutdown_ack(struct sctp_tcb * return; } chk-copy_by_ref = 0; - chk-send_size = sizeof(struct sctp_chunkhdr); chk-rec.chunk_id.id = SCTP_SHUTDOWN_ACK; chk-rec.chunk_id.can_take_data = 1; + chk-flags = 0; + chk-send_size = sizeof(struct sctp_chunkhdr); chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; chk-flags = 0; @@ -9216,9 +9212,10 @@ sctp_send_shutdown(struct sctp_tcb *stcb return; } chk-copy_by_ref = 0; - chk-send_size = sizeof(struct sctp_shutdown_chunk); chk-rec.chunk_id.id = SCTP_SHUTDOWN; chk-rec.chunk_id.can_take_data = 1; + chk-flags = 0; + chk-send_size = sizeof(struct sctp_shutdown_chunk); chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; chk-flags = 0; @@ -9269,13 +9266,13 @@ sctp_send_asconf(struct sctp_tcb *stcb, return; } chk-copy_by_ref = 0; - chk-data = m_asconf; - chk-send_size = len; chk-rec.chunk_id.id = SCTP_ASCONF; chk-rec.chunk_id.can_take_data = 0; + chk-flags = CHUNK_FLAGS_FRAGMENT_OK; + chk-data = m_asconf; + chk-send_size = len; chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; - chk-flags = CHUNK_FLAGS_FRAGMENT_OK; chk-asoc = stcb-asoc; chk-whoTo = net; if (chk-whoTo) { @@ -9364,7 +9361,9
svn commit: r272842 - head/libexec/rtld-elf
Author: emaste Date: Thu Oct 9 20:39:18 2014 New Revision: 272842 URL: https://svnweb.freebsd.org/changeset/base/272842 Log: Always return pathname in dl_iterate_phdr's dlpi_name, as Linux does Linux LD_ITERATE_PHDR(3): The dlpi_name field is a null-terminated string giving the pathname from which the shared object was loaded. That functionality is much more useful than returning just the short name. Approved by: kan Sponsored by: The FreeBSD Foundation Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cThu Oct 9 20:08:12 2014 (r272841) +++ head/libexec/rtld-elf/rtld.cThu Oct 9 20:39:18 2014 (r272842) @@ -3377,8 +3377,7 @@ rtld_fill_dl_phdr_info(const Obj_Entry * { phdr_info-dlpi_addr = (Elf_Addr)obj-relocbase; - phdr_info-dlpi_name = STAILQ_FIRST(obj-names) ? - STAILQ_FIRST(obj-names)-name : obj-path; + phdr_info-dlpi_name = obj-path; phdr_info-dlpi_phdr = obj-phdr; phdr_info-dlpi_phnum = obj-phsize / sizeof(obj-phdr[0]); phdr_info-dlpi_tls_modid = obj-tlsindex; ___ 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: r272840 - in head: sbin/ipfw sys/conf sys/modules/ipfw sys/netgraph sys/netinet sys/netpfil/ipfw
On 09 Oct 2014, at 23:43, Garrett Cooper yaneurab...@gmail.com wrote: On Oct 9, 2014, at 12:32, Alexander V. Chernikov melif...@freebsd.org wrote: Author: melifaro Date: Thu Oct 9 19:32:35 2014 New Revision: 272840 URL: https://svnweb.freebsd.org/changeset/base/272840 ... MFC after:1 month Should this be MFCed? Does it break existing usability? Old ABI is kept, so old binaries can work as-is. There are _some_ output changes in new ipfw(8) binary, but this can/will be altered for MFC. Sponsored by:Yandex LLC Relnotes: YES ___ 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: r272843 - head/lib/libnv
Author: pjd Date: Thu Oct 9 20:55:05 2014 New Revision: 272843 URL: https://svnweb.freebsd.org/changeset/base/272843 Log: Fix problem on big endian systems introduced in r271579 - when we were returning from handling a nested nvlist we were resetting big-endian flag. Reported by: Kuleshov Aleksey @ yandex.ru Tested by:Kuleshov Aleksey @ yandex.ru Modified: head/lib/libnv/nvlist.c head/lib/libnv/nvlist_impl.h head/lib/libnv/nvpair.c head/lib/libnv/nvpair_impl.h Modified: head/lib/libnv/nvlist.c == --- head/lib/libnv/nvlist.c Thu Oct 9 20:39:18 2014(r272842) +++ head/lib/libnv/nvlist.c Thu Oct 9 20:55:05 2014(r272843) @@ -698,7 +698,7 @@ nvlist_check_header(struct nvlist_header const unsigned char * nvlist_unpack_header(nvlist_t *nvl, const unsigned char *ptr, size_t nfds, -int *flagsp, size_t *leftp) +bool *isbep, size_t *leftp) { struct nvlist_header nvlhdr; @@ -725,7 +725,8 @@ nvlist_unpack_header(nvlist_t *nvl, cons nvl-nvl_flags = (nvlhdr.nvlh_flags NV_FLAG_PUBLIC_MASK); ptr += sizeof(nvlhdr); - *flagsp = (int)nvlhdr.nvlh_flags; + if (isbep != NULL) + *isbep = (((int)nvlhdr.nvlh_flags NV_FLAG_BIG_ENDIAN) != 0); *leftp -= sizeof(nvlhdr); return (ptr); @@ -741,7 +742,7 @@ nvlist_xunpack(const void *buf, size_t s nvlist_t *nvl, *retnvl, *tmpnvl; nvpair_t *nvp; size_t left; - int flags; + bool isbe; left = size; ptr = buf; @@ -751,44 +752,43 @@ nvlist_xunpack(const void *buf, size_t s if (nvl == NULL) goto failed; - ptr = nvlist_unpack_header(nvl, ptr, nfds, flags, left); + ptr = nvlist_unpack_header(nvl, ptr, nfds, isbe, left); if (ptr == NULL) goto failed; while (left 0) { - ptr = nvpair_unpack(flags, ptr, left, nvp); + ptr = nvpair_unpack(isbe, ptr, left, nvp); if (ptr == NULL) goto failed; switch (nvpair_type(nvp)) { case NV_TYPE_NULL: - ptr = nvpair_unpack_null(flags, nvp, ptr, left); + ptr = nvpair_unpack_null(isbe, nvp, ptr, left); break; case NV_TYPE_BOOL: - ptr = nvpair_unpack_bool(flags, nvp, ptr, left); + ptr = nvpair_unpack_bool(isbe, nvp, ptr, left); break; case NV_TYPE_NUMBER: - ptr = nvpair_unpack_number(flags, nvp, ptr, left); + ptr = nvpair_unpack_number(isbe, nvp, ptr, left); break; case NV_TYPE_STRING: - ptr = nvpair_unpack_string(flags, nvp, ptr, left); + ptr = nvpair_unpack_string(isbe, nvp, ptr, left); break; case NV_TYPE_NVLIST: - ptr = nvpair_unpack_nvlist(flags, nvp, ptr, left, - nfds, tmpnvl); + ptr = nvpair_unpack_nvlist(isbe, nvp, ptr, left, nfds, + tmpnvl); nvlist_set_parent(tmpnvl, nvp); break; case NV_TYPE_DESCRIPTOR: - ptr = nvpair_unpack_descriptor(flags, nvp, ptr, left, + ptr = nvpair_unpack_descriptor(isbe, nvp, ptr, left, fds, nfds); break; case NV_TYPE_BINARY: - ptr = nvpair_unpack_binary(flags, nvp, ptr, left); + ptr = nvpair_unpack_binary(isbe, nvp, ptr, left); break; case NV_TYPE_NVLIST_UP: if (nvl-nvl_parent == NULL) goto failed; nvl = nvpair_nvlist(nvl-nvl_parent); - flags = nvl-nvl_flags; continue; default: PJDLOG_ABORT(Invalid type (%d)., nvpair_type(nvp)); Modified: head/lib/libnv/nvlist_impl.h == --- head/lib/libnv/nvlist_impl.hThu Oct 9 20:39:18 2014 (r272842) +++ head/lib/libnv/nvlist_impl.hThu Oct 9 20:55:05 2014 (r272843) @@ -42,6 +42,6 @@ nvlist_t *nvlist_xunpack(const void *buf nvpair_t *nvlist_get_nvpair_parent(const nvlist_t *nvl); const unsigned char *nvlist_unpack_header(nvlist_t *nvl, -const unsigned char *ptr, size_t nfds, int *flagsp, size_t *leftp); +const unsigned char *ptr, size_t nfds, bool *isbep, size_t *leftp); #endif /* !_NVLIST_IMPL_H_ */ Modified: head/lib/libnv/nvpair.c
Re: svn commit: r272800 - head/sys/x86/acpica
On Thursday, October 09, 2014 2:23:10 pm Konstantin Belousov wrote: On Thu, Oct 09, 2014 at 05:34:29AM +, Adrian Chadd wrote: Author: adrian Date: Thu Oct 9 05:34:28 2014 New Revision: 272800 URL: https://svnweb.freebsd.org/changeset/base/272800 Log: Missing from previous commit - keep the VM domain - PXM mapping array and use it to map PXM - VM domain when needed. Differential Revision:D906 Reviewed by: jhb Modified: head/sys/x86/acpica/srat.c Modified: head/sys/x86/acpica/srat.c == --- head/sys/x86/acpica/srat.c Thu Oct 9 05:33:25 2014 (r272799) +++ head/sys/x86/acpica/srat.c Thu Oct 9 05:34:28 2014 (r272800) @@ -62,6 +62,8 @@ int num_mem; static ACPI_TABLE_SRAT *srat; static vm_paddr_t srat_physaddr; +static int vm_domains[VM_PHYSSEG_MAX]; + static voidsrat_walk_table(acpi_subtable_handler *handler, void *arg); /* @@ -247,7 +249,6 @@ check_phys_avail(void) static int renumber_domains(void) { - int domains[VM_PHYSSEG_MAX]; int i, j, slot; /* Enumerate all the domains. */ @@ -255,17 +256,17 @@ renumber_domains(void) for (i = 0; i num_mem; i++) { /* See if this domain is already known. */ for (j = 0; j vm_ndomains; j++) { - if (domains[j] = mem_info[i].domain) + if (vm_domains[j] = mem_info[i].domain) break; } - if (j vm_ndomains domains[j] == mem_info[i].domain) + if (j vm_ndomains vm_domains[j] == mem_info[i].domain) continue; /* Insert the new domain at slot 'j'. */ slot = j; for (j = vm_ndomains; j slot; j--) - domains[j] = domains[j - 1]; - domains[slot] = mem_info[i].domain; + vm_domains[j] = vm_domains[j - 1]; + vm_domains[slot] = mem_info[i].domain; vm_ndomains++; if (vm_ndomains MAXMEMDOM) { vm_ndomains = 1; @@ -280,15 +281,15 @@ renumber_domains(void) * If the domain is already the right value, no need * to renumber. */ - if (domains[i] == i) + if (vm_domains[i] == i) continue; /* Walk the cpu[] and mem_info[] arrays to renumber. */ for (j = 0; j num_mem; j++) - if (mem_info[j].domain == domains[i]) + if (mem_info[j].domain == vm_domains[i]) mem_info[j].domain = i; for (j = 0; j = MAX_APIC_ID; j++) - if (cpus[j].enabled cpus[j].domain == domains[i]) + if (cpus[j].enabled cpus[j].domain == vm_domains[i]) cpus[j].domain = i; } KASSERT(vm_ndomains 0, @@ -368,4 +369,23 @@ srat_set_cpus(void *dummy) } } SYSINIT(srat_set_cpus, SI_SUB_CPU, SI_ORDER_ANY, srat_set_cpus, NULL); + +/* + * Map a _PXM value to a VM domain ID. + * + * Returns the domain ID, or -1 if no domain ID was found. + */ +int +acpi_map_pxm_to_vm_domainid(int pxm) +{ + int i; + + for (i = 0; i vm_ndomains; i++) { + if (vm_domains[i] == pxm) + return (i); + } + + return (-1); +} + #endif /* MAXMEMDOM 1 */ I do not like it. Sorry for not looking at the web thing, I have very little time. It never was an intention that one proximity domain reported by ACPI was mapped to single VM domain. VM could split domains (in terms of vm_domains) further for other reasons. Main motivation is that there is 1:1 relations between domain/page queues/page queues locks/pagedaemons. I have patches in WIP stage which split firmware proximity domains further, to decrease congestion on the page queue locks. I wrote about this in the pgsql performance report. The short version is that there is/will be N:1 relation between VM domains and proximity domains (which is reported by ACPI for devices). _PXM is also defined to be what SRAT reports for memory, and is what will be used to do NUMA-aware memory allocations. While the VM system may decide to split a given NUMA domain into multiple some-other-things, those some-other- things won't be a NUMA domain anymore. At that point, you will need to divorce them from 'domain' and use another term as the domain index into mem_info[] will still be needed so that NUMA allocations do the correct thing. -- John Baldwin ___ 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: r272844 - in head/sys: netinet netinet6
Author: bryanv Date: Thu Oct 9 22:36:21 2014 New Revision: 272844 URL: https://svnweb.freebsd.org/changeset/base/272844 Log: Add missing UDP multicast receive dtrace probes Phabricator: https://reviews.freebsd.org/D924 Reviewed by: rpaulo markj MFC after:1 month Modified: head/sys/netinet/udp_usrreq.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/udp_usrreq.c == --- head/sys/netinet/udp_usrreq.c Thu Oct 9 20:55:05 2014 (r272843) +++ head/sys/netinet/udp_usrreq.c Thu Oct 9 22:36:21 2014 (r272844) @@ -576,6 +576,8 @@ udp_input(struct mbuf **mp, int *offp, i struct mbuf *n; if ((n = m_copy(m, 0, M_COPYALL)) != NULL) { + UDP_PROBE(receive, NULL, last, ip, + last, uh); udp_append(last, ip, n, iphlen, udp_in); } @@ -607,6 +609,7 @@ udp_input(struct mbuf **mp, int *offp, i INP_INFO_RUNLOCK(pcbinfo); goto badunlocked; } + UDP_PROBE(receive, NULL, last, ip, last, uh); udp_append(last, ip, m, iphlen, udp_in); INP_RUNLOCK(last); INP_INFO_RUNLOCK(pcbinfo); Modified: head/sys/netinet6/udp6_usrreq.c == --- head/sys/netinet6/udp6_usrreq.c Thu Oct 9 20:55:05 2014 (r272843) +++ head/sys/netinet6/udp6_usrreq.c Thu Oct 9 22:36:21 2014 (r272844) @@ -370,6 +370,8 @@ udp6_input(struct mbuf **mp, int *offp, if ((n = m_copy(m, 0, M_COPYALL)) != NULL) { INP_RLOCK(last); + UDP_PROBE(receive, NULL, last, ip6, + last, uh); udp6_append(last, n, off, fromsa); INP_RUNLOCK(last); } ___ 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: r272845 - in head/lib/msun: ld128 ld80 src
Author: kargl Date: Thu Oct 9 22:39:52 2014 New Revision: 272845 URL: https://svnweb.freebsd.org/changeset/base/272845 Log: The value small=2**-(p+3), where p is the precision, can be determine from lgamma(x) = -log(x) - log(1+x) + x*(1-g) + x**2*P(x) with g = 0.57... being the Euler constant and P(x) a polynomial. Substitution of small into the RHS shows that the last 3 terms are negligible in comparison to the leading term. The choice of 3 may be conservative. The value large=2**(p+3) is detemined from Stirling's approximation lgamma(x) = x*(log(x)-1) - log(x)/2 + log(2*pi)/2 + P(1/x)/x Again, substitution of large into the RHS reveals the last 3 terms are negligible in comparison to the leading term. Move the x=+-0 special case into the |x|small block. In the ld80 and ld128 implementaion, use fdlibm compatible comparisons involving ix, lx, and llx. This replaces several floating point comparisons (some involving fabsl()) and also fixes the special cases x=1 and x=2. While here . Remove unnecessary parentheses. . Fix/improve comments due to the above changes. . Fix nearby whitespace. * src/e_lgamma_r.c: . Sort declaration. . Remove unneeded explicit cast for type conversion. . Replace a double literal constant by an integer literal constant. * src/e_lgammaf_r.c: . Sort declaration. * ld128/e_lgammal_r.c: . Replace a long double literal constant by a double literal constant. * ld80/e_lgammal_r.c: . Remove unused '#include float.h' . Replace a long double literal constant by a double literal constant. Requested by: bde Modified: head/lib/msun/ld128/e_lgammal_r.c head/lib/msun/ld80/e_lgammal_r.c head/lib/msun/src/e_lgamma_r.c head/lib/msun/src/e_lgammaf_r.c Modified: head/lib/msun/ld128/e_lgammal_r.c == --- head/lib/msun/ld128/e_lgammal_r.c Thu Oct 9 22:36:21 2014 (r272844) +++ head/lib/msun/ld128/e_lgammal_r.c Thu Oct 9 22:39:52 2014 (r272845) @@ -206,13 +206,13 @@ sin_pil(long double x) n--; } n = 7; - y = y - z + n * 0.25L; + y = y - z + n * 0.25; switch (n) { case 0: y = __kernel_sinl(pi*y,zero,0); break; case 1: case 2: y = __kernel_cosl(pi*(0.5-y),zero); break; - case 3: + case 3: case 4: y = __kernel_sinl(pi*(one-y),zero,0); break; case 5: case 6: y = -__kernel_cosl(pi*(y-1.5),zero); break; @@ -221,41 +221,33 @@ sin_pil(long double x) return -y; } - long double lgammal_r(long double x, int *signgamp) { long double nadj,p,p1,p2,p3,q,r,t,w,y,z; uint64_t llx,lx; int i; - uint16_t hx; - - EXTRACT_LDBL128_WORDS(hx, lx, llx, x); + uint16_t hx,ix; - if((hx 0x7fff) == 0x7fff) { /* erfl(nan)=nan */ - i = (hx15)1; - return (1-i)+one/x; /* erfl(+-inf)=+-1 */ - } + EXTRACT_LDBL128_WORDS(hx,lx,llx,x); -/* purge off +-inf, NaN, +-0, tiny and negative arguments */ +/* purge +-Inf and NaNs */ *signgamp = 1; - if((hx 0x7fff) == 0x7fff) /* x is +-Inf or NaN */ - return x*x; - if((hx==0||hx==0x8000)lx==0) { - if (hx0x8000) - *signgamp = -1; - return one/vzero; - } + ix = hx0x7fff; + if(ix==0x7fff) return x*x; - /* purge off tiny and negative arguments */ - if(fabsl(x)0x1p-119L) { - if(hx0x8000) { - *signgamp = -1; - return -logl(-x); - } else return -logl(x); + /* purge +-0 and tiny arguments */ + *signgamp = 1-2*(hx15); + if(ix0x3fff-116) { /* |x|2**-(p+3), return -log(|x|) */ + if((ix|lx|llx)==0) + return one/vzero; + return -logl(fabsl(x)); } + +/* purge negative integers and start evaluation for other x 0 */ if(hx0x8000) { - if(fabsl(x)=0x1p112) + *signgamp = 1; + if(ix=0x3fff+112) /* |x|=2**(p-1), must be -integer */ return one/vzero; t = sin_pil(x); if(t==zero) return one/vzero; @@ -264,17 +256,19 @@ lgammal_r(long double x, int *signgamp) x = -x; } - if(x == 1 || x ==2) r = 0; - else if(x2) { - if(x=0.896185302734) { +/* purge 1 and 2 */ + if((ix==0x3fff || ix==0x4000) (lx|llx)==0) r = 0; +/* for x 2.0 */ + else if(ix0x4000) { + if(x=8.961853027344e-01) { r = -logl(x); - if(x=0.7315998077392578) {y = 1-x; i= 0;} - else if(x=0.2316399812698364) {y= x-(tc-1); i=1;} + if(x=7.3159980773925781e-01) {y = 1-x; i= 0;} + else if(x=2.3163998126983643e-01) {y= x-(tc-1); i=1;}
svn commit: r272846 - stable/10/usr.bin/netstat
Author: hrs Date: Thu Oct 9 22:54:51 2014 New Revision: 272846 URL: https://svnweb.freebsd.org/changeset/base/272846 Log: MFC r266494: - Fix a bug which can make sysctl() fail when -F is specified. - Increase WID_IF_DEFAULT() from 6 to 8 (the default for AF_INET6) because we have interfaces with longer names than 6 chars like epairN{a,b}. - Style fixes. Modified: stable/10/usr.bin/netstat/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/netstat/route.c == --- stable/10/usr.bin/netstat/route.c Thu Oct 9 22:39:52 2014 (r272845) +++ stable/10/usr.bin/netstat/route.c Thu Oct 9 22:54:51 2014 (r272846) @@ -238,13 +238,13 @@ pr_family(int af1) #ifndef INET6 #defineWID_DST_DEFAULT(af) 18 /* width of destination column */ #defineWID_GW_DEFAULT(af) 18 /* width of gateway column */ -#defineWID_IF_DEFAULT(af) (Wflag ? 8 : 6) /* width of netif column */ +#defineWID_IF_DEFAULT(af) (Wflag ? 10 : 8) /* width of netif column */ #else #defineWID_DST_DEFAULT(af) \ ((af) == AF_INET6 ? (numeric_addr ? 33: 18) : 18) #defineWID_GW_DEFAULT(af) \ ((af) == AF_INET6 ? (numeric_addr ? 29 : 18) : 18) -#defineWID_IF_DEFAULT(af) ((af) == AF_INET6 ? 8 : (Wflag ? 8 : 6)) +#defineWID_IF_DEFAULT(af) ((af) == AF_INET6 ? 8 : (Wflag ? 10 : 8)) #endif /*INET6*/ static int wid_dst; @@ -594,16 +594,13 @@ p_rtable_sysctl(int fibnum, int af) mib[4] = NET_RT_DUMP; mib[5] = 0; mib[6] = fibnum; - if (sysctl(mib, 7, NULL, needed, NULL, 0) 0) { - err(1, sysctl: net.route.0.%d.dump.%d estimate, af, fibnum); - } - - if ((buf = malloc(needed)) == 0) { + if (sysctl(mib, nitems(mib), NULL, needed, NULL, 0) 0) + err(EX_OSERR, sysctl: net.route.0.%d.dump.%d estimate, af, + fibnum); + if ((buf = malloc(needed)) == NULL) errx(2, malloc(%lu), (unsigned long)needed); - } - if (sysctl(mib, 6, buf, needed, NULL, 0) 0) { + if (sysctl(mib, nitems(mib), buf, needed, NULL, 0) 0) err(1, sysctl: net.route.0.%d.dump.%d, af, fibnum); - } lim = buf + needed; for (next = buf; next lim; next += rtm-rtm_msglen) { rtm = (struct rt_msghdr *)next; ___ 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: r272847 - stable/10/sys/netinet6
Author: hrs Date: Thu Oct 9 22:56:38 2014 New Revision: 272847 URL: https://svnweb.freebsd.org/changeset/base/272847 Log: MFC r266857: - Add rwlock to struct dadq. A panic could occur when a large number of addresses performed DAD at the same time. Modified: stable/10/sys/netinet6/nd6_nbr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/nd6_nbr.c == --- stable/10/sys/netinet6/nd6_nbr.cThu Oct 9 22:54:51 2014 (r272846) +++ stable/10/sys/netinet6/nd6_nbr.cThu Oct 9 22:56:38 2014 (r272847) @@ -88,8 +88,10 @@ static void nd6_dad_na_input(struct ifad static void nd6_na_output_fib(struct ifnet *, const struct in6_addr *, const struct in6_addr *, u_long, int, struct sockaddr *, u_int); -VNET_DEFINE(int, dad_ignore_ns) = 0; /* ignore NS in DAD - specwise incorrect*/ -VNET_DEFINE(int, dad_maxtry) = 15; /* max # of *tries* to transmit DAD packet */ +static VNET_DEFINE(int, dad_ignore_ns) = 0;/* ignore NS in DAD + - specwise incorrect */ +static VNET_DEFINE(int, dad_maxtry) = 15; /* max # of *tries* to + transmit DAD packet */ #defineV_dad_ignore_ns VNET(dad_ignore_ns) #defineV_dad_maxtryVNET(dad_maxtry) @@ -1165,20 +1167,30 @@ struct dadq { }; static VNET_DEFINE(TAILQ_HEAD(, dadq), dadq); -VNET_DEFINE(int, dad_init) = 0; -#defineV_dadq VNET(dadq) -#defineV_dad_init VNET(dad_init) +static VNET_DEFINE(struct rwlock, dad_rwlock); +#defineV_dadq VNET(dadq) +#defineV_dad_rwlockVNET(dad_rwlock) + +#defineDADQ_LOCK_INIT()rw_init(V_dad_rwlock, nd6 DAD queue) +#defineDADQ_LOCK_DESTROY() rw_destroy(V_dad_rwlock) +#defineDADQ_LOCK_INITIALIZED() rw_initialized(V_dad_rwlock) +#defineDADQ_RLOCK()rw_rlock(V_dad_rwlock) +#defineDADQ_RUNLOCK() rw_runlock(V_dad_rwlock) +#defineDADQ_WLOCK()rw_wlock(V_dad_rwlock) +#defineDADQ_WUNLOCK() rw_wunlock(V_dad_rwlock) static struct dadq * nd6_dad_find(struct ifaddr *ifa) { struct dadq *dp; + DADQ_RLOCK(); TAILQ_FOREACH(dp, V_dadq, dad_list) if (dp-dad_ifa == ifa) - return (dp); + break; + DADQ_RUNLOCK(); - return (NULL); + return (dp); } static void @@ -1206,9 +1218,9 @@ nd6_dad_start(struct ifaddr *ifa, int de struct dadq *dp; char ip6buf[INET6_ADDRSTRLEN]; - if (!V_dad_init) { + if (DADQ_LOCK_INITIALIZED() == 0) { + DADQ_LOCK_INIT(); TAILQ_INIT(V_dadq); - V_dad_init++; } /* @@ -1258,7 +1270,9 @@ nd6_dad_start(struct ifaddr *ifa, int de #ifdef VIMAGE dp-dad_vnet = curvnet; #endif + DADQ_WLOCK(); TAILQ_INSERT_TAIL(V_dadq, (struct dadq *)dp, dad_list); + DADQ_WUNLOCK(); nd6log((LOG_DEBUG, %s: starting DAD for %s\n, if_name(ifa-ifa_ifp), ip6_sprintf(ip6buf, ia-ia_addr.sin6_addr))); @@ -1291,7 +1305,7 @@ nd6_dad_stop(struct ifaddr *ifa) { struct dadq *dp; - if (!V_dad_init) + if (DADQ_LOCK_INITIALIZED() == 0) return; dp = nd6_dad_find(ifa); if (!dp) { @@ -1301,7 +1315,9 @@ nd6_dad_stop(struct ifaddr *ifa) nd6_dad_stoptimer(dp); + DADQ_WLOCK(); TAILQ_REMOVE(V_dadq, (struct dadq *)dp, dad_list); + DADQ_WUNLOCK(); free(dp, M_IP6NDP); dp = NULL; ifa_free(ifa); @@ -1340,7 +1356,9 @@ nd6_dad_timer(struct dadq *dp) nd6log((LOG_INFO, %s: could not run DAD, driver problem?\n, if_name(ifa-ifa_ifp))); + DADQ_WLOCK(); TAILQ_REMOVE(V_dadq, (struct dadq *)dp, dad_list); + DADQ_WUNLOCK(); free(dp, M_IP6NDP); dp = NULL; ifa_free(ifa); @@ -1393,7 +1411,9 @@ nd6_dad_timer(struct dadq *dp) if_name(ifa-ifa_ifp), ip6_sprintf(ip6buf, ia-ia_addr.sin6_addr))); + DADQ_WLOCK(); TAILQ_REMOVE(V_dadq, (struct dadq *)dp, dad_list); + DADQ_WUNLOCK(); free(dp, M_IP6NDP); dp = NULL; ifa_free(ifa); @@ -1470,7 +1490,9 @@ nd6_dad_duplicated(struct ifaddr *ifa) } } + DADQ_WLOCK(); TAILQ_REMOVE(V_dadq, (struct dadq *)dp, dad_list); + DADQ_WUNLOCK(); free(dp, M_IP6NDP); dp = NULL; ifa_free(ifa);
svn commit: r272848 - head/lib/libc/gen
Author: emaste Date: Thu Oct 9 22:58:33 2014 New Revision: 272848 URL: https://svnweb.freebsd.org/changeset/base/272848 Log: Update dl_iterate_phdr(3) to follow r272842 Relnotes: yes Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/gen/dl_iterate_phdr.3 Modified: head/lib/libc/gen/dl_iterate_phdr.3 == --- head/lib/libc/gen/dl_iterate_phdr.3 Thu Oct 9 22:56:38 2014 (r272847) +++ head/lib/libc/gen/dl_iterate_phdr.3 Thu Oct 9 22:58:33 2014 (r272848) @@ -15,7 +15,7 @@ .\ .\ $OpenBSD: dl_iterate_phdr.3,v 1.3 2007/05/31 19:19:48 jmc Exp $ .\ $FreeBSD$ -.Dd February 15, 2012 +.Dd October 9, 2014 .Dt DL_ITERATE_PHDR 3 .Os .Sh NAME @@ -68,7 +68,7 @@ have the following meaning: The base address at which the object is mapped into the address space of the calling process. .It Fa dlpi_name -The name of the ELF object. +The pathname of the ELF object. .It Fa dlpi_phdr A pointer to the object's program headers. .It Fa dlpi_phnum ___ 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: r272849 - in head: . gnu/usr.bin tools/build/mk
Author: emaste Date: Thu Oct 9 23:05:31 2014 New Revision: 272849 URL: https://svnweb.freebsd.org/changeset/base/272849 Log: Build gperf only if we're using g++ (not clang++) gperf is used as a build tool for g++ and is not needed for Clang architectures. Ports and third-party software that need it can use the up-to-date devel/gperf port. PR: 194103 (exp-run) Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D886 Modified: head/UPDATING head/gnu/usr.bin/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/UPDATING == --- head/UPDATING Thu Oct 9 22:58:33 2014(r272848) +++ head/UPDATING Thu Oct 9 23:05:31 2014(r272849) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run ln -s 'abort:false,junk:false' /etc/malloc.conf.) +20141009: + gperf has been removed from the base system for architectures + that use clang. Ports that require gperf will obtain it from the + devel/gperf port. + 20140923: pjdfstest has been moved from tools/regression/pjdfstest to contrib/pjdfstest . Modified: head/gnu/usr.bin/Makefile == --- head/gnu/usr.bin/Makefile Thu Oct 9 22:58:33 2014(r272848) +++ head/gnu/usr.bin/Makefile Thu Oct 9 23:05:31 2014(r272849) @@ -18,7 +18,9 @@ SUBDIR= ${_binutils} \ ${_texinfo} .if ${MK_CXX} != no +.if ${MK_GCC} != no _gperf=gperf +.endif .if ${MK_GROFF} != no _groff=groff .endif Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Oct 9 22:58:33 2014(r272848) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Oct 9 23:05:31 2014(r272849) @@ -591,13 +591,18 @@ OLD_FILES+=usr/share/man/man1/ctm_smail. OLD_FILES+=usr/share/man/man5/ctm.5.gz .endif -# devd(8) and gperf(1) not listed here on purpose +# devd(8) not listed here on purpose .if ${MK_CXX} == no OLD_FILES+=usr/bin/CC OLD_FILES+=usr/bin/c++ OLD_FILES+=usr/bin/c++filt OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/libexec/cc1plus +.if ${MK_GCC} == no +OLD_FILES+=usr/bin/gperf +OLD_FILES+=usr/share/info/gperf.info.gz +OLD_FILES+=usr/share/man/man1/gperf.1.gz +.endif .endif .if ${MK_FMTREE} == 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: r272850 - in stable/10: include/rpcsvc lib/libc/rpc lib/libc/xdr usr.sbin/ypbind
Author: hrs Date: Thu Oct 9 23:05:32 2014 New Revision: 272850 URL: https://svnweb.freebsd.org/changeset/base/272850 Log: MFC r258580: Replace Sun RPC license in TI-RPC library with a 3-clause BSD license, with the explicit permission of Sun Microsystems in 2009. MFC r258581, 258582: Replace Sun Industry Standards Source License for Sun RPC code with a 3-clause BSD license as specified by Oracle America, Inc. in 2010. This license change was approved by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. MFC r259117, 259118: Replace Sun RPC license with a 3-clause BSD license. This license change was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. MFC r259417: Replace Sun RPC license for TI-RPC library with a 3-clause BSD license, with the explicit permission of Sun Microsystems in 2009. The code in question in this file was copied from lib/libc/rpc/pmap_getport.c. Deleted: stable/10/lib/libc/rpc/LICENSE Modified: stable/10/include/rpcsvc/bootparam_prot.x stable/10/include/rpcsvc/key_prot.x stable/10/include/rpcsvc/klm_prot.x stable/10/include/rpcsvc/mount.x stable/10/include/rpcsvc/nfs_prot.x stable/10/include/rpcsvc/nis.x stable/10/include/rpcsvc/nis_callback.x stable/10/include/rpcsvc/nis_object.x stable/10/include/rpcsvc/nis_tags.h stable/10/include/rpcsvc/rex.x stable/10/include/rpcsvc/rnusers.x stable/10/include/rpcsvc/rstat.x stable/10/include/rpcsvc/sm_inter.x stable/10/include/rpcsvc/spray.x stable/10/include/rpcsvc/yp.x stable/10/include/rpcsvc/yppasswd.x stable/10/lib/libc/xdr/xdr.c stable/10/lib/libc/xdr/xdr_array.c stable/10/lib/libc/xdr/xdr_float.c stable/10/lib/libc/xdr/xdr_mem.c stable/10/lib/libc/xdr/xdr_rec.c stable/10/lib/libc/xdr/xdr_reference.c stable/10/lib/libc/xdr/xdr_sizeof.c stable/10/lib/libc/xdr/xdr_stdio.c stable/10/usr.sbin/ypbind/yp_ping.c Directory Properties: stable/10/ (props changed) Modified: stable/10/include/rpcsvc/bootparam_prot.x == --- stable/10/include/rpcsvc/bootparam_prot.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/bootparam_prot.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * 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. + * * Neither the name of the Oracle America, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
svn commit: r272851 - vendor/illumos/dist/man/man4
Author: markj Date: Thu Oct 9 23:11:36 2014 New Revision: 272851 URL: https://svnweb.freebsd.org/changeset/base/272851 Log: 5202 want ctf(4) Reviewed by: Keith M Wesolowski wesol...@foobazco.org Reviewed by: Jerry Jelinek jerry.jeli...@joyent.com Reviewed by: Garrett D'Amore garr...@damore.org Approved by: Dan McDonald dan...@omniti.com Author: Robert Mustacchi r...@joyent.com illumos/illumos-gate@fe2e029eea29fd49d0d9058dbd5b79a252667e6b Added: vendor/illumos/dist/man/man4/ vendor/illumos/dist/man/man4/ctf.4 (contents, props changed) Added: vendor/illumos/dist/man/man4/ctf.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/man/man4/ctf.4 Thu Oct 9 23:11:36 2014 (r272851) @@ -0,0 +1,1140 @@ +.\ +.\ 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. +.\ +.\ +.\ Copyright (c) 2014 Joyent, Inc. +.\ +.Dd Sep 26, 2014 +.Dt CTF 4 +.Os +.Sh NAME +.Nm ctf +.Nd Compact C Type Format +.Sh SYNOPSIS +.In sys/ctf.h +.Sh DESCRIPTION +.Nm +is designed to be a compact representation of the C programming +language's type information focused on serving the needs of dynamic +tracing, debuggers, and other in-situ and post-mortem introspection +tools. +.Nm +data is generally included in +.Sy ELF +objects and is tagged as +.Sy SHT_PROGBITS +to ensure that the data is accessible in a running process and in subsequent +core dumps, if generated. +.Lp +The +.Nm +data contained in each file has information about the layout and +sizes of C types, including intrinsic types, enumerations, structures, +typedefs, and unions, that are used by the corresponding +.Sy ELF +object. The +.Nm +data may also include information about the types of global objects and +the return type and arguments of functions in the symbol table. +.Lp +Because a +.Nm +file is often embedded inside a file, rather than being a standalone +file itself, it may also be referred to as a +.Nm +.Sy container . +.Lp +On illumos systems, +.Nm +data is consumed by multiple programs. It can be used by the modular +debugger, +.Xr mdb 1 , +as well as by +.Xr dtrace 1M . +Programmatic access to +.Nm +data can be obtained through +.Xr libctf 3LIB . +.Lp +The +.Nm +file format is broken down into seven different sections. The first +section is the +.Sy preamble +and +.Sy header , +which describes the version of the +.Nm +file, links it has to other +.Nm +files, and the sizes of the other sections. The next section is the +.Sy label +section, +which provides a way of identifying similar groups of +.Nm +data across multiple files. This is followed by the +.Sy object +information section, which describes the type of global +symbols. The subsequent section is the +.Sy function +information section, which describes the return +types and arguments of functions. The next section is the +.Sy type +information section, which describes +the format and layout of the C types themselves, and finally the last +section is the +.Sy string +section, which contains the names of types, enumerations, members, and +labels. +.Lp +While strictly speaking, only the +.Sy preamble +and +.Sy header +are required, to be actually useful, both the type and string +sections are necessary. +.Lp +A +.Nm +file may contain all of the type information that it requires, or it +may optionally refer to another +.Nm +file which holds the remaining types. When a +.Nm +file refers to another file, it is called the +.Sy child +and the file it refers to is called the +.Sy parent . +A given file may only refer to one parent. This process is called +.Em uniquification +because it ensures each child only has type information that is +unique to it. A common example of this is that most kernel modules in +illumos are uniquified against the kernel module +.Sy genunix +and the type information that comes from the +.Sy IP +module. This means that a module only has types that are unique to +itself and the most common types in the kernel are not duplicated. +.Sh FILE FORMAT +This documents version +.Em two +of the +.Nm +file format. All applications and tools currently produce and operate on +this version. +.Lp +The file format can be summarized with the following image, the +following sections will cover this in more detail. +.Bd -literal + + +-+ 0t0 ++| Preamble| +|+-+ 0t4 +|+---| Header | +|| +-+ 0t36 + cth_lbloff +||+--| Labels | +||| +-+ 0t36 + cth_objtoff +|||+-| Objects | + +-+ 0t36
svn commit: r272853 - stable/10/sbin/route
Author: hrs Date: Thu Oct 9 23:15:26 2014 New Revision: 272853 URL: https://svnweb.freebsd.org/changeset/base/272853 Log: MFC r256715: Use long explicitly for the time difference. Modified: stable/10/sbin/route/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/route/route.c == --- stable/10/sbin/route/route.cThu Oct 9 23:14:02 2014 (r272852) +++ stable/10/sbin/route/route.cThu Oct 9 23:15:26 2014 (r272853) @@ -1780,7 +1780,8 @@ print_getmsg(struct rt_msghdr *rtm, int clock_gettime(CLOCK_REALTIME_FAST, ts); else ts.tv_sec = 0; - printf(%8ld%c\n, rtm-rtm_rmx.rmx_expire - ts.tv_sec, lock(EXPIRE)); + printf(%8ld%c\n, (long)(rtm-rtm_rmx.rmx_expire - ts.tv_sec), + lock(EXPIRE)); #undef lock #undef msec #defineRTA_IGN (RTA_DST|RTA_GATEWAY|RTA_NETMASK|RTA_IFP|RTA_IFA|RTA_BRD) ___ 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: r272854 - stable/10/sbin/mdconfig
Author: hrs Date: Thu Oct 9 23:17:18 2014 New Revision: 272854 URL: https://svnweb.freebsd.org/changeset/base/272854 Log: MFC r257036: Return 0 if: 1. -u N specified, no -f, and mdN found, 2. no -u, -f /pathname specified, and mdN associated with /pathname found, 3. -u N specified, -f /pathname specified, and both of them found, 4. -l specified and no -f, 5. -l specified, -f /pathname specified, and /pathname found. otherwise return -1. Modified: stable/10/sbin/mdconfig/mdconfig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mdconfig/mdconfig.c == --- stable/10/sbin/mdconfig/mdconfig.c Thu Oct 9 23:15:26 2014 (r272853) +++ stable/10/sbin/mdconfig/mdconfig.c Thu Oct 9 23:17:18 2014 (r272854) @@ -481,12 +481,18 @@ md_list(const char *units, int opt, cons printf(\n); /* XXX: Check if it's enough to clean everything. */ geom_stats_snapshot_free(sq); - if (((opt OPT_UNIT) (fflag == NULL) ufound) || - ((opt OPT_UNIT) == 0 (fflag != NULL) ffound) || - ((opt OPT_UNIT) (fflag != NULL) ufound ffound)) - return (0); - else - return (-1); + if (opt OPT_UNIT) { + if (((fflag == NULL) ufound) || + ((fflag == NULL) (units != NULL) ufound) || + ((fflag != NULL) ffound) || + ((fflag != NULL) (units != NULL) ufound ffound)) + return (0); + } else if (opt OPT_LIST) { + if ((fflag == NULL) || + ((fflag != NULL) ffound)) + return (0); + } + return (-1); } /* ___ 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: r272855 - stable/10/usr.bin/netstat
Author: hrs Date: Thu Oct 9 23:23:12 2014 New Revision: 272855 URL: https://svnweb.freebsd.org/changeset/base/272855 Log: MFC r266177: - Do not override sin6_scope_id in LLA when it is already set to non-zero. This fixes destination list in output of netstat -r. - Plug a memory leak. - Add RTM_VERSION check. Modified: stable/10/usr.bin/netstat/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/netstat/route.c == --- stable/10/usr.bin/netstat/route.c Thu Oct 9 23:17:18 2014 (r272854) +++ stable/10/usr.bin/netstat/route.c Thu Oct 9 23:23:12 2014 (r272855) @@ -604,6 +604,8 @@ p_rtable_sysctl(int fibnum, int af) lim = buf + needed; for (next = buf; next lim; next += rtm-rtm_msglen) { rtm = (struct rt_msghdr *)next; + if (rtm-rtm_version != RTM_VERSION) + continue; /* * Peek inside header to determine AF */ @@ -616,6 +618,7 @@ p_rtable_sysctl(int fibnum, int af) } p_rtentry_sysctl(rtm); } + free(buf); } static void @@ -993,9 +996,9 @@ in6_fillscopeid(struct sockaddr_in6 *sa6 if (IN6_IS_ADDR_LINKLOCAL(sa6-sin6_addr) || IN6_IS_ADDR_MC_NODELOCAL(sa6-sin6_addr) || IN6_IS_ADDR_MC_LINKLOCAL(sa6-sin6_addr)) { - /* XXX: override is ok? */ - sa6-sin6_scope_id = - ntohs(*(u_int16_t *)sa6-sin6_addr.s6_addr[2]); + if (sa6-sin6_scope_id == 0) + sa6-sin6_scope_id = + ntohs(*(u_int16_t *)sa6-sin6_addr.s6_addr[2]); sa6-sin6_addr.s6_addr[2] = sa6-sin6_addr.s6_addr[3] = 0; } #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: r272856 - stable/10/etc
Author: hrs Date: Thu Oct 9 23:24:23 2014 New Revision: 272856 URL: https://svnweb.freebsd.org/changeset/base/272856 Log: MFC r265225: Move configuration of IPv6 NDP flags to a point before handling ifconfig_IF. This fixes a race that a non-IPv4 interface can get an EUI64 LLA even if it has IFDISABLED nd6 flag at boot time. Modified: stable/10/etc/network.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/network.subr == --- stable/10/etc/network.subr Thu Oct 9 23:23:12 2014(r272855) +++ stable/10/etc/network.subr Thu Oct 9 23:24:23 2014(r272856) @@ -132,13 +132,6 @@ ifconfig_up() _cfg=0 fi - # ifconfig_IF - ifconfig_args=`ifconfig_getargs $1` - if [ -n ${ifconfig_args} ]; then - eval ${IFCONFIG_CMD} $1 ${ifconfig_args} - _cfg=0 - fi - # inet6 specific if ! noafif $1 afexists inet6; then if checkyesno ipv6_activate_all_interfaces; then @@ -174,7 +167,17 @@ ifconfig_up() if [ -n ${_ipv6_opts} ]; then ${IFCONFIG_CMD} $1 inet6 ${_ipv6_opts} fi + fi + # ifconfig_IF + ifconfig_args=`ifconfig_getargs $1` + if [ -n ${ifconfig_args} ]; then + eval ${IFCONFIG_CMD} $1 ${ifconfig_args} + _cfg=0 + fi + + # inet6 specific + if ! noafif $1 afexists inet6; then # ifconfig_IF_ipv6 ifconfig_args=`ifconfig_getargs $1 ipv6` if [ -n ${ifconfig_args} ]; then ___ 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: r272857 - stable/10/sys/netinet6
Author: hrs Date: Thu Oct 9 23:25:57 2014 New Revision: 272857 URL: https://svnweb.freebsd.org/changeset/base/272857 Log: MFC r266248: Cancel DAD for an ifa when the ifp has ND6_IFF_IFDISABLED as early as possible and do not clear IN6_IFF_TENTATIVE. If IFDISABLED was accidentally set after a DAD started, TENTATIVE could be cleared because no NA was received due to IFDISABLED, and as a result it could prevent DAD when manually clearing IFDISABLED after that. Modified: stable/10/sys/netinet6/nd6_nbr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/nd6_nbr.c == --- stable/10/sys/netinet6/nd6_nbr.cThu Oct 9 23:24:23 2014 (r272856) +++ stable/10/sys/netinet6/nd6_nbr.cThu Oct 9 23:25:57 2014 (r272857) @@ -1328,6 +1328,7 @@ nd6_dad_timer(struct dadq *dp) { CURVNET_SET(dp-dad_vnet); struct ifaddr *ifa = dp-dad_ifa; + struct ifnet *ifp = dp-dad_ifa-ifa_ifp; struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa; char ip6buf[INET6_ADDRSTRLEN]; @@ -1336,6 +1337,16 @@ nd6_dad_timer(struct dadq *dp) log(LOG_ERR, nd6_dad_timer: called with null parameter\n); goto done; } + if (ND_IFINFO(ifp)-flags ND6_IFF_IFDISABLED) { + /* Do not need DAD for ifdisabled interface. */ + TAILQ_REMOVE(V_dadq, (struct dadq *)dp, dad_list); + log(LOG_ERR, nd6_dad_timer: cancel DAD on %s because of + ND6_IFF_IFDISABLED.\n, ifp-if_xname); + free(dp, M_IP6NDP); + dp = NULL; + ifa_free(ifa); + goto done; + } if (ia-ia6_flags IN6_IFF_DUPLICATED) { log(LOG_ERR, nd6_dad_timer: called with duplicated address %s(%s)\n, @@ -1402,9 +1413,12 @@ nd6_dad_timer(struct dadq *dp) } else { /* * We are done with DAD. No NA came, no NS came. -* No duplicate address found. +* No duplicate address found. Check IFDISABLED flag +* again in case that it is changed between the +* beginning of this function and here. */ - ia-ia6_flags = ~IN6_IFF_TENTATIVE; + if ((ND_IFINFO(ifp)-flags ND6_IFF_IFDISABLED) == 0) + ia-ia6_flags = ~IN6_IFF_TENTATIVE; nd6log((LOG_DEBUG, %s: DAD complete for %s - no duplicates found\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: r272858 - stable/10/etc
Author: hrs Date: Thu Oct 9 23:28:04 2014 New Revision: 272858 URL: https://svnweb.freebsd.org/changeset/base/272858 Log: MFC r266267, r267636: Fix an issue in range specification handling when a -foo is specified in ifconfig_IF_aliasN. Modified: stable/10/etc/network.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/network.subr == --- stable/10/etc/network.subr Thu Oct 9 23:25:57 2014(r272857) +++ stable/10/etc/network.subr Thu Oct 9 23:28:04 2014(r272858) @@ -1043,7 +1043,7 @@ ifalias_af_common_handler() case $_c in ${_af}) case $_tmpargs in - ${_af}\ *-*) + ${_af}\ *[0-9a-fA-F]-*) ifalias_af_common_handler $_if $_af $_action \ `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }` ;; @@ -1061,7 +1061,7 @@ ifalias_af_common_handler() # Process the last component if any. if [ -n $_tmpargs} ]; then case $_tmpargs in - ${_af}\ *-*) + ${_af}\ *[0-9a-fA-F]-*) ifalias_af_common_handler $_if $_af $_action \ `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }` ;; ___ 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: r272859 - in stable/10/sys: netinet netinet6
Author: hrs Date: Thu Oct 9 23:29:44 2014 New Revision: 272859 URL: https://svnweb.freebsd.org/changeset/base/272859 Log: MFC r269054: Fix EtherIP. TOS field must be initialized when the inner protocol is PF_LINK, and multicast/broadcast flag should always be dropped because the outer protocol uses unicast even when the inner address is not for unicast. It had been broken since r236951 when gif_output() started to use IFQ_HANDOFF(). Modified: stable/10/sys/netinet/in_gif.c stable/10/sys/netinet6/in6_gif.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/in_gif.c == --- stable/10/sys/netinet/in_gif.c Thu Oct 9 23:28:04 2014 (r272858) +++ stable/10/sys/netinet/in_gif.c Thu Oct 9 23:29:44 2014 (r272859) @@ -169,6 +169,7 @@ in_gif_output(struct ifnet *ifp, int fam return ENOBUFS; bcopy(eiphdr, mtod(m, struct etherip_header *), sizeof(struct etherip_header)); + tos = 0; break; default: @@ -256,6 +257,7 @@ in_gif_output(struct ifnet *ifp, int fam #endif } + m-m_flags = ~(M_BCAST|M_MCAST); error = ip_output(m, NULL, sc-gif_ro, 0, NULL, NULL); if (!(GIF2IFP(sc)-if_flags IFF_LINK0) Modified: stable/10/sys/netinet6/in6_gif.c == --- stable/10/sys/netinet6/in6_gif.cThu Oct 9 23:28:04 2014 (r272858) +++ stable/10/sys/netinet6/in6_gif.cThu Oct 9 23:29:44 2014 (r272859) @@ -174,6 +174,7 @@ in6_gif_output(struct ifnet *ifp, return ENOBUFS; bcopy(eiphdr, mtod(m, struct etherip_header *), sizeof(struct etherip_header)); + itos = 0; break; default: @@ -264,6 +265,7 @@ in6_gif_output(struct ifnet *ifp, #endif } + m-m_flags = ~(M_BCAST|M_MCAST); #ifdef IPV6_MINMTU /* * force fragmentation to minimum MTU, to avoid path MTU discovery. ___ 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: r272860 - stable/10/usr.sbin/route6d
Author: hrs Date: Thu Oct 9 23:30:51 2014 New Revision: 272860 URL: https://svnweb.freebsd.org/changeset/base/272860 Log: MFC r270234: Recover sin6_scope_id of gateway addresses in riprecv() by using the if_index where a RIP packet was received. This fixes a bug which prevented gateway addresses in fe80::/64 from being added. Modified: stable/10/usr.sbin/route6d/route6d.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/route6d/route6d.c == --- stable/10/usr.sbin/route6d/route6d.cThu Oct 9 23:29:44 2014 (r272859) +++ stable/10/usr.sbin/route6d/route6d.cThu Oct 9 23:30:51 2014 (r272860) @@ -2838,6 +2838,8 @@ addroute(struct riprt *rrt, sin6-sin6_len = sizeof(struct sockaddr_in6); sin6-sin6_family = AF_INET6; sin6-sin6_addr = *gw; + if (IN6_IS_ADDR_LINKLOCAL(sin6-sin6_addr)) + sin6-sin6_scope_id = ifcp-ifc_index; sin6 = (struct sockaddr_in6 *)((char *)sin6 + ROUNDUP(sin6-sin6_len)); /* Netmask */ sin6-sin6_len = sizeof(struct sockaddr_in6); ___ 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: r272861 - in stable/10/etc: defaults rc.d
Author: hrs Date: Thu Oct 9 23:33:33 2014 New Revision: 272861 URL: https://svnweb.freebsd.org/changeset/base/272861 Log: MFC r270780: Fix rc.d/gssd script to define the default values in a standard way. MFC r270781: - Add a warning message when an IPv6 address is specified with no prefixlen. - Use a parameter argument in jls(8) instead of doing grep. Modified: stable/10/etc/defaults/rc.conf stable/10/etc/rc.d/gssd stable/10/etc/rc.d/jail Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/rc.conf == --- stable/10/etc/defaults/rc.conf Thu Oct 9 23:30:51 2014 (r272860) +++ stable/10/etc/defaults/rc.conf Thu Oct 9 23:33:33 2014 (r272861) @@ -288,6 +288,7 @@ kfd_enable=NO # Run kfd (or NO) kfd_program=/usr/libexec/kfd # path to kerberos 5 kfd daemon gssd_enable=NO # Run the gssd daemon (or NO). +gssd_program=/usr/sbin/gssd # Path to gssd. gssd_flags= # Flags for gssd. rwhod_enable=NO # Run the rwho daemon (or NO). Modified: stable/10/etc/rc.d/gssd == --- stable/10/etc/rc.d/gssd Thu Oct 9 23:30:51 2014(r272860) +++ stable/10/etc/rc.d/gssd Thu Oct 9 23:33:33 2014(r272861) @@ -9,10 +9,8 @@ . /etc/rc.subr -name=gssd +name=gssd +rcvar=gssd_enable load_rc_config $name -rcvar=gssd_enable -command=${gssd:-/usr/sbin/${name}} -eval ${name}_flags=\${gssd_flags}\ run_rc_command $1 Modified: stable/10/etc/rc.d/jail == --- stable/10/etc/rc.d/jail Thu Oct 9 23:30:51 2014(r272860) +++ stable/10/etc/rc.d/jail Thu Oct 9 23:33:33 2014(r272861) @@ -420,7 +420,7 @@ jail_status() jail_start() { - local _j _jid _jn _jl + local _j _jid _jl if [ $# = 0 ]; then return @@ -433,12 +433,10 @@ jail_start() command_args=-f $jail_conf -c _tmp=`mktemp -t jail` || exit 3 if $command $rc_flags $command_args $_tmp 21; then - $jail_jls -nq | while read IN; do - _jn=$(echo $IN | tr \n | grep ^name=) - _jid=$(echo $IN | tr \n | grep ^jid=) - echo -n ${_jn#name=} - echo ${_jid#jid=} \ -/var/run/jail_${_jn#name=}.id + $jail_jls jid name | while read IN; do + set -- $IN + echo -n $2 + echo $1 /var/run/jail_$2.id done else tail -1 $_tmp @@ -468,9 +466,8 @@ jail_start() sleep 1 for _j in $_jl; do echo -n ${_hostname:-${_j}} - if _jid=$($jail_jls -n -j $_j | tr \n | \ - grep ^jid=); then - echo ${_jid#jid=} /var/run/jail_${_j}.id + if _jid=$($jail_jls -j $_j jid); then + echo $_jid /var/run/jail_${_j}.id else rm -f /var/run/jail_${_j}.id echo cannot start jail \ @@ -492,9 +489,8 @@ jail_start() if $command $rc_flags $command_args \ $_tmp 21 /dev/null; then echo -n ${_hostname:-${_j}} - _jid=$($jail_jls -n -j $_j | \ - tr \n | grep ^jid=) - echo ${_jid#jid=} /var/run/jail_${_j}.id + _jid=$($jail_jls -j $_j jid) + echo $_jid /var/run/jail_${_j}.id else rm -f /var/run/jail_${_j}.id echo cannot start jail \ @@ -509,7 +505,7 @@ jail_start() jail_stop() { - local _j _jn + local _j if [ $# = 0 ]; then return @@ -520,16 +516,14 @@ jail_stop() command=$jail_program rc_flags=$jail_flags command_args=-f $jail_conf -r - $jail_jls -nq | while read IN; do - _jn=$(echo $IN | tr \n | grep ^name=) - echo -n ${_jn#name=} + $jail_jls name | while read _j; do + echo -n $_j _tmp=`mktemp -t jail` || exit 3 - $command $rc_flags $command_args ${_jn#name=} \ -$_tmp 21 - if $jail_jls -j ${_jn#name=}
svn commit: r272862 - in stable/10/etc: defaults rc.d
Author: hrs Date: Thu Oct 9 23:35:23 2014 New Revision: 272862 URL: https://svnweb.freebsd.org/changeset/base/272862 Log: MFC r270782: Restructure rc.d scripts for kerberos5 daemons: - Rename $kerberos5_server_enable with $kdc_enable and rename rc.d/kerberos with rc.d/kdc. - Rename $kadmin5_server_enable with $kadmind_enable. - Rename ${kerberos5,kpasswdd}_server with ${kdc,kpasswdd}_program. - Fix rc.d/{kadmind,kerberos,kpasswdd,kfd} scripts not to change variables after load_rc_config(). - Add rc.d/ipropd_master and rc.d/ipropd_slave scripts. These are for iprop-master(8) and iprop-slave(8). Keytab used for iprop service is defined in ipropd_{master,slave}_keytab (/etc/krb5.keytab by default). - Add dependency on rc.d/kdc to SERVERS. rc.d/kdc must be invoked as early as possible before scripts divided by rc.d/SERVERS. Note that changes to rc.d/{kdc,kpasswdd,kadmind} are backward-compatible with the old configuration variables: ${kerberos5,kpasswdd,kadmin5}_server{,_enable,_flags}. Added: stable/10/etc/rc.d/ipropd_master - copied unchanged from r270782, head/etc/rc.d/ipropd_master stable/10/etc/rc.d/ipropd_slave - copied unchanged from r270782, head/etc/rc.d/ipropd_slave stable/10/etc/rc.d/kdc - copied unchanged from r270782, head/etc/rc.d/kdc Deleted: stable/10/etc/rc.d/kerberos Modified: stable/10/etc/defaults/rc.conf stable/10/etc/rc.d/Makefile stable/10/etc/rc.d/SERVERS stable/10/etc/rc.d/kadmind stable/10/etc/rc.d/kfd stable/10/etc/rc.d/kpasswdd Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/rc.conf == --- stable/10/etc/defaults/rc.conf Thu Oct 9 23:33:33 2014 (r272861) +++ stable/10/etc/defaults/rc.conf Thu Oct 9 23:35:23 2014 (r272862) @@ -277,15 +277,28 @@ local_unbound_enable=NO # local cachin # # kerberos. Do not run the admin daemons on slave servers # -kerberos5_server_enable=NO # Run a kerberos 5 master server (or NO). -kerberos5_server=/usr/libexec/kdc# path to kerberos 5 KDC -kerberos5_server_flags=--detach # Additional flags to the kerberos 5 server -kadmind5_server_enable=NO# Run kadmind (or NO) -kadmind5_server=/usr/libexec/kadmind # path to kerberos 5 admin daemon -kpasswdd_server_enable=NO# Run kpasswdd (or NO) -kpasswdd_server=/usr/libexec/kpasswdd# path to kerberos 5 passwd daemon +kdc_enable=NO# Run a kerberos 5 KDC (or NO). +kdc_program=/usr/libexec/kdc # path to kerberos 5 KDC +kdc_flags= # Additional flags to the kerberos 5 KDC +kadmind_enable=NO# Run kadmind (or NO) +kadmind_program=/usr/libexec/kadmind # path to kadmind +kpasswdd_enable=NO # Run kpasswdd (or NO) +kpasswdd_program=/usr/libexec/kpasswdd # path to kpasswdd kfd_enable=NO# Run kfd (or NO) kfd_program=/usr/libexec/kfd # path to kerberos 5 kfd daemon +kfd_flags= +ipropd_master_enable=NO # Run Heimdal incremental propagation daemon + # (master daemon). +ipropd_master_program=/usr/libexec/ipropd-master +ipropd_master_flags= # Flags to ipropd-master. +ipropd_master_keytab=/etc/krb5.keytab# keytab for ipropd-master. +ipropd_master_slaves=# slave node names used for /var/heimdal/slaves. +ipropd_slave_enable=NO # Run Heimdal incremental propagation daemon + # (slave daemon). +ipropd_slave_program=/usr/libexec/ipropd-slave +ipropd_slave_flags= # Flags to ipropd-slave. +ipropd_slave_keytab=/etc/krb5.keytab # keytab for ipropd-slave. +ipropd_slave_masters=# master node names. gssd_enable=NO # Run the gssd daemon (or NO). gssd_program=/usr/sbin/gssd # Path to gssd. Modified: stable/10/etc/rc.d/Makefile == --- stable/10/etc/rc.d/Makefile Thu Oct 9 23:33:33 2014(r272861) +++ stable/10/etc/rc.d/Makefile Thu Oct 9 23:35:23 2014(r272862) @@ -64,13 +64,15 @@ FILES= DAEMON \ ipfw \ ipmon \ ipnat \ + ipropd_master \ + ipropd_slave \ ipsec \ ${_ipxrouted} \ iscsictl \ iscsid \ jail \ kadmind \ - kerberos \ + kdc \ keyserv \ kfd \ kld \ Modified: stable/10/etc/rc.d/SERVERS == --- stable/10/etc/rc.d/SERVERS Thu Oct 9 23:33:33 2014(r272861) +++ stable/10/etc/rc.d/SERVERS Thu Oct 9 23:35:23 2014(r272862) @@ -4,7 +4,7 @@ # # PROVIDE: SERVERS -# REQUIRE: mountcritremote abi ldconfig savecore watchdogd +# REQUIRE: mountcritremote abi ldconfig savecore watchdogd kdc # This is a
svn commit: r272863 - stable/10/etc/rc.d
Author: hrs Date: Thu Oct 9 23:39:17 2014 New Revision: 272863 URL: https://svnweb.freebsd.org/changeset/base/272863 Log: MFC r270783: Return false status only when adding a route is failed. It could erroneously return false due to an afexists() check loop in routing_start(). Modified: stable/10/etc/rc.d/routing Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/routing == --- stable/10/etc/rc.d/routing Thu Oct 9 23:35:23 2014(r272862) +++ stable/10/etc/rc.d/routing Thu Oct 9 23:39:17 2014(r272863) @@ -23,32 +23,33 @@ ROUTE_CMD=/sbin/route routing_start() { - local _cmd _af _if _a + local _cmd _af _if _a _ret _cmd=$1 _af=$2 _if=$3 + _ret=0 case $_if in |[Aa][Ll][Ll]|[Aa][Nn][Yy]) _if= ;; esac case $_af in - inet|inet6|ipx|atm) + |[Aa][Ll][Ll]|[Aa][Nn][Yy]) + for _a in inet inet6 atm; do + afexists $_a || continue + setroutes $_cmd $_a $_if || _ret=1 + done + ;; + *) if afexists $_af; then - setroutes $_cmd $_af $_if + setroutes $_cmd $_af $_if || _ret=1 else err 1 Unsupported address family: $_af. fi - ;; - |[Aa][Ll][Ll]|[Aa][Nn][Yy]) - for _a in inet inet6 ipx atm; do - afexists $_a setroutes $_cmd $_a $_if - done - ;; - *) - err 1 Unsupported address family: $_af. - ;; + ;; esac + + return $_ret } routing_stop() @@ -62,17 +63,6 @@ routing_stop() esac case $_af in - inet|inet6|ipx|atm) - if afexists $_af; then - eval static_${_af} delete $_if - # When $_if is specified, do not flush routes. - if ! [ -n $_if ]; then - eval routing_stop_${_af} - fi - else - err 1 Unsupported address family: $_af. - fi - ;; |[Aa][Ll][Ll]|[Aa][Nn][Yy]) for _a in inet inet6 ipx atm; do afexists $_a || continue @@ -82,10 +72,18 @@ routing_stop() eval routing_stop_${_a} fi done - ;; + ;; *) - err 1 Unsupported address family: $_af. - ;; + if afexists $_af; then + eval static_${_af} delete $_if + # When $_if is specified, do not flush routes. + if ! [ -n $_if ]; then + eval routing_stop_${_af} + fi + else + err 1 Unsupported address family: $_af. + fi + ;; esac } ___ 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: r272864 - stable/10/etc/rc.d
Author: hrs Date: Thu Oct 9 23:40:08 2014 New Revision: 272864 URL: https://svnweb.freebsd.org/changeset/base/272864 Log: MFC r270836: Use ipv6_prefer when at least one ifconfig_IF_ipv6 is configured. Modified: stable/10/etc/rc.d/ip6addrctl Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/ip6addrctl == --- stable/10/etc/rc.d/ip6addrctl Thu Oct 9 23:39:17 2014 (r272863) +++ stable/10/etc/rc.d/ip6addrctl Thu Oct 9 23:40:08 2014 (r272864) @@ -75,6 +75,8 @@ ip6addrctl_start() else if checkyesno ipv6_activate_all_interfaces; then ip6addrctl_prefer_ipv6 + elif [ -n $(list_vars ifconfig_\*_ipv6) ]; then + ip6addrctl_prefer_ipv6 else ip6addrctl_prefer_ipv4 fi ___ 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: r272865 - stable/10/etc/rc.d
Author: hrs Date: Thu Oct 9 23:41:11 2014 New Revision: 272865 URL: https://svnweb.freebsd.org/changeset/base/272865 Log: MFC r271145: Fix a bug which prevented mount.fstab parameter from being converted when jail_JID_devfs_enable=NO. Modified: stable/10/etc/rc.d/jail Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/jail == --- stable/10/etc/rc.d/jail Thu Oct 9 23:40:08 2014(r272864) +++ stable/10/etc/rc.d/jail Thu Oct 9 23:41:11 2014(r272865) @@ -207,6 +207,10 @@ parse_options() extract_var $_j consolelog exec.consolelog - \ /var/log/jail_${_j}_console.log + if [ -r $_fstab ]; then + echo mount.fstab = \$_fstab\; + fi + eval : \${jail_${_j}_devfs_enable:=${jail_devfs_enable:-NO}} if checkyesno jail_${_j}_devfs_enable; then echo mount.devfs; @@ -222,11 +226,7 @@ parse_options() ;; *) warn devfs_ruleset must be an integer. ;; esac - if [ -r $_fstab ]; then - echo mount.fstab = \$_fstab\; - fi fi - eval : \${jail_${_j}_fdescfs_enable:=${jail_fdescfs_enable:-NO}} if checkyesno jail_${_j}_fdescfs_enable; then echo mount.fdescfs; ___ 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: r272866 - stable/10/usr.bin/vmstat
Author: hrs Date: Thu Oct 9 23:42:22 2014 New Revision: 272866 URL: https://svnweb.freebsd.org/changeset/base/272866 Log: MFC r271410: Fix header output when -P is specified and (ncpus - 1) != maxid. Modified: stable/10/usr.bin/vmstat/vmstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/vmstat/vmstat.c == --- stable/10/usr.bin/vmstat/vmstat.c Thu Oct 9 23:41:11 2014 (r272865) +++ stable/10/usr.bin/vmstat/vmstat.c Thu Oct 9 23:42:22 2014 (r272866) @@ -650,6 +650,8 @@ dovmstat(unsigned int interval, int reps uptime = getuptime(); halfuptime = uptime / 2; rate_adj = 1; + ncpus = 1; + maxid = 0; /* * If the user stops the program (control-Z) and then resumes it, @@ -695,7 +697,7 @@ dovmstat(unsigned int interval, int reps } for (hdrcnt = 1;;) { if (!--hdrcnt) - printhdr(ncpus, cpumask); + printhdr(maxid, cpumask); if (kd != NULL) { if (kvm_getcptime(kd, cur.cp_time) 0) errx(1, kvm_getcptime: %s, kvm_geterr(kd)); @@ -746,7 +748,7 @@ dovmstat(unsigned int interval, int reps errx(1, %s, devstat_errbuf); break; case 1: - printhdr(ncpus, cpumask); + printhdr(maxid, cpumask); break; default: break; @@ -815,7 +817,7 @@ dovmstat(unsigned int interval, int reps } static void -printhdr(int ncpus, u_long cpumask) +printhdr(int maxid, u_long cpumask) { int i, num_shown; @@ -827,7 +829,7 @@ printhdr(int ncpus, u_long cpumask) (void)printf(disk); (void)printf( faults ); if (Pflag) { - for (i = 0; i ncpus; i++) { + for (i = 0; i = maxid; i++) { if (cpumask (1ul i)) printf(cpu%-2d, i); } @@ -843,8 +845,10 @@ printhdr(int ncpus, u_long cpumask) dev_select[i].unit_number); (void)printf( in sy cs); if (Pflag) { - for (i = 0; i ncpus; i++) - printf( us sy id); + for (i = 0; i = maxid; i++) { + if (cpumask (1ul i)) + printf( us sy id); + } printf(\n); } else printf( us sy id\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: r272867 - stable/10/sbin/dump
Author: hrs Date: Thu Oct 9 23:43:13 2014 New Revision: 272867 URL: https://svnweb.freebsd.org/changeset/base/272867 Log: MFC r271411: Fix a bug which could break extended attributes in a dump output. This occurred when a file was 892kB long and had a large data (1kB) in the extended attributes. Modified: stable/10/sbin/dump/traverse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/dump/traverse.c == --- stable/10/sbin/dump/traverse.c Thu Oct 9 23:42:22 2014 (r272866) +++ stable/10/sbin/dump/traverse.c Thu Oct 9 23:43:13 2014 (r272867) @@ -673,7 +673,12 @@ ufs2_blksout(union dinode *dp, ufs2_dadd */ blks = howmany(frags * sblock-fs_fsize, TP_BSIZE); if (last) { - resid = howmany(fragoff(sblock, dp-dp2.di_size), TP_BSIZE); + if (writingextdata) + resid = howmany(fragoff(sblock, spcl.c_extsize), + TP_BSIZE); + else + resid = howmany(fragoff(sblock, dp-dp2.di_size), + TP_BSIZE); if (resid 0) blks -= howmany(sblock-fs_fsize, TP_BSIZE) - resid; } ___ 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: r272868 - in stable/10: etc sys/netinet
Author: hrs Date: Thu Oct 9 23:45:26 2014 New Revision: 272868 URL: https://svnweb.freebsd.org/changeset/base/272868 Log: MFC r271545, 271610: Make net.inet.ip.sourceroute, net.inet.ip.accept_sourceroute, and net.inet.ip.process_options vnet-aware. Modified: stable/10/etc/rc.subr stable/10/sys/netinet/ip_fastfwd.c stable/10/sys/netinet/ip_options.c stable/10/sys/netinet/ip_options.h Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.subr == --- stable/10/etc/rc.subr Thu Oct 9 23:43:13 2014(r272867) +++ stable/10/etc/rc.subr Thu Oct 9 23:45:26 2014(r272868) @@ -1966,6 +1966,22 @@ check_required_after() return 0 } +# check_jail mib +# Return true if security.jail.$mib exists and set to 1. + +check_jail() +{ + local _mib _v + + _mib=$1 + if _v=$(${SYSCTL_N} security.jail.$_mib 2 /dev/null); then + case $_v in + 1) return 0;; + esac + fi + return 1 +} + # check_kern_features mib # Return existence of kern.features.* sysctl MIB as true or # false. The result will be cached in $_rc_cache_kern_features_ Modified: stable/10/sys/netinet/ip_fastfwd.c == --- stable/10/sys/netinet/ip_fastfwd.c Thu Oct 9 23:43:13 2014 (r272867) +++ stable/10/sys/netinet/ip_fastfwd.c Thu Oct 9 23:45:26 2014 (r272868) @@ -297,9 +297,9 @@ ip_fastforward(struct mbuf *m) * Only IP packets without options */ if (ip-ip_hl != (sizeof(struct ip) 2)) { - if (ip_doopts == 1) + if (V_ip_doopts == 1) return m; - else if (ip_doopts == 2) { + else if (V_ip_doopts == 2) { icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_FILTER_PROHIB, 0, 0); return NULL;/* mbuf already free'd */ Modified: stable/10/sys/netinet/ip_options.c == --- stable/10/sys/netinet/ip_options.c Thu Oct 9 23:43:13 2014 (r272867) +++ stable/10/sys/netinet/ip_options.c Thu Oct 9 23:45:26 2014 (r272868) @@ -65,18 +65,21 @@ __FBSDID($FreeBSD$); #include sys/socketvar.h -static int ip_dosourceroute = 0; -SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, -ip_dosourceroute, 0, Enable forwarding source routed IP packets); - -static int ip_acceptsourceroute = 0; -SYSCTL_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, -CTLFLAG_RW, ip_acceptsourceroute, 0, +static VNET_DEFINE(int, ip_dosourceroute); +SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, +VNET_NAME(ip_dosourceroute), 0, +Enable forwarding source routed IP packets); +#defineV_ip_dosourceroute VNET(ip_dosourceroute) + +static VNET_DEFINE(int,ip_acceptsourceroute); +SYSCTL_VNET_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, +CTLFLAG_RW, VNET_NAME(ip_acceptsourceroute), 0, Enable accepting source routed IP packets); +#defineV_ip_acceptsourceroute VNET(ip_acceptsourceroute) -intip_doopts = 1; /* 0 = ignore, 1 = process, 2 = reject */ -SYSCTL_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_RW, -ip_doopts, 0, Enable IP options processing ([LS]SRR, RR, TS)); +VNET_DEFINE(int, ip_doopts) = 1; /* 0 = ignore, 1 = process, 2 = reject */ +SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_RW, +VNET_NAME(ip_doopts), 0, Enable IP options processing ([LS]SRR, RR, TS)); static voidsave_rte(struct mbuf *m, u_char *, struct in_addr); @@ -104,9 +107,9 @@ ip_dooptions(struct mbuf *m, int pass) struct sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET }; /* Ignore or reject packets with IP options. */ - if (ip_doopts == 0) + if (V_ip_doopts == 0) return 0; - else if (ip_doopts == 2) { + else if (V_ip_doopts == 2) { type = ICMP_UNREACH; code = ICMP_UNREACH_FILTER_PROHIB; goto bad; @@ -167,7 +170,7 @@ ip_dooptions(struct mbuf *m, int pass) code = ICMP_UNREACH_SRCFAIL; goto bad; } - if (!ip_dosourceroute) + if (!V_ip_dosourceroute) goto nosourcerouting; /* * Loose routing, and not at next destination @@ -180,7 +183,7 @@ ip_dooptions(struct mbuf *m, int pass) /* * End of source route. Should be
svn commit: r272869 - stable/10/sys/netinet
Author: hrs Date: Thu Oct 9 23:46:17 2014 New Revision: 272869 URL: https://svnweb.freebsd.org/changeset/base/272869 Log: MFC r271628: Use generic SYSCTL_* macro instead of deprecated SYSCTL_VNET_*. Modified: stable/10/sys/netinet/ip_options.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_options.c == --- stable/10/sys/netinet/ip_options.c Thu Oct 9 23:45:26 2014 (r272868) +++ stable/10/sys/netinet/ip_options.c Thu Oct 9 23:46:17 2014 (r272869) @@ -66,19 +66,19 @@ __FBSDID($FreeBSD$); #include sys/socketvar.h static VNET_DEFINE(int, ip_dosourceroute); -SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, -VNET_NAME(ip_dosourceroute), 0, +SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, +CTLFLAG_VNET | CTLFLAG_RW, VNET_NAME(ip_dosourceroute), 0, Enable forwarding source routed IP packets); #defineV_ip_dosourceroute VNET(ip_dosourceroute) static VNET_DEFINE(int,ip_acceptsourceroute); -SYSCTL_VNET_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, -CTLFLAG_RW, VNET_NAME(ip_acceptsourceroute), 0, +SYSCTL_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, +CTLFLAG_VNET | CTLFLAG_RW, VNET_NAME(ip_acceptsourceroute), 0, Enable accepting source routed IP packets); #defineV_ip_acceptsourceroute VNET(ip_acceptsourceroute) VNET_DEFINE(int, ip_doopts) = 1; /* 0 = ignore, 1 = process, 2 = reject */ -SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_RW, +SYSCTL_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_VNET | CTLFLAG_RW, VNET_NAME(ip_doopts), 0, Enable IP options processing ([LS]SRR, RR, TS)); static voidsave_rte(struct mbuf *m, u_char *, struct in_addr); ___ 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: r272870 - in stable/10/etc: defaults rc.d
Author: hrs Date: Thu Oct 9 23:47:07 2014 New Revision: 272870 URL: https://svnweb.freebsd.org/changeset/base/272870 Log: MFC r271663: Fix a typo; master server for iprop service should be singular. Modified: stable/10/etc/defaults/rc.conf stable/10/etc/rc.d/ipropd_slave Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/rc.conf == --- stable/10/etc/defaults/rc.conf Thu Oct 9 23:46:17 2014 (r272869) +++ stable/10/etc/defaults/rc.conf Thu Oct 9 23:47:07 2014 (r272870) @@ -298,7 +298,7 @@ ipropd_slave_enable=NO# Run Heimdal i ipropd_slave_program=/usr/libexec/ipropd-slave ipropd_slave_flags= # Flags to ipropd-slave. ipropd_slave_keytab=/etc/krb5.keytab # keytab for ipropd-slave. -ipropd_slave_masters=# master node names. +ipropd_slave_master= # master node name. gssd_enable=NO # Run the gssd daemon (or NO). gssd_program=/usr/sbin/gssd # Path to gssd. Modified: stable/10/etc/rc.d/ipropd_slave == --- stable/10/etc/rc.d/ipropd_slave Thu Oct 9 23:46:17 2014 (r272869) +++ stable/10/etc/rc.d/ipropd_slave Thu Oct 9 23:47:07 2014 (r272870) @@ -17,15 +17,15 @@ start_precmd=${name}_start_precmd ipropd_slave_start_precmd() { - if [ -z $ipropd_slave_masters ]; then - warn \$ipropd_slave_masters is empty. + if [ -z $ipropd_slave_master ]; then + warn \$ipropd_slave_master is empty. return 1 fi command_args= \ $command_args \ --keytab=\$ipropd_slave_keytab\ \ --detach \ - $ipropd_slave_masters + $ipropd_slave_master } load_rc_config $name ___ 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: r272871 - stable/10/sbin/ping6
Author: hrs Date: Thu Oct 9 23:48:20 2014 New Revision: 272871 URL: https://svnweb.freebsd.org/changeset/base/272871 Log: MFC r271909: Revert changes in r269180. It could cause -c N option to enter an infinite loop if no reply packet is received. Modified: stable/10/sbin/ping6/ping6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ping6/ping6.c == --- stable/10/sbin/ping6/ping6.cThu Oct 9 23:47:07 2014 (r272870) +++ stable/10/sbin/ping6/ping6.cThu Oct 9 23:48:20 2014 (r272871) @@ -1090,14 +1090,8 @@ main(int argc, char *argv[]) /* signal handling */ if (seenalrm) { /* last packet sent, timeout reached? */ - if (npackets ntransmitted = npackets) { - struct timeval zerotime = {0, 0}; - itimer.it_value = zerotime; - itimer.it_interval = zerotime; - (void)setitimer(ITIMER_REAL, itimer, NULL); - seenalrm = 0; /* clear flag */ - continue; - } + if (npackets ntransmitted = npackets) + break; retransmit(); seenalrm = 0; continue; ___ 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: r272872 - stable/10/sbin/routed
Author: hrs Date: Thu Oct 9 23:49:36 2014 New Revision: 272872 URL: https://svnweb.freebsd.org/changeset/base/272872 Log: MFC r271919: Fix a bug which could make routed(8) daemon exit by sending a special RIP query from a remote machine, and disable accepting it by default. This requests a routed(8) daemon to dump routing information base for debugging purpose. An -i flag to enable it has been added. Modified: stable/10/sbin/routed/defs.h stable/10/sbin/routed/input.c stable/10/sbin/routed/main.c stable/10/sbin/routed/output.c stable/10/sbin/routed/routed.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/routed/defs.h == --- stable/10/sbin/routed/defs.hThu Oct 9 23:48:20 2014 (r272871) +++ stable/10/sbin/routed/defs.hThu Oct 9 23:49:36 2014 (r272872) @@ -462,6 +462,7 @@ extern int ridhosts; /* 1=reduce host r extern int mhome; /* 1=want multi-homed host route */ extern int advertise_mhome;/* 1=must continue advertising it */ extern int auth_ok;/* 1=ignore auth if we do not care */ +extern int insecure; /* Reply to special queries or not */ extern struct timeval clk; /* system clock's idea of time */ extern struct timeval epoch; /* system clock when started */ Modified: stable/10/sbin/routed/input.c == --- stable/10/sbin/routed/input.c Thu Oct 9 23:48:20 2014 (r272871) +++ stable/10/sbin/routed/input.c Thu Oct 9 23:49:36 2014 (r272872) @@ -289,8 +289,19 @@ input(struct sockaddr_in *from,/* rece * with all we know. */ if (from-sin_port != htons(RIP_PORT)) { - supply(from, aifp, OUT_QUERY, 0, - rip-rip_vers, ap != 0); + /* +* insecure: query from non-router node +*1: allow from distant node +*0: allow from neighbor node +* == 0: deny +*/ + if ((aifp != NULL insecure 0) || + (aifp == NULL insecure 1)) + supply(from, aifp, OUT_QUERY, 0, + rip-rip_vers, ap != 0); + else + trace_pkt(Warning: + possible attack detected); return; } Modified: stable/10/sbin/routed/main.c == --- stable/10/sbin/routed/main.cThu Oct 9 23:48:20 2014 (r272871) +++ stable/10/sbin/routed/main.cThu Oct 9 23:49:36 2014 (r272872) @@ -68,6 +68,7 @@ int ridhosts; /* 1=reduce host routes intmhome; /* 1=want multi-homed host route */ intadvertise_mhome;/* 1=must continue advertising it */ intauth_ok = 1;/* 1=ignore auth if we do not care */ +intinsecure; /* Reply to special queries or not */ struct timeval epoch; /* when started */ struct timeval clk; @@ -136,8 +137,11 @@ main(int argc, (void)gethostname(myname, sizeof(myname)-1); (void)gethost(myname, myaddr); - while ((n = getopt(argc, argv, sqdghmAtvT:F:P:)) != -1) { + while ((n = getopt(argc, argv, isqdghmAtvT:F:P:)) != -1) { switch (n) { + case 'i': + insecure++; + break; case 's': supplier = 1; supplier_set = 1; Modified: stable/10/sbin/routed/output.c == --- stable/10/sbin/routed/output.c Thu Oct 9 23:48:20 2014 (r272871) +++ stable/10/sbin/routed/output.c Thu Oct 9 23:49:36 2014 (r272872) @@ -673,8 +673,6 @@ supply(struct sockaddr_in *dst, struct rt_entry *rt; int def_metric; - assert(ifp != NULL); - ws.state = 0; ws.gen_limit = 1024; Modified: stable/10/sbin/routed/routed.8 == --- stable/10/sbin/routed/routed.8 Thu Oct 9 23:48:20 2014
Re: svn commit: r272871 - stable/10/sbin/ping6
On 10/9/2014 6:48 PM, Hiroki Sato wrote: Author: hrs Date: Thu Oct 9 23:48:20 2014 New Revision: 272871 URL: https://svnweb.freebsd.org/changeset/base/272871 Log: MFC r271909: Revert changes in r269180. It could cause -c N option to enter an infinite loop if no reply packet is received. Do you plan to merge this to releng/10.1? It seems important for automation. Modified: stable/10/sbin/ping6/ping6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ping6/ping6.c == --- stable/10/sbin/ping6/ping6.c Thu Oct 9 23:47:07 2014 (r272870) +++ stable/10/sbin/ping6/ping6.c Thu Oct 9 23:48:20 2014 (r272871) @@ -1090,14 +1090,8 @@ main(int argc, char *argv[]) /* signal handling */ if (seenalrm) { /* last packet sent, timeout reached? */ - if (npackets ntransmitted = npackets) { - struct timeval zerotime = {0, 0}; - itimer.it_value = zerotime; - itimer.it_interval = zerotime; - (void)setitimer(ITIMER_REAL, itimer, NULL); - seenalrm = 0; /* clear flag */ - continue; - } + if (npackets ntransmitted = npackets) + break; retransmit(); seenalrm = 0; continue; -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r272873 - stable/10/sbin/routed
Author: hrs Date: Thu Oct 9 23:50:31 2014 New Revision: 272873 URL: https://svnweb.freebsd.org/changeset/base/272873 Log: MFC r271921: Fix a typo. Modified: stable/10/sbin/routed/routed.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/routed/routed.8 == --- stable/10/sbin/routed/routed.8 Thu Oct 9 23:49:36 2014 (r272872) +++ stable/10/sbin/routed/routed.8 Thu Oct 9 23:50:31 2014 (r272873) @@ -263,7 +263,7 @@ it replies to a query from remote nodes utility can be used to send a request. .Pp This feature is disabled by default because of a risk of reflection attack -though it useful for debugging purpose, +though it is useful for debugging purpose. .It Fl s force .Nm ___ 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: r272874 - stable/10/etc
Author: hrs Date: Thu Oct 9 23:52:33 2014 New Revision: 272874 URL: https://svnweb.freebsd.org/changeset/base/272874 Log: MFC r272393: Resurrect set_rcvar() as a function to define a rc.conf variable. It defines a variable and its default value in load_rc_config() just after rc.conf is loaded. rcvar command shows the current and the default values. Modified: stable/10/etc/rc.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.subr == --- stable/10/etc/rc.subr Thu Oct 9 23:50:31 2014(r272873) +++ stable/10/etc/rc.subr Thu Oct 9 23:52:33 2014(r272874) @@ -68,6 +68,39 @@ list_vars() done; } } +# set_rcvar [var] [defval] [desc] +# +# Echo or define a rc.conf(5) variable name. Global variable +# $rcvars is used. +# +# If no argument is specified, echo ${name}_enable. +# +# If only a var is specified, echo ${var}_enable. +# +# If var and defval are specified, the ${var} is defined as +# rc.conf(5) variable and the default value is ${defvar}. An +# optional argument $desc can also be specified to add a +# description for that. +# +set_rcvar() +{ + local _var + + case $# in + 0) echo ${name}_enable ;; + 1) echo ${1}_enable ;; + *) + debug set_rcvar: \$$1=$2 is added \ +as a rc.conf(5) variable. + _var=$1 + rcvars=${rcvars# } $_var + eval ${_var}_defval=\$2\ + shift 2 + eval ${_var}_desc=\$*\ + ;; + esac +} + # set_rcvar_obsolete oldvar [newvar] [msg] # Define obsolete variable. # Global variable $rcvars_obsolete is used. @@ -76,7 +109,7 @@ set_rcvar_obsolete() { local _var _var=$1 - debug rcvar_obsolete: \$$1(old) - \$$2(new) is defined + debug set_rcvar_obsolete: \$$1(old) - \$$2(new) is defined rcvars_obsolete=${rcvars_obsolete# } $1 eval ${1}_newvar=\$2\ @@ -1091,8 +1124,8 @@ $command $rc_flags $command_args echo fi echo # - # Get unique vars in $rcvar - for _v in $rcvar; do + # Get unique vars in $rcvar $rcvars + for _v in $rcvar $rcvars; do case $v in $_v\ *|\ *$_v|*\ $_v\ *) ;; *) v=${v# } $_v ;; @@ -1238,7 +1271,7 @@ run_rc_script() unset name command command_args command_interpreter \ extra_commands pidfile procname \ - rcvar rcvars_obsolete required_dirs required_files \ + rcvar rcvars rcvars_obsolete required_dirs required_files \ required_vars eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd @@ -1306,7 +1339,7 @@ load_rc_config() done # Set defaults if defined. - for _var in $rcvar; do + for _var in $rcvar $rcvars; do eval _defval=\$${_var}_defval if [ -n $_defval ]; then eval : \${$_var:=\$${_var}_defval} ___ 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: r272871 - stable/10/sbin/ping6
Bryan Drewery bdrew...@freebsd.org wrote in 54371f0b.7060...@freebsd.org: bd On 10/9/2014 6:48 PM, Hiroki Sato wrote: bd Author: hrs bd Date: Thu Oct 9 23:48:20 2014 bd New Revision: 272871 bd URL: https://svnweb.freebsd.org/changeset/base/272871 bd bd Log: bdMFC r271909: bd Revert changes in r269180. It could cause -c N option to enter an bd infinite loop if no reply packet is received. bd bd bd Do you plan to merge this to releng/10.1? It seems important for automation. Yes, I do. -- Hiroki pgpTaLt8X8Eyk.pgp Description: PGP signature
svn commit: r272875 - in stable/10/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm
Author: smh Date: Fri Oct 10 00:12:16 2014 New Revision: 272875 URL: https://svnweb.freebsd.org/changeset/base/272875 Log: MFC r270759: Refactor ZFS ARC reclaim logic to be more VM cooperative MFC r270861: Ensure that ZFS ARC free memory checks include cached pages MFC r272483: Refactor ZFS ARC reclaim checks and limits Sponsored by: Multiplay Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c stable/10/sys/cddl/compat/opensolaris/sys/kmem.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c == --- stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Thu Oct 9 23:52:33 2014(r272874) +++ stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Fri Oct 10 00:12:16 2014(r272875) @@ -133,13 +133,6 @@ kmem_size(void) return (kmem_size_val); } -uint64_t -kmem_used(void) -{ - - return (vmem_size(kmem_arena, VMEM_ALLOC)); -} - static int kmem_std_constructor(void *mem, int size __unused, void *private, int flags) { Modified: stable/10/sys/cddl/compat/opensolaris/sys/kmem.h == --- stable/10/sys/cddl/compat/opensolaris/sys/kmem.hThu Oct 9 23:52:33 2014(r272874) +++ stable/10/sys/cddl/compat/opensolaris/sys/kmem.hFri Oct 10 00:12:16 2014(r272875) @@ -66,7 +66,6 @@ typedef struct kmem_cache { void *zfs_kmem_alloc(size_t size, int kmflags); void zfs_kmem_free(void *buf, size_t size); uint64_t kmem_size(void); -uint64_t kmem_used(void); kmem_cache_t *kmem_cache_create(char *name, size_t bufsize, size_t align, int (*constructor)(void *, void *, int), void (*destructor)(void *, void *), void (*reclaim)(void *) __unused, void *private, vmem_t *vmp, int cflags); @@ -78,6 +77,9 @@ void kmem_reap(void); int kmem_debugging(void); void *calloc(size_t n, size_t s); +#definefreemem (cnt.v_free_count + cnt.v_cache_count) +#defineminfree cnt.v_free_min +#defineheap_arena kmem_arena #definekmem_alloc(size, kmflags) zfs_kmem_alloc((size), (kmflags)) #definekmem_zalloc(size, kmflags) zfs_kmem_alloc((size), (kmflags) | M_ZERO) #definekmem_free(buf, size)zfs_kmem_free((buf), (size)) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Oct 9 23:52:33 2014(r272874) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Oct 10 00:12:16 2014(r272875) @@ -138,6 +138,7 @@ #include sys/sdt.h #include vm/vm_pageout.h +#include machine/vmparam.h #ifdef illumos #ifndef _KERNEL @@ -193,9 +194,6 @@ extern int zfs_prefetch_disable; */ static boolean_t arc_warm; -/* - * These tunables are for performance analysis. - */ uint64_t zfs_arc_max; uint64_t zfs_arc_min; uint64_t zfs_arc_meta_limit = 0; @@ -204,6 +202,19 @@ int zfs_arc_shrink_shift = 0; int zfs_arc_p_min_shift = 0; int zfs_disable_dup_eviction = 0; uint64_t zfs_arc_average_blocksize = 8 * 1024; /* 8KB */ +u_int zfs_arc_free_target = 0; + +static int sysctl_vfs_zfs_arc_free_target(SYSCTL_HANDLER_ARGS); + +#ifdef _KERNEL +static void +arc_free_target_init(void *unused __unused) +{ + + zfs_arc_free_target = vm_pageout_wakeup_thresh; +} +SYSINIT(arc_free_target_init, SI_SUB_KTHREAD_PAGE, SI_ORDER_ANY, +arc_free_target_init, NULL); TUNABLE_QUAD(vfs.zfs.arc_max, zfs_arc_max); TUNABLE_QUAD(vfs.zfs.arc_min, zfs_arc_min); @@ -217,6 +228,36 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_min SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_average_blocksize, CTLFLAG_RDTUN, zfs_arc_average_blocksize, 0, ARC average blocksize); +/* + * We don't have a tunable for arc_free_target due to the dependency on + * pagedaemon initialisation. + */ +SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_free_target, +CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(u_int), +sysctl_vfs_zfs_arc_free_target, IU, +Desired number of free pages below which ARC triggers reclaim); + +static int +sysctl_vfs_zfs_arc_free_target(SYSCTL_HANDLER_ARGS) +{ + u_int val; + int err; + + val = zfs_arc_free_target; + err = sysctl_handle_int(oidp, val, 0, req); + if (err != 0 || req-newptr == NULL) + return (err); + + if (val minfree) + return (EINVAL); + if (val cnt.v_page_count) + return (EINVAL); + + zfs_arc_free_target = val; + + return (0); +} +#endif /* * Note that buffers
svn commit: r272876 - releng/10.1/sys/conf
Author: gjb Date: Fri Oct 10 00:24:45 2014 New Revision: 272876 URL: https://svnweb.freebsd.org/changeset/base/272876 Log: Update releng/10.1 to -RC2 as part of the 10.1-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: releng/10.1/sys/conf/newvers.sh Modified: releng/10.1/sys/conf/newvers.sh == --- releng/10.1/sys/conf/newvers.sh Fri Oct 10 00:12:16 2014 (r272875) +++ releng/10.1/sys/conf/newvers.sh Fri Oct 10 00:24:45 2014 (r272876) @@ -32,7 +32,7 @@ TYPE=FreeBSD REVISION=10.1 -BRANCH=RC1 +BRANCH=RC2 if [ X${BRANCH_OVERRIDE} != X ]; then BRANCH=${BRANCH_OVERRIDE} fi ___ 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: r272877 - in stable/10: share/man/man9 sys/cddl/compat/opensolaris/kern sys/cddl/compat/opensolaris/sys sys/conf sys/modules/zfs
Author: smh Date: Fri Oct 10 00:26:00 2014 New Revision: 272877 URL: https://svnweb.freebsd.org/changeset/base/272877 Log: MFC r271802: Add dtrace probe support for zfs SET_ERROR(..) MFC r271873: Fix static kernel build with options ZFS MFC r271819: Remove sys/types.h include as per style (9) Sponsored by: Multiplay Added: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_dtrace.c - copied, changed from r271802, head/sys/cddl/compat/opensolaris/kern/opensolaris_dtrace.c Modified: stable/10/share/man/man9/SDT.9 stable/10/sys/cddl/compat/opensolaris/sys/sdt.h stable/10/sys/conf/files stable/10/sys/modules/zfs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/SDT.9 == --- stable/10/share/man/man9/SDT.9 Fri Oct 10 00:24:45 2014 (r272876) +++ stable/10/share/man/man9/SDT.9 Fri Oct 10 00:26:00 2014 (r272877) @@ -24,13 +24,15 @@ .\ .\ $FreeBSD$ .\ -.Dd August 17, 2013 +.Dd September 18, 2014 .Dt SDT 9 .Os .Sh NAME .Nm SDT .Nd a DTrace framework for adding statically-defined tracing probes .Sh SYNOPSIS +.In sys/param.h +.In sys/queue.h .In sys/sdt.h .Fn SDT_PROVIDER_DECLARE prov .Fn SDT_PROVIDER_DEFINE prov Copied and modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_dtrace.c (from r271802, head/sys/cddl/compat/opensolaris/kern/opensolaris_dtrace.c) == --- head/sys/cddl/compat/opensolaris/kern/opensolaris_dtrace.c Thu Sep 18 20:00:36 2014(r271802, copy source) +++ stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_dtrace.c Fri Oct 10 00:26:00 2014(r272877) @@ -30,7 +30,6 @@ __FBSDID($FreeBSD$); #include sys/param.h -#include sys/types.h #include sys/queue.h #include sys/sdt.h Modified: stable/10/sys/cddl/compat/opensolaris/sys/sdt.h == --- stable/10/sys/cddl/compat/opensolaris/sys/sdt.h Fri Oct 10 00:24:45 2014(r272876) +++ stable/10/sys/cddl/compat/opensolaris/sys/sdt.h Fri Oct 10 00:26:00 2014(r272877) @@ -34,6 +34,15 @@ #endif #include_next sys/sdt.h -#defineSET_ERROR(err) (err) +#ifdef KDTRACE_HOOKS +SDT_PROBE_DECLARE(sdt, , , set__error); + +#define SET_ERROR(err) \ + ((sdt_sdt___set__error-id ? \ + (*sdt_probe_func)(sdt_sdt___set__error-id, \ + (uintptr_t)err, 0, 0, 0, 0) : 0), err) +#else +#define SET_ERROR(err) (err) +#endif #endif /* _OPENSOLARIS_SYS_SDT_H_ */ Modified: stable/10/sys/conf/files == --- stable/10/sys/conf/filesFri Oct 10 00:24:45 2014(r272876) +++ stable/10/sys/conf/filesFri Oct 10 00:26:00 2014(r272877) @@ -111,6 +111,7 @@ cddl/compat/opensolaris/kern/opensolaris cddl/compat/opensolaris/kern/opensolaris_sunddi.c optional zfs compile-with ${ZFS_C} # zfs specific cddl/compat/opensolaris/kern/opensolaris_acl.c optional zfs compile-with ${ZFS_C} +cddl/compat/opensolaris/kern/opensolaris_dtrace.c optional zfs compile-with ${ZFS_C} cddl/compat/opensolaris/kern/opensolaris_kobj.c optional zfs compile-with ${ZFS_C} cddl/compat/opensolaris/kern/opensolaris_kstat.c optional zfs compile-with ${ZFS_C} cddl/compat/opensolaris/kern/opensolaris_lookup.c optional zfs compile-with ${ZFS_C} Modified: stable/10/sys/modules/zfs/Makefile == --- stable/10/sys/modules/zfs/Makefile Fri Oct 10 00:24:45 2014 (r272876) +++ stable/10/sys/modules/zfs/Makefile Fri Oct 10 00:26:00 2014 (r272877) @@ -25,6 +25,7 @@ SRCS+=u8_textprep.c .PATH: ${.CURDIR}/../../cddl/compat/opensolaris/kern SRCS+= opensolaris_acl.c +SRCS+= opensolaris_dtrace.c SRCS+= opensolaris_kobj.c SRCS+= opensolaris_kstat.c SRCS+= opensolaris_lookup.c ___ 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: r272878 - head/contrib/bsnmp/snmp_target
Author: syrinx Date: Fri Oct 10 00:26:28 2014 New Revision: 272878 URL: https://svnweb.freebsd.org/changeset/base/272878 Log: Fix a bug in decoding string indexes in snmp_target(3), thus causing bsnmpd(1) to not send v3 notifications properly; while here add two missing return statements which could lead to abort() in case of a rollback Modified: head/contrib/bsnmp/snmp_target/target_snmp.c Modified: head/contrib/bsnmp/snmp_target/target_snmp.c == --- head/contrib/bsnmp/snmp_target/target_snmp.cFri Oct 10 00:26:00 2014(r272877) +++ head/contrib/bsnmp/snmp_target/target_snmp.cFri Oct 10 00:26:28 2014(r272878) @@ -301,6 +301,7 @@ op_snmp_target_addrs(struct snmp_context default: break; } + return (SNMP_ERR_NOERROR); default: abort(); @@ -625,6 +626,7 @@ op_snmp_notify(struct snmp_context *ctx default: break; } + return (SNMP_ERR_NOERROR); default: abort(); @@ -663,13 +665,14 @@ target_append_index(struct asn_oid *oid, static int target_decode_index(const struct asn_oid *oid, uint sub, char *name) { - uint32_t i, len; + uint32_t i; - if ((len = oid-len - sub) = SNMP_ADM_STR32_SIZ) + if (oid-len - sub != oid-subs[sub] + 1 || oid-subs[sub] = + SNMP_ADM_STR32_SIZ) return (-1); - for (i = 0; i len; i++) - name[i] = oid-subs[sub + i]; + for (i = 0; i oid-subs[sub]; i++) + name[i] = oid-subs[sub + i + 1]; name[i] = '\0'; return (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: r272879 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: smh Date: Fri Oct 10 00:28:19 2014 New Revision: 272879 URL: https://svnweb.freebsd.org/changeset/base/272879 Log: MFC r271754: Remove unused ZFS ARC functions Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Oct 10 00:26:28 2014(r272878) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Oct 10 00:28:19 2014(r272879) @@ -1507,23 +1507,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: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Fri Oct 10 00:26:28 2014(r272878) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Fri Oct 10 00:28:19 2014(r272879) @@ -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
Re: svn commit: r272862 - in stable/10/etc: defaults rc.d
On Oct 9, 2014, at 16:35, Hiroki Sato h...@freebsd.org wrote: Author: hrs Date: Thu Oct 9 23:35:23 2014 New Revision: 272862 URL: https://svnweb.freebsd.org/changeset/base/272862 Log: MFC r270782: Restructure rc.d scripts for kerberos5 daemons: - Rename $kerberos5_server_enable with $kdc_enable and rename rc.d/kerberos with rc.d/kdc. - Rename $kadmin5_server_enable with $kadmind_enable. - Rename ${kerberos5,kpasswdd}_server with ${kdc,kpasswdd}_program. - Fix rc.d/{kadmind,kerberos,kpasswdd,kfd} scripts not to change variables after load_rc_config(). - Add rc.d/ipropd_master and rc.d/ipropd_slave scripts. These are for iprop-master(8) and iprop-slave(8). Keytab used for iprop service is defined in ipropd_{master,slave}_keytab (/etc/krb5.keytab by default). - Add dependency on rc.d/kdc to SERVERS. rc.d/kdc must be invoked as early as possible before scripts divided by rc.d/SERVERS. Note that changes to rc.d/{kdc,kpasswdd,kadmind} are backward-compatible with the old configuration variables: ${kerberos5,kpasswdd,kadmin5}_server{,_enable,_flags}. Relnotes: yes? ___ 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: r272881 - in head/sys: conf sys
Author: imp Date: Fri Oct 10 00:35:13 2014 New Revision: 272881 URL: https://svnweb.freebsd.org/changeset/base/272881 Log: For gcc 4.6 and newer, _Static_assert is a keyword, so don't try to redefine it. It does what we want, and is always available unlike other alternatives. Modified: head/sys/conf/kern.mk head/sys/sys/cdefs.h Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Fri Oct 10 00:35:08 2014(r272880) +++ head/sys/conf/kern.mk Fri Oct 10 00:35:13 2014(r272881) @@ -38,7 +38,7 @@ CWARNEXTRA?= -Wno-error-tautological-com # building with gcc 4.8 and newer. Nothing older has been tested. CWARNEXTRA?= -Wno-error=inline -Wno-error=enum-compare -Wno-error=unused-but-set-variable \ -Wno-error=aggressive-loop-optimizations -Wno-error=maybe-uninitialized \ - -Wno-error=unused-local-typedefs -Wno-error=array-bounds -Wno-error=address \ + -Wno-error=array-bounds -Wno-error=address \ -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes .endif Modified: head/sys/sys/cdefs.h == --- head/sys/sys/cdefs.hFri Oct 10 00:35:08 2014(r272880) +++ head/sys/sys/cdefs.hFri Oct 10 00:35:13 2014(r272881) @@ -288,6 +288,8 @@ #if (defined(__cplusplus) __cplusplus = 201103L) || \ __has_extension(cxx_static_assert) #define_Static_assert(x, y)static_assert(x, y) +#elif __GNUC_PREREQ__(4,6) +/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ #elif defined(__COUNTER__) #define_Static_assert(x, y)__Static_assert(x, __COUNTER__) #define__Static_assert(x, y) ___Static_assert(x, y) ___ 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: r272880 - head/sys/ufs/ufs
Author: imp Date: Fri Oct 10 00:35:08 2014 New Revision: 272880 URL: https://svnweb.freebsd.org/changeset/base/272880 Log: Restore the backed-out change, using __offsetof instead. Modified: head/sys/ufs/ufs/dir.h Modified: head/sys/ufs/ufs/dir.h == --- head/sys/ufs/ufs/dir.h Fri Oct 10 00:28:19 2014(r272879) +++ head/sys/ufs/ufs/dir.h Fri Oct 10 00:35:08 2014(r272880) @@ -110,7 +110,7 @@ struct direct { * */ #defineDIRECTSIZ(namlen) \ - (((uintptr_t)((struct direct *)0)-d_name +\ + ((__offsetof(struct direct, d_name) + \ ((namlen)+1)*sizeof(((struct direct *)0)-d_name[0]) + 3) ~3) #if (BYTE_ORDER == LITTLE_ENDIAN) #defineDIRSIZ(oldfmt, dp) \ ___ 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: r272882 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: smh Date: Fri Oct 10 00:51:23 2014 New Revision: 272882 URL: https://svnweb.freebsd.org/changeset/base/272882 Log: MFC r271589: Added missing ZFS sysctls This also includes small additional direct changes as it still uses the old way of handling tunables. Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Fri Oct 10 00:35:13 2014(r272881) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Fri Oct 10 00:51:23 2014(r272882) @@ -148,8 +148,10 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, dirty_d The absolute cap on dirty_data_max when auto calculating); TUNABLE_INT(vfs.zfs.dirty_data_max_percent, zfs_dirty_data_max_percent); -SYSCTL_INT(_vfs_zfs, OID_AUTO, dirty_data_max_percent, CTLFLAG_RDTUN, -zfs_dirty_data_max_percent, 0, +static int sysctl_zfs_dirty_data_max_percent(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_vfs_zfs, OID_AUTO, dirty_data_max_percent, +CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int), +sysctl_zfs_dirty_data_max_percent, I, The percent of physical memory used to auto calculate dirty_data_max); TUNABLE_QUAD(vfs.zfs.dirty_data_sync, zfs_dirty_data_sync); @@ -172,6 +174,24 @@ SYSCTL_PROC(_vfs_zfs, OID_AUTO, delay_sc Controls how quickly the delay approaches infinity); static int +sysctl_zfs_dirty_data_max_percent(SYSCTL_HANDLER_ARGS) +{ + int val, err; + + val = zfs_dirty_data_max_percent; + err = sysctl_handle_int(oidp, val, 0, req); + if (err != 0 || req-newptr == NULL) + return (err); + + if (val 0 || val 100) + return (EINVAL); + + zfs_dirty_data_max_percent = val; + + return (0); +} + +static int sysctl_zfs_delay_min_dirty_percent(SYSCTL_HANDLER_ARGS) { int val, err; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Fri Oct 10 00:35:13 2014(r272881) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Fri Oct 10 00:51:23 2014(r272882) @@ -176,24 +176,43 @@ int zfs_vdev_write_gap_limit = 4 10; #ifdef __FreeBSD__ SYSCTL_DECL(_vfs_zfs_vdev); + +TUNABLE_INT(vfs.zfs.vdev.async_write_active_min_dirty_percent, +zfs_vdev_async_write_active_min_dirty_percent); +static int sysctl_zfs_async_write_active_min_dirty_percent(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_vfs_zfs_vdev, OID_AUTO, async_write_active_min_dirty_percent, +CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int), +sysctl_zfs_async_write_active_min_dirty_percent, I, +Percentage of async write dirty data below which +async_write_min_active is used.); + +TUNABLE_INT(vfs.zfs.vdev.async_write_active_max_dirty_percent, +zfs_vdev_async_write_active_max_dirty_percent); +static int sysctl_zfs_async_write_active_max_dirty_percent(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_vfs_zfs_vdev, OID_AUTO, async_write_active_max_dirty_percent, +CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int), +sysctl_zfs_async_write_active_max_dirty_percent, I, +Percentage of async write dirty data above which +async_write_max_active is used.); + TUNABLE_INT(vfs.zfs.vdev.max_active, zfs_vdev_max_active); -SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, max_active, CTLFLAG_RW, +SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, max_active, CTLFLAG_RWTUN, zfs_vdev_max_active, 0, The maximum number of I/Os of all types active for each device.); #define ZFS_VDEV_QUEUE_KNOB_MIN(name) \ TUNABLE_INT(vfs.zfs.vdev. #name _min_active, \ zfs_vdev_ ## name ## _min_active); \ -SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, name ## _min_active, CTLFLAG_RW, \ -zfs_vdev_ ## name ## _min_active, 0, \ +SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, name ## _min_active, \ +CTLFLAG_RWTUN, zfs_vdev_ ## name ## _min_active, 0, \ Initial number of I/O requests of type #name\ active for each device); #define ZFS_VDEV_QUEUE_KNOB_MAX(name) \ TUNABLE_INT(vfs.zfs.vdev. #name _max_active, \ zfs_vdev_ ## name ## _max_active); \ -SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, name ## _max_active, CTLFLAG_RW, \ -zfs_vdev_ ## name ## _max_active, 0, \
svn commit: r272883 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: smh Date: Fri Oct 10 01:01:04 2014 New Revision: 272883 URL: https://svnweb.freebsd.org/changeset/base/272883 Log: MFC r272474: Fix various issues with zvols Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Oct 10 00:51:23 2014(r272882) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Oct 10 01:01:04 2014(r272883) @@ -2257,6 +2257,9 @@ dsl_dataset_promote_sync(void *arg, dmu_ dsl_dir_t *odd = NULL; uint64_t oldnext_obj; int64_t delta; +#if defined(__FreeBSD__) defined(_KERNEL) + char *oldname, *newname; +#endif VERIFY0(promote_hold(ddpa, dp, FTAG)); hds = ddpa-ddpa_clone; @@ -2322,6 +2325,14 @@ dsl_dataset_promote_sync(void *arg, dmu_ dd-dd_phys-dd_clones, origin_head-ds_object, tx)); } +#if defined(__FreeBSD__) defined(_KERNEL) + /* Take the spa_namespace_lock early so zvol renames don't deadlock. */ + mutex_enter(spa_namespace_lock); + + oldname = kmem_alloc(MAXPATHLEN, KM_SLEEP); + newname = kmem_alloc(MAXPATHLEN, KM_SLEEP); +#endif + /* move snapshots to this dir */ for (snap = list_head(ddpa-shared_snaps); snap; snap = list_next(ddpa-shared_snaps, snap)) { @@ -2356,6 +2367,12 @@ dsl_dataset_promote_sync(void *arg, dmu_ VERIFY0(dsl_dir_hold_obj(dp, dd-dd_object, NULL, ds, ds-ds_dir)); +#if defined(__FreeBSD__) defined(_KERNEL) + dsl_dataset_name(ds, newname); + zfsvfs_update_fromname(oldname, newname); + zvol_rename_minors(oldname, newname); +#endif + /* move any clone references */ if (ds-ds_phys-ds_next_clones_obj spa_version(dp-dp_spa) = SPA_VERSION_DIR_CLONES) { @@ -2393,6 +2410,12 @@ dsl_dataset_promote_sync(void *arg, dmu_ ASSERT(!dsl_prop_hascb(ds)); } +#if defined(__FreeBSD__) defined(_KERNEL) + mutex_exit(spa_namespace_lock); + + kmem_free(newname, MAXPATHLEN); + kmem_free(oldname, MAXPATHLEN); +#endif /* * Change space accounting. * Note, pa-*usedsnap and dd_used_breakdown[SNAP] will either Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Oct 10 00:51:23 2014(r272882) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Oct 10 01:01:04 2014(r272883) @@ -3541,6 +3541,7 @@ zfs_destroy_unmount_origin(const char *f static int zfs_ioc_destroy_snaps(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) { + int error, poollen; nvlist_t *snaps; nvpair_t *pair; boolean_t defer; @@ -3549,9 +3550,25 @@ zfs_ioc_destroy_snaps(const char *poolna return (SET_ERROR(EINVAL)); defer = nvlist_exists(innvl, defer); + poollen = strlen(poolname); for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; pair = nvlist_next_nvpair(snaps, pair)) { - (void) zfs_unmount_snap(nvpair_name(pair)); + const char *name = nvpair_name(pair); + + /* +* The snap must be in the specified pool to prevent the +* invalid removal of zvol minors below. +*/ + if (strncmp(name, poolname, poollen) != 0 || + (name[poollen] != '/' name[poollen] != '@')) + return (SET_ERROR(EXDEV)); + + error = zfs_unmount_snap(name); + if (error != 0) + return (error); +#if defined(__FreeBSD__) + zvol_remove_minors(name); +#endif } return (dsl_destroy_snapshots_nvl(snaps, defer, outnvl)); @@ -3676,7 +3693,11 @@ zfs_ioc_destroy(zfs_cmd_t *zc) else err = dsl_destroy_head(zc-zc_name); if (zc-zc_objset_type == DMU_OST_ZVOL err == 0) +#ifdef __FreeBSD__ + zvol_remove_minors(zc-zc_name); +#else (void) zvol_remove_minor(zc-zc_name); +#endif return (err); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c == ---
svn commit: r272884 - head/lib/libc/sys
Author: delphij Date: Fri Oct 10 03:05:55 2014 New Revision: 272884 URL: https://svnweb.freebsd.org/changeset/base/272884 Log: accept(2) may and can return EAGAIN, document it. MFC after:1 week Modified: head/lib/libc/sys/accept.2 Modified: head/lib/libc/sys/accept.2 == --- head/lib/libc/sys/accept.2 Fri Oct 10 01:01:04 2014(r272883) +++ head/lib/libc/sys/accept.2 Fri Oct 10 03:05:55 2014(r272884) @@ -28,7 +28,7 @@ .\ @(#)accept.2 8.2 (Berkeley) 12/11/93 .\ $FreeBSD$ .\ -.Dd October 1, 2013 +.Dd October 9, 2014 .Dt ACCEPT 2 .Os .Sh NAME @@ -201,7 +201,7 @@ The .Fa addr argument is not in a writable part of the user address space. -.It Bq Er EWOULDBLOCK +.It Bo Er EWOULDBLOCK Bc or Bq Er EAGAIN The socket is marked non-blocking and no connections are present to be accepted. .It Bq Er ECONNABORTED ___ 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: r272885 - head/sbin/swapon
Author: hrs Date: Fri Oct 10 03:20:12 2014 New Revision: 272885 URL: https://svnweb.freebsd.org/changeset/base/272885 Log: Do not add late flag when file= is specified because it has a bad side-effect. The specified file should exist before the fstab line. Reported by: wblock (long time ago) MFC after:1 day Modified: head/sbin/swapon/swapon.c Modified: head/sbin/swapon/swapon.c == --- head/sbin/swapon/swapon.c Fri Oct 10 03:05:55 2014(r272884) +++ head/sbin/swapon/swapon.c Fri Oct 10 03:20:12 2014(r272885) @@ -172,15 +172,8 @@ main(int argc, char **argv) continue; if (strstr(fsp-fs_mntops, noauto) != NULL) continue; - /* -* Forcibly enable late option when file= is -* specified. This is because mounting file -* systems with rw option is typically -* required to make the backing store ready. -*/ if (which_prog != SWAPOFF - (strstr(fsp-fs_mntops, late) != NULL || -strstr(fsp-fs_mntops, file=) != NULL) + strstr(fsp-fs_mntops, late) late == 0) continue; swfile = swap_on_off(fsp-fs_spec, 1, ___ 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: r272827 - head
On Thursday, October 09, 2014 03:52:01 PM Baptiste Daroussin wrote: Author: bapt Date: Thu Oct 9 15:52:01 2014 New Revision: 272827 URL: https://svnweb.freebsd.org/changeset/base/272827 Log: Add size(1) to the cross build toolchain Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 9 15:35:28 2014(r272826) +++ head/Makefile.inc1Thu Oct 9 15:52:01 2014(r272827) @@ -315,7 +315,7 @@ X${COMPILER}?=${CROSS_COMPILER_PREFIX}$ X${COMPILER}?= ${${COMPILER}} .endif .endfor -XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB STRINGS +XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB SIZE STRINGS .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) X${BINUTIL}?=${CROSS_BINUTILS_PREFIX}${${BINUTIL}} @@ -327,7 +327,8 @@ WMAKEENV+=CC=${XCC} ${XFLAGS} CXX=${ CPP=${XCPP} ${XFLAGS} \ AS=${XAS} AR=${XAR} LD=${XLD} NM=${XNM} \ OBJDUMP=${XOBJDUMP} OBJCOPY=${XOBJCOPY} \ - RANLIB=${XRANLIB} STRINGS=${XSTRINGS} + RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ + SIZE=${XSIZE} .if ${XCC:M/*} XFLAGS= --sysroot=${WORLDTMP} This broke 'make buildkernel'. kern.pre.mk: SIZE?= size kern.post.mk: SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \ ${SIZE} ${.TARGET} ; chmod 755 ${.TARGET} This is getting executed as: objcopy --strip-symbol gcc2_compiled. .kernel ; kernel ; chmod 755 kernel ie: kernel instead of size kernel. XSIZE isn't set for the non-cross case. -- Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 signature.asc Description: This is a digitally signed message part.