svn commit: r262154 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 13:48:50 2014 New Revision: 262154 URL: http://svnweb.freebsd.org/changeset/base/262154 Log: MFC r240829: remove cache entries associated with the source and the target of rename() MFC slacker: pjd Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Feb 18 05:58:36 2014(r262153) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Feb 18 13:48:50 2014(r262154) @@ -4025,6 +4025,9 @@ top: if (error == 0) { cache_purge(sdvp); cache_purge(tdvp); + cache_purge(ZTOV(szp)); + if (tzp) + cache_purge(ZTOV(tzp)); } #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: r262155 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 13:49:03 2014 New Revision: 262155 URL: http://svnweb.freebsd.org/changeset/base/262155 Log: MFC r240829: remove cache entries associated with the source and the target of rename() Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Feb 18 13:48:50 2014(r262154) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Feb 18 13:49:03 2014(r262155) @@ -4049,6 +4049,9 @@ top: if (error == 0) { cache_purge(sdvp); cache_purge(tdvp); + cache_purge(ZTOV(szp)); + if (tzp) + cache_purge(ZTOV(tzp)); } #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: r262157 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 13:59:06 2014 New Revision: 262157 URL: http://svnweb.freebsd.org/changeset/base/262157 Log: MFC r250149: In case ZFS doesn't use UMA for buffers there's no need to waste memory Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Feb 18 13:58:55 2014(r262156) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Feb 18 13:59:06 2014(r262157) @@ -130,6 +130,8 @@ zio_init(void) sizeof (zio_t), 0, NULL, NULL, NULL, NULL, NULL, 0); zio_link_cache = kmem_cache_create("zio_link_cache", sizeof (zio_link_t), 0, NULL, NULL, NULL, NULL, NULL, 0); + if (!zio_use_uma) + goto out; /* * For small buffers, we want a cache for each multiple of @@ -193,6 +195,7 @@ zio_init(void) if (zio_data_buf_cache[c - 1] == NULL) zio_data_buf_cache[c - 1] = zio_data_buf_cache[c]; } +out: /* * The zio write taskqs have 1 thread per cpu, allow 1/2 of the taskqs ___ 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: r262156 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 13:58:55 2014 New Revision: 262156 URL: http://svnweb.freebsd.org/changeset/base/262156 Log: MFC r250149: In case ZFS doesn't use UMA for buffers there's no need to waste memory Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Feb 18 13:49:03 2014(r262155) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Feb 18 13:58:55 2014(r262156) @@ -130,6 +130,8 @@ zio_init(void) sizeof (zio_t), 0, NULL, NULL, NULL, NULL, NULL, 0); zio_link_cache = kmem_cache_create("zio_link_cache", sizeof (zio_link_t), 0, NULL, NULL, NULL, NULL, NULL, 0); + if (!zio_use_uma) + goto out; /* * For small buffers, we want a cache for each multiple of @@ -193,6 +195,7 @@ zio_init(void) if (zio_data_buf_cache[c - 1] == NULL) zio_data_buf_cache[c - 1] = zio_data_buf_cache[c]; } +out: /* * The zio write taskqs have 1 thread per cpu, allow 1/2 of the taskqs ___ 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: r262158 - in stable/9: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs...
Author: avg Date: Tue Feb 18 14:06:41 2014 New Revision: 262158 URL: http://svnweb.freebsd.org/changeset/base/262158 Log: MFC r253819: MFV r253781 + r253871: 3894 zfs should not allow snapshot of inconsistent dataset MFC slacker: delphij Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c == --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cTue Feb 18 13:59:06 2014(r262157) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cTue Feb 18 14:06:41 2014(r262158) @@ -3519,6 +3519,12 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void int rv = 0; int error; + if (sd->sd_recursive && + zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) != 0) { + zfs_close(zhp); + return (0); + } + error = asprintf(&name, "%s@%s", zfs_get_name(zhp), sd->sd_snapname); if (error == -1) nomem(); Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c == --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Feb 18 13:59:06 2014(r262157) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Feb 18 14:06:41 2014(r262158) @@ -1885,6 +1885,10 @@ get_numeric_property(zfs_handle_t *zhp, zcmd_free_nvlists(&zc); break; + case ZFS_PROP_INCONSISTENT: + *val = zhp->zfs_dmustats.dds_inconsistent; + break; + default: switch (zfs_prop_get_type(prop)) { case PROP_TYPE_NUMBER: @@ -3379,13 +3383,16 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void char name[ZFS_MAXNAMELEN]; int rv = 0; - (void) snprintf(name, sizeof (name), - "%s@%s", zfs_get_name(zhp), sd->sd_snapname); + if (zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) == 0) { + (void) snprintf(name, sizeof (name), + "%s@%s", zfs_get_name(zhp), sd->sd_snapname); - fnvlist_add_boolean(sd->sd_nvl, name); + fnvlist_add_boolean(sd->sd_nvl, name); - rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + } zfs_close(zhp); + return (rv); } Modified: stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c == --- stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Tue Feb 18 13:59:06 2014(r262157) +++ stable/9/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Tue Feb 18 14:06:41 2014(r262158) @@ -397,6 +397,8 @@ zfs_prop_init(void) PROP_READONLY, ZFS_TYPE_DATASET, "UNIQUE"); zprop_register_hidden(ZFS_PROP_OBJSETID, "objsetid", PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "OBJSETID"); + zprop_register_hidden(ZFS_PROP_INCONSISTENT, "inconsistent", + PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "INCONSISTENT"); /* oddball properties */ zprop_register_impl(ZFS_PROP_CREATION, "creation", PROP_TYPE_NUMBER, 0, Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Feb 18 13:59:06 2014(r262157) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Feb 18 14:06:41 2014(r262158) @@ -1648,7 +1648,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * return (error); } error = dsl_dataset_snapshot_check_impl(origin_head, - drc->drc_tosnap, tx); + drc->drc_tosnap, tx, B_TRUE); dsl_dataset_rele(origin_head, FTAG); if (error != 0) return (error); @@ -1656,7 +1656,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl
svn commit: r262159 - in stable/8: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs...
Author: avg Date: Tue Feb 18 14:06:59 2014 New Revision: 262159 URL: http://svnweb.freebsd.org/changeset/base/262159 Log: MFC r253819: MFV r253781 + r253871: 3894 zfs should not allow snapshot of inconsistent dataset Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/8/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c == --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cTue Feb 18 14:06:41 2014(r262158) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cTue Feb 18 14:06:59 2014(r262159) @@ -3519,6 +3519,12 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void int rv = 0; int error; + if (sd->sd_recursive && + zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) != 0) { + zfs_close(zhp); + return (0); + } + error = asprintf(&name, "%s@%s", zfs_get_name(zhp), sd->sd_snapname); if (error == -1) nomem(); Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c == --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Feb 18 14:06:41 2014(r262158) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Feb 18 14:06:59 2014(r262159) @@ -1885,6 +1885,10 @@ get_numeric_property(zfs_handle_t *zhp, zcmd_free_nvlists(&zc); break; + case ZFS_PROP_INCONSISTENT: + *val = zhp->zfs_dmustats.dds_inconsistent; + break; + default: switch (zfs_prop_get_type(prop)) { case PROP_TYPE_NUMBER: @@ -3379,13 +3383,16 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void char name[ZFS_MAXNAMELEN]; int rv = 0; - (void) snprintf(name, sizeof (name), - "%s@%s", zfs_get_name(zhp), sd->sd_snapname); + if (zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) == 0) { + (void) snprintf(name, sizeof (name), + "%s@%s", zfs_get_name(zhp), sd->sd_snapname); - fnvlist_add_boolean(sd->sd_nvl, name); + fnvlist_add_boolean(sd->sd_nvl, name); - rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + } zfs_close(zhp); + return (rv); } Modified: stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c == --- stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Tue Feb 18 14:06:41 2014(r262158) +++ stable/8/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Tue Feb 18 14:06:59 2014(r262159) @@ -397,6 +397,8 @@ zfs_prop_init(void) PROP_READONLY, ZFS_TYPE_DATASET, "UNIQUE"); zprop_register_hidden(ZFS_PROP_OBJSETID, "objsetid", PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "OBJSETID"); + zprop_register_hidden(ZFS_PROP_INCONSISTENT, "inconsistent", + PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "INCONSISTENT"); /* oddball properties */ zprop_register_impl(ZFS_PROP_CREATION, "creation", PROP_TYPE_NUMBER, 0, Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Feb 18 14:06:41 2014(r262158) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Feb 18 14:06:59 2014(r262159) @@ -1648,7 +1648,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * return (error); } error = dsl_dataset_snapshot_check_impl(origin_head, - drc->drc_tosnap, tx); + drc->drc_tosnap, tx, B_TRUE); dsl_dataset_rele(origin_head, FTAG); if (error != 0) return (error); @@ -1656,7 +1656,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t *
svn commit: r262160 - in stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: avg Date: Tue Feb 18 14:11:04 2014 New Revision: 262160 URL: http://svnweb.freebsd.org/changeset/base/262160 Log: MFC r253820: MFV r253782: 3888 zfs recv -F should destroy any snapshots created since the incremental source MFC slacker: delphij Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_destroy.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Feb 18 14:06:59 2014(r262159) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Feb 18 14:11:04 2014(r262160) @@ -723,6 +723,7 @@ typedef struct dmu_recv_begin_arg { const char *drba_origin; dmu_recv_cookie_t *drba_cookie; cred_t *drba_cred; + uint64_t drba_snapobj; } dmu_recv_begin_arg_t; static int @@ -733,11 +734,6 @@ recv_begin_check_existing_impl(dmu_recv_ int error; dsl_pool_t *dp = ds->ds_dir->dd_pool; - /* must not have any changes since most recent snapshot */ - if (!drba->drba_cookie->drc_force && - dsl_dataset_modified_since_lastsnap(ds)) - return (SET_ERROR(ETXTBSY)); - /* temporary clone name must not exist */ error = zap_lookup(dp->dp_meta_objset, ds->ds_dir->dd_phys->dd_child_dir_zapobj, recv_clone_name, @@ -753,41 +749,47 @@ recv_begin_check_existing_impl(dmu_recv_ return (error == 0 ? EEXIST : error); if (fromguid != 0) { - /* if incremental, most recent snapshot must match fromguid */ - if (ds->ds_prev == NULL) + dsl_dataset_t *snap; + uint64_t obj = ds->ds_phys->ds_prev_snap_obj; + + /* Find snapshot in this dir that matches fromguid. */ + while (obj != 0) { + error = dsl_dataset_hold_obj(dp, obj, FTAG, + &snap); + if (error != 0) + return (SET_ERROR(ENODEV)); + if (snap->ds_dir != ds->ds_dir) { + dsl_dataset_rele(snap, FTAG); + return (SET_ERROR(ENODEV)); + } + if (snap->ds_phys->ds_guid == fromguid) + break; + obj = snap->ds_phys->ds_prev_snap_obj; + dsl_dataset_rele(snap, FTAG); + } + if (obj == 0) return (SET_ERROR(ENODEV)); - /* -* most recent snapshot must match fromguid, or there are no -* changes since the fromguid one -*/ - if (ds->ds_prev->ds_phys->ds_guid != fromguid) { - uint64_t birth = ds->ds_prev->ds_phys->ds_bp.blk_birth; - uint64_t obj = ds->ds_prev->ds_phys->ds_prev_snap_obj; - while (obj != 0) { - dsl_dataset_t *snap; - error = dsl_dataset_hold_obj(dp, obj, FTAG, - &snap); - if (error != 0) - return (SET_ERROR(ENODEV)); - if (snap->ds_phys->ds_creation_txg < birth) { - dsl_dataset_rele(snap, FTAG); - return (SET_ERROR(ENODEV)); - } - if (snap->ds_phys->ds_guid == fromguid) { - dsl_dataset_rele(snap, FTAG); - break; /* it's ok */ - } - obj = snap->ds_phys->ds_prev_snap_obj; + if (drba->drba_cookie->drc_force) { + drba->drba_snapobj = obj; + } else { + /* +* If we are not forcing, there must be no +* changes since fromsnap. +*/ + if (dsl_dataset_modified_since_snap(ds, snap)) { dsl_dataset_rele(snap, FTAG); + return (SET_ERROR(ETXTBSY)); } - if (obj == 0) - return (SET_ERROR(ENODEV)); +
svn commit: r262161 - in stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: avg Date: Tue Feb 18 14:11:19 2014 New Revision: 262161 URL: http://svnweb.freebsd.org/changeset/base/262161 Log: MFC r253820: MFV r253782: 3888 zfs recv -F should destroy any snapshots created since the incremental source Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_destroy.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Feb 18 14:11:04 2014(r262160) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Feb 18 14:11:19 2014(r262161) @@ -723,6 +723,7 @@ typedef struct dmu_recv_begin_arg { const char *drba_origin; dmu_recv_cookie_t *drba_cookie; cred_t *drba_cred; + uint64_t drba_snapobj; } dmu_recv_begin_arg_t; static int @@ -733,11 +734,6 @@ recv_begin_check_existing_impl(dmu_recv_ int error; dsl_pool_t *dp = ds->ds_dir->dd_pool; - /* must not have any changes since most recent snapshot */ - if (!drba->drba_cookie->drc_force && - dsl_dataset_modified_since_lastsnap(ds)) - return (SET_ERROR(ETXTBSY)); - /* temporary clone name must not exist */ error = zap_lookup(dp->dp_meta_objset, ds->ds_dir->dd_phys->dd_child_dir_zapobj, recv_clone_name, @@ -753,41 +749,47 @@ recv_begin_check_existing_impl(dmu_recv_ return (error == 0 ? EEXIST : error); if (fromguid != 0) { - /* if incremental, most recent snapshot must match fromguid */ - if (ds->ds_prev == NULL) + dsl_dataset_t *snap; + uint64_t obj = ds->ds_phys->ds_prev_snap_obj; + + /* Find snapshot in this dir that matches fromguid. */ + while (obj != 0) { + error = dsl_dataset_hold_obj(dp, obj, FTAG, + &snap); + if (error != 0) + return (SET_ERROR(ENODEV)); + if (snap->ds_dir != ds->ds_dir) { + dsl_dataset_rele(snap, FTAG); + return (SET_ERROR(ENODEV)); + } + if (snap->ds_phys->ds_guid == fromguid) + break; + obj = snap->ds_phys->ds_prev_snap_obj; + dsl_dataset_rele(snap, FTAG); + } + if (obj == 0) return (SET_ERROR(ENODEV)); - /* -* most recent snapshot must match fromguid, or there are no -* changes since the fromguid one -*/ - if (ds->ds_prev->ds_phys->ds_guid != fromguid) { - uint64_t birth = ds->ds_prev->ds_phys->ds_bp.blk_birth; - uint64_t obj = ds->ds_prev->ds_phys->ds_prev_snap_obj; - while (obj != 0) { - dsl_dataset_t *snap; - error = dsl_dataset_hold_obj(dp, obj, FTAG, - &snap); - if (error != 0) - return (SET_ERROR(ENODEV)); - if (snap->ds_phys->ds_creation_txg < birth) { - dsl_dataset_rele(snap, FTAG); - return (SET_ERROR(ENODEV)); - } - if (snap->ds_phys->ds_guid == fromguid) { - dsl_dataset_rele(snap, FTAG); - break; /* it's ok */ - } - obj = snap->ds_phys->ds_prev_snap_obj; + if (drba->drba_cookie->drc_force) { + drba->drba_snapobj = obj; + } else { + /* +* If we are not forcing, there must be no +* changes since fromsnap. +*/ + if (dsl_dataset_modified_since_snap(ds, snap)) { dsl_dataset_rele(snap, FTAG); + return (SET_ERROR(ETXTBSY)); } - if (obj == 0) - return (SET_ERROR(ENODEV)); +
svn commit: r262162 - head/sys/net
Author: glebius Date: Tue Feb 18 14:21:26 2014 New Revision: 262162 URL: http://svnweb.freebsd.org/changeset/base/262162 Log: Fix incorrect assertions. Modified: head/sys/net/flowtable.c Modified: head/sys/net/flowtable.c == --- head/sys/net/flowtable.cTue Feb 18 14:11:19 2014(r262161) +++ head/sys/net/flowtable.cTue Feb 18 14:21:26 2014(r262162) @@ -634,7 +634,8 @@ flowtable_insert(struct flowtable *ft, u * preempted by another thread handling this flow */ SLIST_FOREACH(iter, flist, f_next) { - KASSERT(iter->f_hash == hash, ("%s: wrong hash", __func__)); + KASSERT(iter->f_hash % ft->ft_size == hash % ft->ft_size, + ("%s: wrong hash", __func__)); if (flow_matches(iter, key, keylen, fibnum)) { /* * We probably migrated to an other CPU after @@ -714,7 +715,8 @@ flowtable_lookup_common(struct flowtable critical_enter(); flist = flowtable_list(ft, hash); SLIST_FOREACH(fle, flist, f_next) { - KASSERT(fle->f_hash == hash, ("%s: wrong hash", __func__)); + KASSERT(fle->f_hash % ft->ft_size == hash % ft->ft_size, + ("%s: wrong hash", __func__)); if (flow_matches(fle, key, keylen, fibnum)) { fle->f_uptime = time_uptime; #ifdef FLOWTABLE_HASH_ALL ___ 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: r262163 - in stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: mav Date: Tue Feb 18 14:46:39 2014 New Revision: 262163 URL: http://svnweb.freebsd.org/changeset/base/262163 Log: MFC r253992: Disable r252840 when ZFS TRIM is enabled (vfs.zfs.trim.enabled=1) and really disable TRIM otherwise. r252840 (illumos bug 3836) is based on assumption that zio_free_sync() has no lock dependencies and should complete immediately. Unfortunately, with our TRIM implementation that is not true due to ZIO_STAGE_VDEV_IO_START added to the ZIO_FREE_PIPELINE, which, while not really accessing devices, still acquires SCL_ZIO lock for read to be sure devices won't disappear. When TRIM is disabled, this patch enables direct free execution from r252840 and removes ZIO_STAGE_VDEV_IO_START and ZIO_STAGE_VDEV_IO_ASSESS stages from the pipeline to avoid lock acquisition. Otherwise it queues free request as it was before r252840. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h Tue Feb 18 14:21:26 2014(r262162) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h Tue Feb 18 14:46:39 2014(r262163) @@ -213,9 +213,7 @@ enum zio_stage { #defineZIO_FREE_PIPELINE \ (ZIO_INTERLOCK_STAGES | \ ZIO_STAGE_FREE_BP_INIT |\ - ZIO_STAGE_DVA_FREE |\ - ZIO_STAGE_VDEV_IO_START | \ - ZIO_STAGE_VDEV_IO_ASSESS) + ZIO_STAGE_DVA_FREE) #defineZIO_DDT_FREE_PIPELINE \ (ZIO_INTERLOCK_STAGES | \ Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Feb 18 14:21:26 2014(r262162) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Tue Feb 18 14:46:39 2014(r262163) @@ -750,7 +750,7 @@ zio_free(spa_t *spa, uint64_t txg, const * DEDUP), can be processed immediately. Otherwise, put them on the * in-memory list for later processing. */ - if (BP_IS_GANG(bp) || BP_GET_DEDUP(bp) || + if (zfs_trim_enabled || BP_IS_GANG(bp) || BP_GET_DEDUP(bp) || txg != spa->spa_syncing_txg || spa_sync_pass(spa) >= zfs_sync_pass_deferred_free) { bplist_append(&spa->spa_free_bplist[txg & TXG_MASK], bp); @@ -777,12 +777,15 @@ zio_free_sync(zio_t *pio, spa_t *spa, ui metaslab_check_free(spa, bp); arc_freed(spa, bp); + if (zfs_trim_enabled) + stage |= ZIO_STAGE_ISSUE_ASYNC | ZIO_STAGE_VDEV_IO_START | + ZIO_STAGE_VDEV_IO_ASSESS; /* * GANG and DEDUP blocks can induce a read (for the gang block header, * or the DDT), so issue them asynchronously so that this thread is * not tied up. */ - if (BP_IS_GANG(bp) || BP_GET_DEDUP(bp)) + else if (BP_IS_GANG(bp) || BP_GET_DEDUP(bp)) stage |= ZIO_STAGE_ISSUE_ASYNC; zio = zio_create(pio, spa, txg, bp, NULL, size, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r262164 - in stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: mav Date: Tue Feb 18 14:50:31 2014 New Revision: 262164 URL: http://svnweb.freebsd.org/changeset/base/262164 Log: MFC: r258137 Introduce allocation cache to store LZ4 compression contexts without kicking VM subsystem twice for every written record. Tests on 24-core system show double reduction of CPU time spent on copying single large well-compressed file. This patch is not really needed on illumos (while not harm either) since their memory allocator by default uses caching for all requests up to 128K. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Tue Feb 18 14:46:39 2014(r262163) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c Tue Feb 18 14:50:31 2014(r262164) @@ -44,6 +44,8 @@ static int LZ4_compressCtx(void *ctx, co static int LZ4_compress64kCtx(void *ctx, const char *source, char *dest, int isize, int osize); +static kmem_cache_t *lz4_ctx_cache; + /*ARGSUSED*/ size_t lz4_compress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n) @@ -840,7 +842,7 @@ static int real_LZ4_compress(const char *source, char *dest, int isize, int osize) { #if HEAPMODE - void *ctx = kmem_zalloc(sizeof (struct refTables), KM_NOSLEEP); + void *ctx = kmem_cache_alloc(lz4_ctx_cache, KM_NOSLEEP); int result; /* @@ -850,12 +852,13 @@ real_LZ4_compress(const char *source, ch if (ctx == NULL) return (0); + bzero(ctx, sizeof(struct refTables)); if (isize < LZ4_64KLIMIT) result = LZ4_compress64kCtx(ctx, source, dest, isize, osize); else result = LZ4_compressCtx(ctx, source, dest, isize, osize); - kmem_free(ctx, sizeof (struct refTables)); + kmem_cache_free(lz4_ctx_cache, ctx); return (result); #else if (isize < (int)LZ4_64KLIMIT) @@ -1001,3 +1004,22 @@ LZ4_uncompress_unknownOutputSize(const c _output_error: return (int)(-(((char *)ip) - source)); } + +extern void +lz4_init(void) +{ + +#if HEAPMODE + lz4_ctx_cache = kmem_cache_create("lz4_ctx", sizeof(struct refTables), + 0, NULL, NULL, NULL, NULL, NULL, 0); +#endif +} + +extern void +lz4_fini(void) +{ + +#if HEAPMODE + kmem_cache_destroy(lz4_ctx_cache); +#endif +} Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Feb 18 14:46:39 2014(r262163) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Feb 18 14:50:31 2014(r262164) @@ -1766,6 +1766,7 @@ spa_init(int mode) unique_init(); range_tree_init(); zio_init(); + lz4_init(); dmu_init(); zil_init(); vdev_cache_stat_init(); @@ -1791,6 +1792,7 @@ spa_fini(void) vdev_cache_stat_fini(); zil_fini(); dmu_fini(); + lz4_fini(); zio_fini(); range_tree_fini(); unique_fini(); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h Tue Feb 18 14:46:39 2014(r262163) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h Tue Feb 18 14:50:31 2014(r262164) @@ -70,6 +70,8 @@ extern size_t zle_compress(void *src, vo int level); extern int zle_decompress(void *src, void *dst, size_t s_len, size_t d_len, int level); +extern void lz4_init(void); +extern void lz4_fini(void); extern size_t lz4_compress(void *src, void *dst, size_t s_len, size_t d_len, int level); extern int lz4_decompress(void *src, void *dst, size_t s_len, size_t d_len, ___ 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: r262165 - in stable/9: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Feb 18 14:53:36 2014 New Revision: 262165 URL: http://svnweb.freebsd.org/changeset/base/262165 Log: MFC r259168: Don't even try to read vdev labels from devices smaller then SPA_MINDEVSIZE (64MB). Even if we would find one somehow, ZFS kernel code rejects such devices. It is funny to look on attempts to read 4 256K vdev labels from 1.44MB floppy, though it is not very practical and quite slow. Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/9/ (props changed) stable/9/cddl/ (props changed) stable/9/cddl/contrib/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libzfs/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c == --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Tue Feb 18 14:50:31 2014(r262164) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Tue Feb 18 14:53:36 2014(r262165) @@ -995,10 +995,10 @@ nozpool_all_slices(avl_tree_t *r, const #endif /* sun */ } +#ifdef sun static void check_slices(avl_tree_t *r, int fd, const char *sname) { -#ifdef sun struct extvtoc vtoc; struct dk_gpt *gpt; char diskname[MAXNAMELEN]; @@ -1028,8 +1028,8 @@ check_slices(avl_tree_t *r, int fd, cons check_one_slice(r, diskname, i, 0, 1); efi_free(gpt); } -#endif /* sun */ } +#endif /* sun */ static void zpool_open_func(void *arg) @@ -1059,6 +1059,7 @@ zpool_open_func(void *arg) return; } /* this file is too small to hold a zpool */ +#ifdef sun if (S_ISREG(statbuf.st_mode) && statbuf.st_size < SPA_MINDEVSIZE) { (void) close(fd); @@ -1070,6 +1071,12 @@ zpool_open_func(void *arg) */ check_slices(rn->rn_avl, fd, rn->rn_name); } +#else /* !sun */ + if (statbuf.st_size < SPA_MINDEVSIZE) { + (void) close(fd); + return; + } +#endif /* sun */ if ((zpool_read_label(fd, &config)) != 0) { (void) close(fd); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Feb 18 14:50:31 2014(r262164) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Feb 18 14:53:36 2014(r262165) @@ -370,10 +370,16 @@ vdev_geom_attach_taster(struct g_consume if (pp->flags & G_PF_WITHER) return (EINVAL); - if (pp->sectorsize > VDEV_PAD_SIZE || !ISP2(pp->sectorsize)) - return (EINVAL); g_attach(cp, pp); error = g_access(cp, 1, 0, 0); + if (error == 0) { + if (pp->sectorsize > VDEV_PAD_SIZE || !ISP2(pp->sectorsize)) + error = EINVAL; + else if (pp->mediasize < SPA_MINDEVSIZE) + error = EINVAL; + if (error != 0) + g_access(cp, -1, 0, 0); + } if (error != 0) g_detach(cp); return (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"
svn commit: r262166 - head/sys/sys
Author: jonathan Date: Tue Feb 18 14:54:56 2014 New Revision: 262166 URL: http://svnweb.freebsd.org/changeset/base/262166 Log: Add more __BEGIN_DECLS / __END_DECLS to . capability.h currently only wraps some of its declarations in __BEGIN_DECLS/__END_DECLS, so cap_enter(), cap_sandboxed(), etc. are usable from C++ code but cap_rights_init(), cap_rights_is_valid() etc. are not. This commit fixes this distinction. Approved by: rwatson (mentor) MFC after:1 week Sponsored by: DARPA, AFRL Modified: head/sys/sys/capability.h Modified: head/sys/sys/capability.h == --- head/sys/sys/capability.h Tue Feb 18 14:53:36 2014(r262165) +++ head/sys/sys/capability.h Tue Feb 18 14:54:56 2014(r262166) @@ -315,6 +315,8 @@ #defineCAP_IOCTLS_ALL SSIZE_MAX +__BEGIN_DECLS + #definecap_rights_init(...) \ __cap_rights_init(CAP_RIGHTS_VERSION, __VA_ARGS__, 0ULL) cap_rights_t *__cap_rights_init(int version, cap_rights_t *rights, ...); @@ -336,6 +338,8 @@ cap_rights_t *cap_rights_merge(cap_right cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little); +__END_DECLS + #ifdef _KERNEL #include ___ 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: r262167 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Feb 18 14:56:44 2014 New Revision: 262167 URL: http://svnweb.freebsd.org/changeset/base/262167 Log: MFC r260236: In dmu_zfetch_stream_reclaim() replace division with multiplication and move it out of the loop and lock. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Tue Feb 18 14:54:56 2014(r262166) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Tue Feb 18 14:56:44 2014(r262167) @@ -604,14 +604,16 @@ static zstream_t * dmu_zfetch_stream_reclaim(zfetch_t *zf) { zstream_t *zs; + clock_t ticks; + ticks = zfetch_min_sec_reap * hz; if (! rw_tryenter(&zf->zf_rwlock, RW_WRITER)) return (0); for (zs = list_head(&zf->zf_stream); zs; zs = list_next(&zf->zf_stream, zs)) { - if (((ddi_get_lbolt() - zs->zst_last)/hz) > zfetch_min_sec_reap) + if (ddi_get_lbolt() - zs->zst_last > ticks) break; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r262169 - in stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: avg Date: Tue Feb 18 15:05:09 2014 New Revision: 262169 URL: http://svnweb.freebsd.org/changeset/base/262169 Log: MFC r254608: Add kstat entries for ZFS compression statistics Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Feb 18 14:58:37 2014(r262168) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Feb 18 15:05:09 2014(r262169) @@ -1834,6 +1834,7 @@ dmu_init(void) dnode_init(); dbuf_init(); zfetch_init(); + zio_compress_init(); l2arc_init(); arc_init(); } @@ -1844,6 +1845,7 @@ dmu_fini(void) arc_fini(); /* arc depends on l2arc, so arc must go first */ l2arc_fini(); zfetch_fini(); + zio_compress_fini(); dbuf_fini(); dnode_fini(); dmu_objset_fini(); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h Tue Feb 18 14:58:37 2014(r262168) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h Tue Feb 18 15:05:09 2014(r262169) @@ -83,6 +83,12 @@ extern size_t zio_compress_data(enum zio extern int zio_decompress_data(enum zio_compress c, void *src, void *dst, size_t s_len, size_t d_len); +/* + * Module lifetime management. + */ +extern void zio_compress_init(void); +extern void zio_compress_fini(void); + #ifdef __cplusplus } #endif Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c Tue Feb 18 14:58:37 2014(r262168) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c Tue Feb 18 15:05:09 2014(r262169) @@ -33,10 +33,32 @@ #include #include +#include #include #include #include +typedef struct zcomp_stats { + kstat_named_t zcompstat_attempts; + kstat_named_t zcompstat_empty; + kstat_named_t zcompstat_skipped_minblocksize; + kstat_named_t zcompstat_skipped_insufficient_gain; +} zcomp_stats_t; + +static zcomp_stats_t zcomp_stats = { + { "attempts", KSTAT_DATA_UINT64 }, + { "empty", KSTAT_DATA_UINT64 }, + { "skipped_minblocksize", KSTAT_DATA_UINT64 }, + { "skipped_insufficient_gain", KSTAT_DATA_UINT64 } +}; + +#defineZCOMPSTAT_INCR(stat, val) \ + atomic_add_64(&zcomp_stats.stat.value.ui64, (val)); + +#defineZCOMPSTAT_BUMP(stat)ZCOMPSTAT_INCR(stat, 1); + +kstat_t*zcomp_ksp; + /* * Compression vectors. */ @@ -87,6 +109,8 @@ zio_compress_data(enum zio_compress c, v ASSERT((uint_t)c < ZIO_COMPRESS_FUNCTIONS); ASSERT((uint_t)c == ZIO_COMPRESS_EMPTY || ci->ci_compress != NULL); + ZCOMPSTAT_BUMP(zcompstat_attempts); + /* * If the data is all zeroes, we don't even need to allocate * a block for it. We indicate this by returning zero size. @@ -96,21 +120,27 @@ zio_compress_data(enum zio_compress c, v if (*word != 0) break; - if (word == word_end) - return (0); + if (word == word_end) { + ZCOMPSTAT_BUMP(zcompstat_empty); + return (0); + } if (c == ZIO_COMPRESS_EMPTY) return (s_len); /* Compress at least 12.5% */ d_len = P2ALIGN(s_len - (s_len >> 3), minblocksize); - if (d_len == 0) + if (d_len == 0) { + ZCOMPSTAT_BUMP(zcompstat_skipped_minblocksize); return (s_len); + } c_len = ci->ci_compress(src, dst, s_len, d_len, ci->ci_level); - if (c_len > d_len) + if (c_len > d_len) { + ZCOMPSTAT_BUMP(zcompstat_skipped_insufficient_gain); return (s_len); + } /* * Cool. We compressed at least as much as we were hoping to. @@ -139,3 +169,26 @@ zio_decompress_data(enum zio_compress c, return (ci->ci_decompress(src, dst, s_len, d_len, ci->ci_level)); } + +void +zio_compress_init(void) +{ + + zcomp_ksp = kstat_create("zfs", 0, "zcompstats", "misc", + KSTAT_TYPE_
svn commit: r262168 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Tue Feb 18 14:58:37 2014 New Revision: 262168 URL: http://svnweb.freebsd.org/changeset/base/262168 Log: MFC r260236: In dmu_zfetch_stream_reclaim() replace division with multiplication and move it out of the loop and lock. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Tue Feb 18 14:56:44 2014(r262167) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Tue Feb 18 14:58:37 2014(r262168) @@ -604,14 +604,16 @@ static zstream_t * dmu_zfetch_stream_reclaim(zfetch_t *zf) { zstream_t *zs; + clock_t ticks; + ticks = zfetch_min_sec_reap * hz; if (! rw_tryenter(&zf->zf_rwlock, RW_WRITER)) return (0); for (zs = list_head(&zf->zf_stream); zs; zs = list_next(&zf->zf_stream, zs)) { - if (((ddi_get_lbolt() - zs->zst_last)/hz) > zfetch_min_sec_reap) + if (ddi_get_lbolt() - zs->zst_last > ticks) break; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r262170 - in stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: avg Date: Tue Feb 18 15:07:24 2014 New Revision: 262170 URL: http://svnweb.freebsd.org/changeset/base/262170 Log: MFC r254608: Add kstat entries for ZFS compression statistics MFC slacker: gibbs Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Feb 18 15:05:09 2014(r262169) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Tue Feb 18 15:07:24 2014(r262170) @@ -1893,6 +1893,7 @@ dmu_init(void) dnode_init(); dbuf_init(); zfetch_init(); + zio_compress_init(); l2arc_init(); arc_init(); } @@ -1903,6 +1904,7 @@ dmu_fini(void) arc_fini(); /* arc depends on l2arc, so arc must go first */ l2arc_fini(); zfetch_fini(); + zio_compress_fini(); dbuf_fini(); dnode_fini(); dmu_objset_fini(); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h Tue Feb 18 15:05:09 2014(r262169) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h Tue Feb 18 15:07:24 2014(r262170) @@ -85,6 +85,12 @@ extern size_t zio_compress_data(enum zio extern int zio_decompress_data(enum zio_compress c, void *src, void *dst, size_t s_len, size_t d_len); +/* + * Module lifetime management. + */ +extern void zio_compress_init(void); +extern void zio_compress_fini(void); + #ifdef __cplusplus } #endif Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c Tue Feb 18 15:05:09 2014(r262169) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c Tue Feb 18 15:07:24 2014(r262170) @@ -33,10 +33,32 @@ #include #include +#include #include #include #include +typedef struct zcomp_stats { + kstat_named_t zcompstat_attempts; + kstat_named_t zcompstat_empty; + kstat_named_t zcompstat_skipped_minblocksize; + kstat_named_t zcompstat_skipped_insufficient_gain; +} zcomp_stats_t; + +static zcomp_stats_t zcomp_stats = { + { "attempts", KSTAT_DATA_UINT64 }, + { "empty", KSTAT_DATA_UINT64 }, + { "skipped_minblocksize", KSTAT_DATA_UINT64 }, + { "skipped_insufficient_gain", KSTAT_DATA_UINT64 } +}; + +#defineZCOMPSTAT_INCR(stat, val) \ + atomic_add_64(&zcomp_stats.stat.value.ui64, (val)); + +#defineZCOMPSTAT_BUMP(stat)ZCOMPSTAT_INCR(stat, 1); + +kstat_t*zcomp_ksp; + /* * Compression vectors. */ @@ -87,6 +109,8 @@ zio_compress_data(enum zio_compress c, v ASSERT((uint_t)c < ZIO_COMPRESS_FUNCTIONS); ASSERT((uint_t)c == ZIO_COMPRESS_EMPTY || ci->ci_compress != NULL); + ZCOMPSTAT_BUMP(zcompstat_attempts); + /* * If the data is all zeroes, we don't even need to allocate * a block for it. We indicate this by returning zero size. @@ -96,21 +120,27 @@ zio_compress_data(enum zio_compress c, v if (*word != 0) break; - if (word == word_end) - return (0); + if (word == word_end) { + ZCOMPSTAT_BUMP(zcompstat_empty); + return (0); + } if (c == ZIO_COMPRESS_EMPTY) return (s_len); /* Compress at least 12.5% */ d_len = P2ALIGN(s_len - (s_len >> 3), minblocksize); - if (d_len == 0) + if (d_len == 0) { + ZCOMPSTAT_BUMP(zcompstat_skipped_minblocksize); return (s_len); + } c_len = ci->ci_compress(src, dst, s_len, d_len, ci->ci_level); - if (c_len > d_len) + if (c_len > d_len) { + ZCOMPSTAT_BUMP(zcompstat_skipped_insufficient_gain); return (s_len); + } /* * Cool. We compressed at least as much as we were hoping to. @@ -139,3 +169,26 @@ zio_decompress_data(enum zio_compress c, return (ci->ci_decompress(src, dst, s_len, d_len, ci->ci_level)); } + +void +zio_compress_init(void) +{ + + zcomp_ksp = kstat_create("zfs", 0, "zcompstats", "misc", + KSTAT_TYPE_NAMED, sizeof
svn commit: r262171 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 15:18:08 2014 New Revision: 262171 URL: http://svnweb.freebsd.org/changeset/base/262171 Log: MFC r254757: MFV r254749: 4046 dsl_dataset_t ds_dir->dd_lock is highly contended MFC slacker: delphij Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Feb 18 15:07:24 2014(r262170) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Feb 18 15:18:08 2014(r262171) @@ -101,9 +101,8 @@ dsl_dataset_block_born(dsl_dataset_t *ds used, compressed, uncompressed); return; } - dmu_buf_will_dirty(ds->ds_dbuf, tx); - mutex_enter(&ds->ds_dir->dd_lock); + dmu_buf_will_dirty(ds->ds_dbuf, tx); mutex_enter(&ds->ds_lock); delta = parent_delta(ds, used); ds->ds_phys->ds_referenced_bytes += used; @@ -115,7 +114,6 @@ dsl_dataset_block_born(dsl_dataset_t *ds compressed, uncompressed, tx); dsl_dir_transfer_space(ds->ds_dir, used - delta, DD_USED_REFRSRV, DD_USED_HEAD, tx); - mutex_exit(&ds->ds_dir->dd_lock); } int @@ -150,7 +148,6 @@ dsl_dataset_block_kill(dsl_dataset_t *ds dprintf_bp(bp, "freeing ds=%llu", ds->ds_object); dsl_free(tx->tx_pool, tx->tx_txg, bp); - mutex_enter(&ds->ds_dir->dd_lock); mutex_enter(&ds->ds_lock); ASSERT(ds->ds_phys->ds_unique_bytes >= used || !DS_UNIQUE_IS_ACCURATE(ds)); @@ -161,7 +158,6 @@ dsl_dataset_block_kill(dsl_dataset_t *ds delta, -compressed, -uncompressed, tx); dsl_dir_transfer_space(ds->ds_dir, -used - delta, DD_USED_REFRSRV, DD_USED_HEAD, tx); - mutex_exit(&ds->ds_dir->dd_lock); } else { dprintf_bp(bp, "putting on dead list: %s", ""); if (async) { @@ -596,31 +592,6 @@ dsl_dataset_name(dsl_dataset_t *ds, char } } -static int -dsl_dataset_namelen(dsl_dataset_t *ds) -{ - int result; - - if (ds == NULL) { - result = 3; /* "mos" */ - } else { - result = dsl_dir_namelen(ds->ds_dir); - VERIFY0(dsl_dataset_get_snapname(ds)); - if (ds->ds_snapname[0]) { - ++result; /* adding one for the @-sign */ - if (!MUTEX_HELD(&ds->ds_lock)) { - mutex_enter(&ds->ds_lock); - result += strlen(ds->ds_snapname); - mutex_exit(&ds->ds_lock); - } else { - result += strlen(ds->ds_snapname); - } - } - } - - return (result); -} - void dsl_dataset_rele(dsl_dataset_t *ds, void *tag) { Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Feb 18 15:07:24 2014(r262170) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Feb 18 15:18:08 2014(r262171) @@ -836,11 +836,21 @@ dsl_dir_diduse_space(dsl_dir_t *dd, dd_u int64_t used, int64_t compressed, int64_t uncompressed, dmu_tx_t *tx) { int64_t accounted_delta; + + /* +* dsl_dataset_set_refreservation_sync_impl() calls this with +* dd_lock held, so that it can atomically update +* ds->ds_reserved and the dsl_dir accounting, so that +* dsl_dataset_check_quota() can see dataset and dir accounting +* consistently. +*/ boolean_t needlock = !MUTEX_HELD(&dd->dd_lock); ASSERT(dmu_tx_is_syncing(tx)); ASSERT(type < DD_USED_NUM); + dmu_buf_will_dirty(dd->dd_dbuf, tx); + if (needlock) mutex_enter(&dd->dd_lock); accounted_delta = parent_delta(dd, dd->dd_phys->dd_used_bytes, used); @@ -849,7 +859,6 @@ dsl_dir_diduse_space(dsl_dir_t *dd, dd_u dd->dd_phys->dd_compressed_bytes >= -compressed); ASSERT(uncompressed >= 0 || dd->dd_phys->dd_uncompressed_bytes >= -uncompressed); - dmu_buf_will_dirty(dd->dd_dbuf, tx); dd->dd_phys->dd_used_bytes += used; dd->dd_phys->dd_uncompressed_bytes += uncompressed; dd->dd_phys->dd_compressed_bytes += compressed; @@ -882,8 +891,6 @@ void dsl_dir_transfer_space(dsl_di
svn commit: r262172 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 15:18:21 2014 New Revision: 262172 URL: http://svnweb.freebsd.org/changeset/base/262172 Log: MFC r254757: MFV r254749: 4046 dsl_dataset_t ds_dir->dd_lock is highly contended Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Feb 18 15:18:08 2014(r262171) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Feb 18 15:18:21 2014(r262172) @@ -101,9 +101,8 @@ dsl_dataset_block_born(dsl_dataset_t *ds used, compressed, uncompressed); return; } - dmu_buf_will_dirty(ds->ds_dbuf, tx); - mutex_enter(&ds->ds_dir->dd_lock); + dmu_buf_will_dirty(ds->ds_dbuf, tx); mutex_enter(&ds->ds_lock); delta = parent_delta(ds, used); ds->ds_phys->ds_referenced_bytes += used; @@ -115,7 +114,6 @@ dsl_dataset_block_born(dsl_dataset_t *ds compressed, uncompressed, tx); dsl_dir_transfer_space(ds->ds_dir, used - delta, DD_USED_REFRSRV, DD_USED_HEAD, tx); - mutex_exit(&ds->ds_dir->dd_lock); } int @@ -150,7 +148,6 @@ dsl_dataset_block_kill(dsl_dataset_t *ds dprintf_bp(bp, "freeing ds=%llu", ds->ds_object); dsl_free(tx->tx_pool, tx->tx_txg, bp); - mutex_enter(&ds->ds_dir->dd_lock); mutex_enter(&ds->ds_lock); ASSERT(ds->ds_phys->ds_unique_bytes >= used || !DS_UNIQUE_IS_ACCURATE(ds)); @@ -161,7 +158,6 @@ dsl_dataset_block_kill(dsl_dataset_t *ds delta, -compressed, -uncompressed, tx); dsl_dir_transfer_space(ds->ds_dir, -used - delta, DD_USED_REFRSRV, DD_USED_HEAD, tx); - mutex_exit(&ds->ds_dir->dd_lock); } else { dprintf_bp(bp, "putting on dead list: %s", ""); if (async) { @@ -596,31 +592,6 @@ dsl_dataset_name(dsl_dataset_t *ds, char } } -static int -dsl_dataset_namelen(dsl_dataset_t *ds) -{ - int result; - - if (ds == NULL) { - result = 3; /* "mos" */ - } else { - result = dsl_dir_namelen(ds->ds_dir); - VERIFY0(dsl_dataset_get_snapname(ds)); - if (ds->ds_snapname[0]) { - ++result; /* adding one for the @-sign */ - if (!MUTEX_HELD(&ds->ds_lock)) { - mutex_enter(&ds->ds_lock); - result += strlen(ds->ds_snapname); - mutex_exit(&ds->ds_lock); - } else { - result += strlen(ds->ds_snapname); - } - } - } - - return (result); -} - void dsl_dataset_rele(dsl_dataset_t *ds, void *tag) { Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Feb 18 15:18:08 2014(r262171) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Feb 18 15:18:21 2014(r262172) @@ -836,11 +836,21 @@ dsl_dir_diduse_space(dsl_dir_t *dd, dd_u int64_t used, int64_t compressed, int64_t uncompressed, dmu_tx_t *tx) { int64_t accounted_delta; + + /* +* dsl_dataset_set_refreservation_sync_impl() calls this with +* dd_lock held, so that it can atomically update +* ds->ds_reserved and the dsl_dir accounting, so that +* dsl_dataset_check_quota() can see dataset and dir accounting +* consistently. +*/ boolean_t needlock = !MUTEX_HELD(&dd->dd_lock); ASSERT(dmu_tx_is_syncing(tx)); ASSERT(type < DD_USED_NUM); + dmu_buf_will_dirty(dd->dd_dbuf, tx); + if (needlock) mutex_enter(&dd->dd_lock); accounted_delta = parent_delta(dd, dd->dd_phys->dd_used_bytes, used); @@ -849,7 +859,6 @@ dsl_dir_diduse_space(dsl_dir_t *dd, dd_u dd->dd_phys->dd_compressed_bytes >= -compressed); ASSERT(uncompressed >= 0 || dd->dd_phys->dd_uncompressed_bytes >= -uncompressed); - dmu_buf_will_dirty(dd->dd_dbuf, tx); dd->dd_phys->dd_used_bytes += used; dd->dd_phys->dd_uncompressed_bytes += uncompressed; dd->dd_phys->dd_compressed_bytes += compressed; @@ -882,8 +891,6 @@ void dsl_dir_transfer
svn commit: r262173 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 15:24:49 2014 New Revision: 262173 URL: http://svnweb.freebsd.org/changeset/base/262173 Log: MFC r256889: Use the vdev's ashift to calculate the supported min block size passed to zio_compress_data Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Feb 18 15:18:21 2014(r262172) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Feb 18 15:24:49 2014(r262173) @@ -5196,7 +5196,7 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd len = l2hdr->b_asize; cdata = zio_data_buf_alloc(len); csize = zio_compress_data(ZIO_COMPRESS_LZ4, l2hdr->b_tmp_cdata, - cdata, l2hdr->b_asize, (size_t)SPA_MINBLOCKSIZE); + cdata, l2hdr->b_asize, (size_t)(1ULL << l2hdr->b_dev->l2ad_vdev->vdev_ashift)); if (csize == 0) { /* zero block, indicate that there's nothing to write */ ___ 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: r262174 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 15:24:59 2014 New Revision: 262174 URL: http://svnweb.freebsd.org/changeset/base/262174 Log: MFC r256889: Use the vdev's ashift to calculate the supported min block size passed to zio_compress_data Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Feb 18 15:24:49 2014(r262173) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Feb 18 15:24:59 2014(r262174) @@ -5166,7 +5166,7 @@ l2arc_compress_buf(l2arc_buf_hdr_t *l2hd len = l2hdr->b_asize; cdata = zio_data_buf_alloc(len); csize = zio_compress_data(ZIO_COMPRESS_LZ4, l2hdr->b_tmp_cdata, - cdata, l2hdr->b_asize, (size_t)SPA_MINBLOCKSIZE); + cdata, l2hdr->b_asize, (size_t)(1ULL << l2hdr->b_dev->l2ad_vdev->vdev_ashift)); if (csize == 0) { /* zero block, indicate that there's nothing to write */ ___ 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: r262175 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 15:29:53 2014 New Revision: 262175 URL: http://svnweb.freebsd.org/changeset/base/262175 Log: MFC r258294: Fix ZFS deadlock when sending a snapshot which is mounted MFC slacker: smh Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Tue Feb 18 15:24:59 2014(r262174) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Tue Feb 18 15:29:53 2014(r262175) @@ -564,21 +564,23 @@ dsl_dataset_user_release_impl(nvlist_t * ddura.ddura_holdfunc = dsl_dataset_hold_obj_string; pool = spa_name(tmpdp->dp_spa); #ifdef _KERNEL - dsl_pool_config_enter(tmpdp, FTAG); for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL; pair = nvlist_next_nvpair(holds, pair)) { dsl_dataset_t *ds; + dsl_pool_config_enter(tmpdp, FTAG); error = dsl_dataset_hold_obj_string(tmpdp, nvpair_name(pair), FTAG, &ds); if (error == 0) { char name[MAXNAMELEN]; dsl_dataset_name(ds, name); + dsl_pool_config_exit(tmpdp, FTAG); dsl_dataset_rele(ds, FTAG); (void) zfs_unmount_snap(name); + } else { + dsl_pool_config_exit(tmpdp, FTAG); } } - dsl_pool_config_exit(tmpdp, FTAG); #endif } else { /* Non-temporary holds are specified by 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: r262176 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 15:30:11 2014 New Revision: 262176 URL: http://svnweb.freebsd.org/changeset/base/262176 Log: MFC r258294: Fix ZFS deadlock when sending a snapshot which is mounted Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Tue Feb 18 15:29:53 2014(r262175) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Tue Feb 18 15:30:11 2014(r262176) @@ -564,21 +564,23 @@ dsl_dataset_user_release_impl(nvlist_t * ddura.ddura_holdfunc = dsl_dataset_hold_obj_string; pool = spa_name(tmpdp->dp_spa); #ifdef _KERNEL - dsl_pool_config_enter(tmpdp, FTAG); for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL; pair = nvlist_next_nvpair(holds, pair)) { dsl_dataset_t *ds; + dsl_pool_config_enter(tmpdp, FTAG); error = dsl_dataset_hold_obj_string(tmpdp, nvpair_name(pair), FTAG, &ds); if (error == 0) { char name[MAXNAMELEN]; dsl_dataset_name(ds, name); + dsl_pool_config_exit(tmpdp, FTAG); dsl_dataset_rele(ds, FTAG); (void) zfs_unmount_snap(name); + } else { + dsl_pool_config_exit(tmpdp, FTAG); } } - dsl_pool_config_exit(tmpdp, FTAG); #endif } else { /* Non-temporary holds are specified by 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: r262177 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 15:38:43 2014 New Revision: 262177 URL: http://svnweb.freebsd.org/changeset/base/262177 Log: MFC r259052: Expose spa_asize_inflation Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Feb 18 15:30:11 2014(r262176) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Feb 18 15:38:43 2014(r262177) @@ -304,6 +304,9 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, deadman_e * (VDEV_RAIDZ_MAXPARITY + 1) * SPA_DVAS_PER_BP * 2 == 24 */ int spa_asize_inflation = 24; +TUNABLE_INT("vfs.zfs.spa_asize_inflation", &spa_asize_inflation); +SYSCTL_INT(_vfs_zfs, OID_AUTO, spa_asize_inflation, CTLFLAG_RWTUN, +&spa_asize_inflation, 0, "Worst case inflation factor for single sector writes"); #ifndef illumos #ifdef _KERNEL ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r262178 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 15:38:50 2014 New Revision: 262178 URL: http://svnweb.freebsd.org/changeset/base/262178 Log: MFC r259052: Expose spa_asize_inflation Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Feb 18 15:38:43 2014(r262177) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Feb 18 15:38:50 2014(r262178) @@ -304,6 +304,9 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, deadman_e * (VDEV_RAIDZ_MAXPARITY + 1) * SPA_DVAS_PER_BP * 2 == 24 */ int spa_asize_inflation = 24; +TUNABLE_INT("vfs.zfs.spa_asize_inflation", &spa_asize_inflation); +SYSCTL_INT(_vfs_zfs, OID_AUTO, spa_asize_inflation, CTLFLAG_RWTUN, +&spa_asize_inflation, 0, "Worst case inflation factor for single sector writes"); #ifndef illumos #ifdef _KERNEL ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r262179 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 15:39:59 2014 New Revision: 262179 URL: http://svnweb.freebsd.org/changeset/base/262179 Log: MFC r259052: Expose spa_asize_inflation Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Feb 18 15:38:50 2014(r262178) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Feb 18 15:39:59 2014(r262179) @@ -304,6 +304,9 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, deadman_e * (VDEV_RAIDZ_MAXPARITY + 1) * SPA_DVAS_PER_BP * 2 == 24 */ int spa_asize_inflation = 24; +TUNABLE_INT("vfs.zfs.spa_asize_inflation", &spa_asize_inflation); +SYSCTL_INT(_vfs_zfs, OID_AUTO, spa_asize_inflation, CTLFLAG_RWTUN, +&spa_asize_inflation, 0, "Worst case inflation factor for single sector writes"); #ifndef illumos #ifdef _KERNEL ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r262180 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 15:45:02 2014 New Revision: 262180 URL: http://svnweb.freebsd.org/changeset/base/262180 Log: MFC r259576: MFV r258923: 4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0 Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.cTue Feb 18 15:39:59 2014(r262179) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.cTue Feb 18 15:45:02 2014(r262180) @@ -636,9 +636,16 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t uint64_t start = off >> shift; uint64_t end = (off + len) >> shift; - ASSERT(dn->dn_datablkshift != 0); ASSERT(dn->dn_indblkshift != 0); + /* +* dnode_reallocate() can result in an object with indirect +* blocks having an odd data block size. In this case, +* just check the single block. +*/ + if (dn->dn_datablkshift == 0) + start = end = 0; + zio = zio_root(tx->tx_pool->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); for (uint64_t i = start; i <= end; i++) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r262181 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Tue Feb 18 15:45:15 2014 New Revision: 262181 URL: http://svnweb.freebsd.org/changeset/base/262181 Log: MFC r259576: MFV r258923: 4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0 Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.cTue Feb 18 15:45:02 2014(r262180) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.cTue Feb 18 15:45:15 2014(r262181) @@ -636,9 +636,16 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t uint64_t start = off >> shift; uint64_t end = (off + len) >> shift; - ASSERT(dn->dn_datablkshift != 0); ASSERT(dn->dn_indblkshift != 0); + /* +* dnode_reallocate() can result in an object with indirect +* blocks having an odd data block size. In this case, +* just check the single block. +*/ + if (dn->dn_datablkshift == 0) + start = end = 0; + zio = zio_root(tx->tx_pool->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); for (uint64_t i = start; i <= end; i++) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r262182 - in vendor/lldb/dist: include/lldb include/lldb/API include/lldb/Breakpoint include/lldb/Core include/lldb/DataFormatters include/lldb/Expression include/lldb/Host include/lldb...
Author: emaste Date: Tue Feb 18 16:23:10 2014 New Revision: 262182 URL: http://svnweb.freebsd.org/changeset/base/262182 Log: Import lldb as of SVN r201577 (git 2bdc2f6) (A number of files not required for the FreeBSD build have been removed.) Sponsored by: DARPA, AFRL Added: vendor/lldb/dist/include/lldb/API/SBQueue.h (contents, props changed) vendor/lldb/dist/include/lldb/API/SBQueueItem.h (contents, props changed) vendor/lldb/dist/include/lldb/Core/IOHandler.h (contents, props changed) vendor/lldb/dist/include/lldb/DataFormatters/FormattersContainer.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/Editline.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/HostGetOpt.h (contents, props changed) vendor/lldb/dist/include/lldb/Target/Queue.h (contents, props changed) vendor/lldb/dist/include/lldb/Target/QueueItem.h (contents, props changed) vendor/lldb/dist/include/lldb/Target/QueueList.h (contents, props changed) vendor/lldb/dist/include/lldb/Target/SectionLoadHistory.h (contents, props changed) vendor/lldb/dist/source/API/SBQueue.cpp (contents, props changed) vendor/lldb/dist/source/API/SBQueueItem.cpp (contents, props changed) vendor/lldb/dist/source/Commands/CommandObjectGUI.cpp (contents, props changed) vendor/lldb/dist/source/Commands/CommandObjectGUI.h (contents, props changed) vendor/lldb/dist/source/Core/IOHandler.cpp (contents, props changed) vendor/lldb/dist/source/Host/common/Editline.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/Process/FreeBSD/FreeBSDThread.h (contents, props changed) vendor/lldb/dist/source/Target/Queue.cpp (contents, props changed) vendor/lldb/dist/source/Target/QueueItem.cpp (contents, props changed) vendor/lldb/dist/source/Target/QueueList.cpp (contents, props changed) vendor/lldb/dist/source/Target/SectionLoadHistory.cpp (contents, props changed) vendor/lldb/dist/tools/lldb-platform/exports Deleted: vendor/lldb/dist/include/lldb/API/SBInputReader.h vendor/lldb/dist/include/lldb/Core/InputReader.h vendor/lldb/dist/include/lldb/Core/InputReaderEZ.h vendor/lldb/dist/include/lldb/Core/InputReaderStack.h vendor/lldb/dist/include/lldb/DataFormatters/FormatNavigator.h vendor/lldb/dist/source/API/SBInputReader.cpp vendor/lldb/dist/source/Core/InputReader.cpp vendor/lldb/dist/source/Core/InputReaderEZ.cpp vendor/lldb/dist/source/Core/InputReaderStack.cpp vendor/lldb/dist/tools/driver/ELWrapper.cpp vendor/lldb/dist/tools/driver/ELWrapper.h vendor/lldb/dist/tools/driver/GetOptWrapper.cpp vendor/lldb/dist/tools/driver/GetOptWrapper.h vendor/lldb/dist/tools/driver/IOChannel.cpp vendor/lldb/dist/tools/driver/IOChannel.h Modified: vendor/lldb/dist/include/lldb/API/LLDB.h vendor/lldb/dist/include/lldb/API/SBAddress.h vendor/lldb/dist/include/lldb/API/SBCommandInterpreter.h vendor/lldb/dist/include/lldb/API/SBDebugger.h vendor/lldb/dist/include/lldb/API/SBDefines.h vendor/lldb/dist/include/lldb/API/SBError.h vendor/lldb/dist/include/lldb/API/SBModule.h vendor/lldb/dist/include/lldb/API/SBProcess.h vendor/lldb/dist/include/lldb/API/SBTarget.h vendor/lldb/dist/include/lldb/API/SBThread.h vendor/lldb/dist/include/lldb/API/SBType.h vendor/lldb/dist/include/lldb/API/SBTypeFormat.h vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocationList.h vendor/lldb/dist/include/lldb/Core/ArchSpec.h vendor/lldb/dist/include/lldb/Core/Communication.h vendor/lldb/dist/include/lldb/Core/ConnectionFileDescriptor.h vendor/lldb/dist/include/lldb/Core/Debugger.h vendor/lldb/dist/include/lldb/Core/Disassembler.h vendor/lldb/dist/include/lldb/Core/MappedHash.h vendor/lldb/dist/include/lldb/Core/Module.h vendor/lldb/dist/include/lldb/Core/Opcode.h vendor/lldb/dist/include/lldb/Core/SourceManager.h vendor/lldb/dist/include/lldb/Core/StreamAsynchronousIO.h vendor/lldb/dist/include/lldb/Core/StringList.h vendor/lldb/dist/include/lldb/Core/ValueObject.h vendor/lldb/dist/include/lldb/Core/ValueObjectList.h vendor/lldb/dist/include/lldb/DataFormatters/CXXFormatterFunctions.h vendor/lldb/dist/include/lldb/DataFormatters/FormatManager.h vendor/lldb/dist/include/lldb/DataFormatters/TypeCategory.h vendor/lldb/dist/include/lldb/DataFormatters/TypeCategoryMap.h vendor/lldb/dist/include/lldb/DataFormatters/TypeFormat.h vendor/lldb/dist/include/lldb/DataFormatters/TypeSynthetic.h vendor/lldb/dist/include/lldb/DataFormatters/ValueObjectPrinter.h vendor/lldb/dist/include/lldb/Expression/ClangFunction.h vendor/lldb/dist/include/lldb/Expression/IRForTarget.h vendor/lldb/dist/include/lldb/Host/File.h vendor/lldb/dist/include/lldb/Host/FileSpec.h vendor/lldb/dist/includ
svn commit: r262183 - vendor/lldb/lldb-r201577
Author: emaste Date: Tue Feb 18 16:26:18 2014 New Revision: 262183 URL: http://svnweb.freebsd.org/changeset/base/262183 Log: Tag lldb r201577 Added: vendor/lldb/lldb-r201577/ - copied from r262182, vendor/lldb/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r262184 - head/usr.sbin/bhyve
Author: neel Date: Tue Feb 18 19:00:15 2014 New Revision: 262184 URL: http://svnweb.freebsd.org/changeset/base/262184 Log: Add a check to validate that memory BARs of passthru devices are 4KB aligned. Also, the MSI-x table offset is not required to be 4KB aligned so take this into account when computing the pages occupied by the MSI-x tables. Modified: head/usr.sbin/bhyve/pci_emul.c head/usr.sbin/bhyve/pci_emul.h head/usr.sbin/bhyve/pci_passthru.c Modified: head/usr.sbin/bhyve/pci_emul.c == --- head/usr.sbin/bhyve/pci_emul.c Tue Feb 18 16:26:18 2014 (r262183) +++ head/usr.sbin/bhyve/pci_emul.c Tue Feb 18 19:00:15 2014 (r262184) @@ -792,7 +792,6 @@ pci_msix_table_init(struct pci_devinst * int pci_emul_add_msixcap(struct pci_devinst *pi, int msgnum, int barnum) { - uint16_t pba_index; uint32_t tab_size; struct msixcap msixcap; @@ -809,10 +808,7 @@ pci_emul_add_msixcap(struct pci_devinst pi->pi_msix.table_offset = 0; pi->pi_msix.table_count = msgnum; pi->pi_msix.pba_offset = tab_size; - - /* calculate the MMIO size required for MSI-X PBA */ - pba_index = (msgnum - 1) / (PBA_TABLE_ENTRY_SIZE * 8); - pi->pi_msix.pba_size = (pba_index + 1) * PBA_TABLE_ENTRY_SIZE; + pi->pi_msix.pba_size = PBA_SIZE(msgnum); pci_msix_table_init(pi, msgnum); Modified: head/usr.sbin/bhyve/pci_emul.h == --- head/usr.sbin/bhyve/pci_emul.h Tue Feb 18 16:26:18 2014 (r262183) +++ head/usr.sbin/bhyve/pci_emul.h Tue Feb 18 19:00:15 2014 (r262184) @@ -100,7 +100,7 @@ struct msix_table_entry { */ #defineMSIX_TABLE_ENTRY_SIZE 16 #define MAX_MSIX_TABLE_ENTRIES 2048 -#define PBA_TABLE_ENTRY_SIZE 8 +#definePBA_SIZE(msgnum)(roundup2((msgnum), 64) / 8) enum lintr_stat { IDLE, @@ -135,10 +135,10 @@ struct pci_devinst { int enabled; int table_bar; int pba_bar; - size_t table_offset; + uint32_t table_offset; int table_count; - size_t pba_offset; - size_t pba_size; + uint32_t pba_offset; + int pba_size; int function_mask; struct msix_table_entry *table; /* allocated at runtime */ } pi_msix; Modified: head/usr.sbin/bhyve/pci_passthru.c == --- head/usr.sbin/bhyve/pci_passthru.c Tue Feb 18 16:26:18 2014 (r262183) +++ head/usr.sbin/bhyve/pci_passthru.c Tue Feb 18 19:00:15 2014 (r262184) @@ -228,6 +228,7 @@ cfginitmsi(struct passthru_softc *sc) pi->pi_msix.table_offset = msixcap.table_info & ~PCIM_MSIX_BIR_MASK; pi->pi_msix.table_count = MSIX_TABLE_COUNT(msixcap.msgctrl); + pi->pi_msix.pba_size = PBA_SIZE(pi->pi_msix.table_count); /* Allocate the emulated MSI-X table array */ table_size = pi->pi_msix.table_count * MSIX_TABLE_ENTRY_SIZE; @@ -279,8 +280,10 @@ msix_table_read(struct passthru_softc *s int index; pi = sc->psc_pi; - offset -= pi->pi_msix.table_offset; + if (offset < pi->pi_msix.table_offset) + return (-1); + offset -= pi->pi_msix.table_offset; index = offset / MSIX_TABLE_ENTRY_SIZE; if (index >= pi->pi_msix.table_count) return (-1); @@ -324,8 +327,10 @@ msix_table_write(struct vmctx *ctx, int int error, index; pi = sc->psc_pi; - offset -= pi->pi_msix.table_offset; + if (offset < pi->pi_msix.table_offset) + return; + offset -= pi->pi_msix.table_offset; index = offset / MSIX_TABLE_ENTRY_SIZE; if (index >= pi->pi_msix.table_count) return; @@ -358,7 +363,9 @@ init_msix_table(struct vmctx *ctx, struc { int b, s, f; int error, idx; - size_t len, remaining, table_size; + size_t len, remaining; + uint32_t table_size, table_offset; + uint32_t pba_size, pba_offset; vm_paddr_t start; struct pci_devinst *pi = sc->psc_pi; @@ -374,24 +381,37 @@ init_msix_table(struct vmctx *ctx, struc * either resides in its own page within the region, * or it resides in a page shared with only the PBA. */ - if (pi->pi_msix.pba_bar == pi->pi_msix.table_bar && - ((pi->pi_msix.pba_offset - pi->pi_msix.table_offset) < 4096)) { - /* Need to also emulate the PBA, not supported yet */ - printf("Unsupported MSI-X configuration: %d/%d/%d\n", b, s, f); - return (-1); - } + table_offset = rounddown2(pi->pi_msix.tab
svn commit: r262186 - head/contrib/llvm/tools/lldb/source/Symbol
Author: emaste Date: Tue Feb 18 19:46:45 2014 New Revision: 262186 URL: http://svnweb.freebsd.org/changeset/base/262186 Log: Fix mismerge in r262121 A break statement was lost in the merge. The error had no functional impact, but restore it to reduce the diff against upstream. Modified: head/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp Modified: head/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp == --- head/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp Tue Feb 18 19:11:24 2014(r262185) +++ head/contrib/llvm/tools/lldb/source/Symbol/ClangASTType.cpp Tue Feb 18 19:46:45 2014(r262186) @@ -1915,6 +1915,7 @@ ClangASTType::GetEncoding (uint64_t &cou case clang::Type::Decltype: case clang::Type::TemplateSpecialization: case clang::Type::Atomic: +break; // pointer type decayed from an array or function type. case clang::Type::Decayed: ___ 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: r262190 - in stable: 10/share/man/man3 8/share/man/man3 9/share/man/man3
Author: jhb Date: Tue Feb 18 20:16:32 2014 New Revision: 262190 URL: http://svnweb.freebsd.org/changeset/base/262190 Log: MFC 261518: - Update a few places to account for va_copy(). - Create a separate 'return values' section and move some statements about return values to that section. - Note that each invocation of va_start() and va_copy() must be paired with va_end() in the same function. Modified: stable/10/share/man/man3/stdarg.3 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/share/man/man3/stdarg.3 stable/9/share/man/man3/stdarg.3 Directory Properties: stable/8/share/man/man3/ (props changed) stable/9/share/man/man3/ (props changed) Modified: stable/10/share/man/man3/stdarg.3 == --- stable/10/share/man/man3/stdarg.3 Tue Feb 18 19:58:01 2014 (r262189) +++ stable/10/share/man/man3/stdarg.3 Tue Feb 18 20:16:32 2014 (r262190) @@ -59,7 +59,7 @@ The include file .In stdarg.h declares a type .Pq Em va_list -and defines three macros for stepping +and defines four macros for stepping through a list of arguments whose number and types are not known to the called function. .Pp @@ -77,7 +77,8 @@ The macro initializes .Fa ap for subsequent use by -.Fn va_arg +.Fn va_arg , +.Fn va_copy , and .Fn va_end , and must be called first. @@ -93,10 +94,6 @@ macro, it should not be declared as a re function or an array type. .Pp The -.Fn va_start -macro returns no value. -.Pp -The .Fn va_arg macro expands to an expression that has the type and value of the next argument in the call. @@ -105,7 +102,9 @@ The parameter is the .Em va_list Fa ap initialized by -.Fn va_start . +.Fn va_start +or +.Fn va_copy . Each call to .Fn va_arg modifies @@ -152,18 +151,28 @@ the same number of times as called with .Fa src . .Pp The -.Fn va_copy -macro returns no value. +.Fn va_end +macro cleans up any state associated with the variable argument list +.Fa ap . .Pp -The +Each invocation of +.Fn va_start +or +.Fn va_copy +must be paired with a corresponding invocation of .Fn va_end -macro handles a normal return from the function whose variable argument -list was initialized by -.Fn va_start . +in the same function. +.Sh RETURN VALUES +The +.Fn va_arg +macro returns the value of the next argument. .Pp The +.Fn va_start , +.Fn va_copy , +and .Fn va_end -macro returns no value. +macros return no value. .Sh EXAMPLES The function .Em foo ___ 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: r262190 - in stable: 10/share/man/man3 8/share/man/man3 9/share/man/man3
Author: jhb Date: Tue Feb 18 20:16:32 2014 New Revision: 262190 URL: http://svnweb.freebsd.org/changeset/base/262190 Log: MFC 261518: - Update a few places to account for va_copy(). - Create a separate 'return values' section and move some statements about return values to that section. - Note that each invocation of va_start() and va_copy() must be paired with va_end() in the same function. Modified: stable/8/share/man/man3/stdarg.3 Directory Properties: stable/8/share/man/man3/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/man/man3/stdarg.3 stable/9/share/man/man3/stdarg.3 Directory Properties: stable/10/ (props changed) stable/9/share/man/man3/ (props changed) Modified: stable/8/share/man/man3/stdarg.3 == --- stable/8/share/man/man3/stdarg.3Tue Feb 18 19:58:01 2014 (r262189) +++ stable/8/share/man/man3/stdarg.3Tue Feb 18 20:16:32 2014 (r262190) @@ -59,7 +59,7 @@ The include file .In stdarg.h declares a type .Pq Em va_list -and defines three macros for stepping +and defines four macros for stepping through a list of arguments whose number and types are not known to the called function. .Pp @@ -77,7 +77,8 @@ The macro initializes .Fa ap for subsequent use by -.Fn va_arg +.Fn va_arg , +.Fn va_copy , and .Fn va_end , and must be called first. @@ -93,10 +94,6 @@ macro, it should not be declared as a re function or an array type. .Pp The -.Fn va_start -macro returns no value. -.Pp -The .Fn va_arg macro expands to an expression that has the type and value of the next argument in the call. @@ -105,7 +102,9 @@ The parameter is the .Em va_list Fa ap initialized by -.Fn va_start . +.Fn va_start +or +.Fn va_copy . Each call to .Fn va_arg modifies @@ -152,18 +151,28 @@ the same number of times as called with .Fa src . .Pp The -.Fn va_copy -macro returns no value. +.Fn va_end +macro cleans up any state associated with the variable argument list +.Fa ap . .Pp -The +Each invocation of +.Fn va_start +or +.Fn va_copy +must be paired with a corresponding invocation of .Fn va_end -macro handles a normal return from the function whose variable argument -list was initialized by -.Fn va_start . +in the same function. +.Sh RETURN VALUES +The +.Fn va_arg +macro returns the value of the next argument. .Pp The +.Fn va_start , +.Fn va_copy , +and .Fn va_end -macro returns no value. +macros return no value. .Sh EXAMPLES The function .Em foo ___ 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: r262190 - in stable: 10/share/man/man3 8/share/man/man3 9/share/man/man3
Author: jhb Date: Tue Feb 18 20:16:32 2014 New Revision: 262190 URL: http://svnweb.freebsd.org/changeset/base/262190 Log: MFC 261518: - Update a few places to account for va_copy(). - Create a separate 'return values' section and move some statements about return values to that section. - Note that each invocation of va_start() and va_copy() must be paired with va_end() in the same function. Modified: stable/9/share/man/man3/stdarg.3 Directory Properties: stable/9/share/man/man3/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/man/man3/stdarg.3 stable/8/share/man/man3/stdarg.3 Directory Properties: stable/10/ (props changed) stable/8/share/man/man3/ (props changed) Modified: stable/9/share/man/man3/stdarg.3 == --- stable/9/share/man/man3/stdarg.3Tue Feb 18 19:58:01 2014 (r262189) +++ stable/9/share/man/man3/stdarg.3Tue Feb 18 20:16:32 2014 (r262190) @@ -59,7 +59,7 @@ The include file .In stdarg.h declares a type .Pq Em va_list -and defines three macros for stepping +and defines four macros for stepping through a list of arguments whose number and types are not known to the called function. .Pp @@ -77,7 +77,8 @@ The macro initializes .Fa ap for subsequent use by -.Fn va_arg +.Fn va_arg , +.Fn va_copy , and .Fn va_end , and must be called first. @@ -93,10 +94,6 @@ macro, it should not be declared as a re function or an array type. .Pp The -.Fn va_start -macro returns no value. -.Pp -The .Fn va_arg macro expands to an expression that has the type and value of the next argument in the call. @@ -105,7 +102,9 @@ The parameter is the .Em va_list Fa ap initialized by -.Fn va_start . +.Fn va_start +or +.Fn va_copy . Each call to .Fn va_arg modifies @@ -152,18 +151,28 @@ the same number of times as called with .Fa src . .Pp The -.Fn va_copy -macro returns no value. +.Fn va_end +macro cleans up any state associated with the variable argument list +.Fa ap . .Pp -The +Each invocation of +.Fn va_start +or +.Fn va_copy +must be paired with a corresponding invocation of .Fn va_end -macro handles a normal return from the function whose variable argument -list was initialized by -.Fn va_start . +in the same function. +.Sh RETURN VALUES +The +.Fn va_arg +macro returns the value of the next argument. .Pp The +.Fn va_start , +.Fn va_copy , +and .Fn va_end -macro returns no value. +macros return no value. .Sh EXAMPLES The function .Em foo ___ 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: r262192 - in stable: 10/sbin/hastd 10/sys/amd64/include 10/sys/boot/i386/cdboot 10/sys/boot/i386/pxeldr 10/sys/dev/pci 10/sys/i386/include 10/sys/kern 10/sys/sys 10/sys/x86/acpica 10/sy...
Author: jhb Date: Tue Feb 18 20:27:17 2014 New Revision: 262192 URL: http://svnweb.freebsd.org/changeset/base/262192 Log: MFC 261517,261520: Convert the license on files where I am the sole copyright holder to 2 clause BSD licenses. Modified: stable/10/sbin/hastd/refcnt.h stable/10/sys/amd64/include/apicvar.h stable/10/sys/boot/i386/cdboot/cdboot.S stable/10/sys/boot/i386/pxeldr/pxeldr.S stable/10/sys/dev/pci/vga_pci.c stable/10/sys/i386/include/apicvar.h stable/10/sys/kern/kern_ktr.c stable/10/sys/kern/kern_rwlock.c stable/10/sys/kern/subr_lock.c stable/10/sys/kern/subr_sleepqueue.c stable/10/sys/kern/subr_smp.c stable/10/sys/sys/_rwlock.h stable/10/sys/sys/refcount.h stable/10/sys/sys/rwlock.h stable/10/sys/sys/sleepqueue.h stable/10/sys/sys/turnstile.h stable/10/sys/x86/acpica/madt.c stable/10/sys/x86/isa/atpic.c stable/10/sys/x86/isa/elcr.c stable/10/sys/x86/x86/intr_machdep.c stable/10/sys/x86/x86/io_apic.c stable/10/sys/x86/x86/mptable_pci.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sbin/hastd/refcnt.h stable/9/sys/amd64/include/apicvar.h stable/9/sys/boot/i386/cdboot/cdboot.S stable/9/sys/boot/i386/pxeldr/pxeldr.S stable/9/sys/dev/pci/vga_pci.c stable/9/sys/i386/include/apicvar.h stable/9/sys/kern/kern_ktr.c stable/9/sys/kern/kern_rwlock.c stable/9/sys/kern/subr_lock.c stable/9/sys/kern/subr_sleepqueue.c stable/9/sys/kern/subr_smp.c stable/9/sys/sys/_rwlock.h stable/9/sys/sys/refcount.h stable/9/sys/sys/rwlock.h stable/9/sys/sys/sleepqueue.h stable/9/sys/sys/turnstile.h stable/9/sys/x86/acpica/madt.c stable/9/sys/x86/isa/atpic.c stable/9/sys/x86/isa/elcr.c stable/9/sys/x86/x86/intr_machdep.c stable/9/sys/x86/x86/io_apic.c stable/9/sys/x86/x86/mptable_pci.c Directory Properties: stable/9/sbin/hastd/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/10/sbin/hastd/refcnt.h == --- stable/10/sbin/hastd/refcnt.h Tue Feb 18 20:25:02 2014 (r262191) +++ stable/10/sbin/hastd/refcnt.h Tue Feb 18 20:27:17 2014 (r262192) @@ -10,9 +10,6 @@ * 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. - * 3. Neither the name of the author nor the names of any co-contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/amd64/include/apicvar.h == --- stable/10/sys/amd64/include/apicvar.h Tue Feb 18 20:25:02 2014 (r262191) +++ stable/10/sys/amd64/include/apicvar.h Tue Feb 18 20:27:17 2014 (r262192) @@ -10,9 +10,6 @@ * 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. - * 3. Neither the name of the author nor the names of any co-contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/boot/i386/cdboot/cdboot.S == --- stable/10/sys/boot/i386/cdboot/cdboot.S Tue Feb 18 20:25:02 2014 (r262191) +++ stable/10/sys/boot/i386/cdboot/cdboot.S Tue Feb 18 20:27:17 2014 (r262192) @@ -10,9 +10,6 @@ # 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. -# 3. Neither the name of the author nor the names of any co-contributors -#may be used to endorse or promote products derived from this software -#without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/10/sys/boot/i386/pxeldr/pxeldr.S == --- stable/10/sys/boot/i386/pxeldr/pxeldr.S Tue Feb 18 20:25:02 2014 (r262191) +++ stable/
svn commit: r262192 - in stable: 10/sbin/hastd 10/sys/amd64/include 10/sys/boot/i386/cdboot 10/sys/boot/i386/pxeldr 10/sys/dev/pci 10/sys/i386/include 10/sys/kern 10/sys/sys 10/sys/x86/acpica 10/sy...
Author: jhb Date: Tue Feb 18 20:27:17 2014 New Revision: 262192 URL: http://svnweb.freebsd.org/changeset/base/262192 Log: MFC 261517,261520: Convert the license on files where I am the sole copyright holder to 2 clause BSD licenses. Modified: stable/9/sbin/hastd/refcnt.h stable/9/sys/amd64/include/apicvar.h stable/9/sys/boot/i386/cdboot/cdboot.S stable/9/sys/boot/i386/pxeldr/pxeldr.S stable/9/sys/dev/pci/vga_pci.c stable/9/sys/i386/include/apicvar.h stable/9/sys/kern/kern_ktr.c stable/9/sys/kern/kern_rwlock.c stable/9/sys/kern/subr_lock.c stable/9/sys/kern/subr_sleepqueue.c stable/9/sys/kern/subr_smp.c stable/9/sys/sys/_rwlock.h stable/9/sys/sys/refcount.h stable/9/sys/sys/rwlock.h stable/9/sys/sys/sleepqueue.h stable/9/sys/sys/turnstile.h stable/9/sys/x86/acpica/madt.c stable/9/sys/x86/isa/atpic.c stable/9/sys/x86/isa/elcr.c stable/9/sys/x86/x86/intr_machdep.c stable/9/sys/x86/x86/io_apic.c stable/9/sys/x86/x86/mptable_pci.c Directory Properties: stable/9/sbin/hastd/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sbin/hastd/refcnt.h stable/10/sys/amd64/include/apicvar.h stable/10/sys/boot/i386/cdboot/cdboot.S stable/10/sys/boot/i386/pxeldr/pxeldr.S stable/10/sys/dev/pci/vga_pci.c stable/10/sys/i386/include/apicvar.h stable/10/sys/kern/kern_ktr.c stable/10/sys/kern/kern_rwlock.c stable/10/sys/kern/subr_lock.c stable/10/sys/kern/subr_sleepqueue.c stable/10/sys/kern/subr_smp.c stable/10/sys/sys/_rwlock.h stable/10/sys/sys/refcount.h stable/10/sys/sys/rwlock.h stable/10/sys/sys/sleepqueue.h stable/10/sys/sys/turnstile.h stable/10/sys/x86/acpica/madt.c stable/10/sys/x86/isa/atpic.c stable/10/sys/x86/isa/elcr.c stable/10/sys/x86/x86/intr_machdep.c stable/10/sys/x86/x86/io_apic.c stable/10/sys/x86/x86/mptable_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sbin/hastd/refcnt.h == --- stable/9/sbin/hastd/refcnt.hTue Feb 18 20:25:02 2014 (r262191) +++ stable/9/sbin/hastd/refcnt.hTue Feb 18 20:27:17 2014 (r262192) @@ -10,9 +10,6 @@ * 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. - * 3. Neither the name of the author nor the names of any co-contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/amd64/include/apicvar.h == --- stable/9/sys/amd64/include/apicvar.hTue Feb 18 20:25:02 2014 (r262191) +++ stable/9/sys/amd64/include/apicvar.hTue Feb 18 20:27:17 2014 (r262192) @@ -10,9 +10,6 @@ * 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. - * 3. Neither the name of the author nor the names of any co-contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/boot/i386/cdboot/cdboot.S == --- stable/9/sys/boot/i386/cdboot/cdboot.S Tue Feb 18 20:25:02 2014 (r262191) +++ stable/9/sys/boot/i386/cdboot/cdboot.S Tue Feb 18 20:27:17 2014 (r262192) @@ -10,9 +10,6 @@ # 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. -# 3. Neither the name of the author nor the names of any co-contributors -#may be used to endorse or promote products derived from this software -#without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: stable/9/sys/boot/i386/pxeldr/pxeldr.S == --- stable/9/sys/boot/i386/pxeldr/pxeldr.S Tue Feb 18 20:25:02 2014 (r262191) +++ stable/9/sy
svn commit: r262194 - head/sys/dev/gpio
Author: loos Date: Tue Feb 18 21:29:30 2014 New Revision: 262194 URL: http://svnweb.freebsd.org/changeset/base/262194 Log: Remove an unnecessary header. Reported by: nwhitehorn Approved by: adrian (mentor, implicit) Modified: head/sys/dev/gpio/ofw_gpiobus.c Modified: head/sys/dev/gpio/ofw_gpiobus.c == --- head/sys/dev/gpio/ofw_gpiobus.c Tue Feb 18 20:31:51 2014 (r262193) +++ head/sys/dev/gpio/ofw_gpiobus.c Tue Feb 18 21:29:30 2014 (r262194) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include ___ 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: r262196 - head/sys/netpfil/pf
Author: mm Date: Tue Feb 18 22:17:12 2014 New Revision: 262196 URL: http://svnweb.freebsd.org/changeset/base/262196 Log: De-virtualize pf_mtag_z [1] Process V_pf_overloadqueue in vnet context [2] This fixes two VIMAGE kernel panics and allows to simultaneously run host-pf and vnet jails. pf inside jails remains broken. PR: kern/182964 Submitted by: gleb...@freebsd.org [2], myself [1] Tested by:rodr...@freebsd.org, myself MFC after:2 weeks Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c == --- head/sys/netpfil/pf/pf.cTue Feb 18 22:16:24 2014(r262195) +++ head/sys/netpfil/pf/pf.cTue Feb 18 22:17:12 2014(r262196) @@ -172,7 +172,10 @@ struct pf_overload_entry { struct pf_rule *rule; }; -SLIST_HEAD(pf_overload_head, pf_overload_entry); +struct pf_overload_head { + SLIST_HEAD(, pf_overload_entry) head; + struct vnet *vnet; +}; static VNET_DEFINE(struct pf_overload_head, pf_overloadqueue); #define V_pf_overloadqueue VNET(pf_overloadqueue) static VNET_DEFINE(struct task, pf_overloadtask); @@ -187,8 +190,7 @@ struct mtx pf_unlnkdrules_mtx; static VNET_DEFINE(uma_zone_t, pf_sources_z); #defineV_pf_sources_z VNET(pf_sources_z) -static VNET_DEFINE(uma_zone_t, pf_mtag_z); -#defineV_pf_mtag_z VNET(pf_mtag_z) +uma_zone_t pf_mtag_z; VNET_DEFINE(uma_zone_t, pf_state_z); VNET_DEFINE(uma_zone_t, pf_state_key_z); @@ -510,7 +512,7 @@ pf_src_connlimit(struct pf_state **state pfoe->rule = (*state)->rule.ptr; pfoe->dir = (*state)->direction; PF_OVERLOADQ_LOCK(); - SLIST_INSERT_HEAD(&V_pf_overloadqueue, pfoe, next); + SLIST_INSERT_HEAD(&V_pf_overloadqueue.head, pfoe, next); PF_OVERLOADQ_UNLOCK(); taskqueue_enqueue(taskqueue_swi, &V_pf_overloadtask); @@ -527,11 +529,13 @@ pf_overload_task(void *c, int pending) PF_OVERLOADQ_LOCK(); queue = *(struct pf_overload_head *)c; - SLIST_INIT((struct pf_overload_head *)c); + SLIST_INIT(&((struct pf_overload_head *)c)->head); PF_OVERLOADQ_UNLOCK(); + CURVNET_SET(queue.vnet); + bzero(&p, sizeof(p)); - SLIST_FOREACH(pfoe, &queue, next) { + SLIST_FOREACH(pfoe, &queue.head, next) { V_pf_status.lcounters[LCNT_OVERLOAD_TABLE]++; if (V_pf_status.debug >= PF_DEBUG_MISC) { printf("%s: blocking address ", __func__); @@ -563,16 +567,18 @@ pf_overload_task(void *c, int pending) /* * Remove those entries, that don't need flushing. */ - SLIST_FOREACH_SAFE(pfoe, &queue, next, pfoe1) + SLIST_FOREACH_SAFE(pfoe, &queue.head, next, pfoe1) if (pfoe->rule->flush == 0) { - SLIST_REMOVE(&queue, pfoe, pf_overload_entry, next); + SLIST_REMOVE(&queue.head, pfoe, pf_overload_entry, next); free(pfoe, M_PFTEMP); } else V_pf_status.lcounters[LCNT_OVERLOAD_FLUSH]++; /* If nothing to flush, return. */ - if (SLIST_EMPTY(&queue)) + if (SLIST_EMPTY(&queue.head)) { + CURVNET_RESTORE(); return; + } for (int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; @@ -582,7 +588,7 @@ pf_overload_task(void *c, int pending) PF_HASHROW_LOCK(ih); LIST_FOREACH(s, &ih->states, entry) { sk = s->key[PF_SK_WIRE]; - SLIST_FOREACH(pfoe, &queue, next) + SLIST_FOREACH(pfoe, &queue.head, next) if (sk->af == pfoe->af && ((pfoe->rule->flush & PF_FLUSH_GLOBAL) || pfoe->rule == s->rule.ptr) && @@ -597,10 +603,12 @@ pf_overload_task(void *c, int pending) } PF_HASHROW_UNLOCK(ih); } - SLIST_FOREACH_SAFE(pfoe, &queue, next, pfoe1) + SLIST_FOREACH_SAFE(pfoe, &queue.head, next, pfoe1) free(pfoe, M_PFTEMP); if (V_pf_status.debug >= PF_DEBUG_MISC) printf("%s: %u states killed", __func__, killed); + + CURVNET_RESTORE(); } /* @@ -790,14 +798,16 @@ pf_initialize() V_pf_altqs_inactive = &V_pf_altqs[1]; /* Mbuf tags */ - V_pf_mtag_z = uma_zcreate("pf mtags", sizeof(struct m_tag) + - sizeof(struct pf_mtag), NULL, NULL, pf_mtag_init, NULL, - UMA_ALIGN_PTR, 0); + if (IS_DEFAULT_VNET(curvnet)) + pf_mtag_z = uma_zcreate("pf mtags", sizeof(struct m_tag) + + sizeof(struct pf_mtag), NULL, NULL, pf_mtag_init, NULL, + UMA_ALIGN_PTR, 0); /* Send & overload+flush queues. */ STAILQ_INIT(&
svn commit: r262197 - in head/sys/boot/mips: . beri beri/boot2 beri/common beri/loader
Author: rwatson Date: Tue Feb 18 23:18:32 2014 New Revision: 262197 URL: http://svnweb.freebsd.org/changeset/base/262197 Log: Commit a first cut at ports of boot2 and loader to 64-bit MIPS, with a particular interest in (and support for) SRI International and the University of Cambridge's BERI FPGA soft-core processor. This includes micro device drivers for the Altera JTAG UART console, memory-mapped flash, and the Altera SD Card IP core in both boot2 and loader. boot2 can be written to the on-board Intel StrataFlash on the DE4 board, and loader can be placed in StrataFlash or the SD Card. Plenty of XXX comments, but works quite well locally in practice and I am using it daily. Although I had originally ported the ARM version of boot2, the current version is x86-derived as that proved more feature-complete. As we don't currently use partitions on our flash disks, support for that has been commented out relative to x86, but would be easy to add back. FDT support has not yet been hooked up, although some skeleton parts have been put in place for that. This may well be a useful starting point for ports to other 32-bit and 64-bit MIPS-ISA systems. This merge is synchronised to CheriBSD github commit e41d74fd719525d4dd7a7ee499114679165eeaf6, but with some additions of $FreeBSD. MFC after:3 weeks Sponsored by: DARPA, AFRAL Added: head/sys/boot/mips/ head/sys/boot/mips/Makefile (contents, props changed) head/sys/boot/mips/Makefile.inc (contents, props changed) head/sys/boot/mips/beri/ head/sys/boot/mips/beri/Makefile (contents, props changed) head/sys/boot/mips/beri/Makefile.inc (contents, props changed) head/sys/boot/mips/beri/boot2/ head/sys/boot/mips/beri/boot2/Makefile (contents, props changed) head/sys/boot/mips/beri/boot2/boot2.c (contents, props changed) head/sys/boot/mips/beri/boot2/flashboot.ldscript (contents, props changed) head/sys/boot/mips/beri/boot2/jtagboot.ldscript (contents, props changed) head/sys/boot/mips/beri/boot2/relocate.S (contents, props changed) head/sys/boot/mips/beri/boot2/start.S (contents, props changed) head/sys/boot/mips/beri/common/ head/sys/boot/mips/beri/common/altera_jtag_uart.c (contents, props changed) head/sys/boot/mips/beri/common/beri.h (contents, props changed) head/sys/boot/mips/beri/common/cfi.c (contents, props changed) head/sys/boot/mips/beri/common/cfi.h (contents, props changed) head/sys/boot/mips/beri/common/common.ldscript (contents, props changed) head/sys/boot/mips/beri/common/cons.h (contents, props changed) head/sys/boot/mips/beri/common/mips.h (contents, props changed) head/sys/boot/mips/beri/common/sdcard.c (contents, props changed) head/sys/boot/mips/beri/common/sdcard.h (contents, props changed) head/sys/boot/mips/beri/loader/ head/sys/boot/mips/beri/loader/Makefile (contents, props changed) head/sys/boot/mips/beri/loader/arch.c (contents, props changed) head/sys/boot/mips/beri/loader/beri_console.c (contents, props changed) head/sys/boot/mips/beri/loader/beri_disk_cfi.c (contents, props changed) head/sys/boot/mips/beri/loader/beri_disk_sdcard.c (contents, props changed) head/sys/boot/mips/beri/loader/devicename.c (contents, props changed) head/sys/boot/mips/beri/loader/exec.c (contents, props changed) head/sys/boot/mips/beri/loader/help.mips (contents, props changed) head/sys/boot/mips/beri/loader/loader.h (contents, props changed) head/sys/boot/mips/beri/loader/loader.ldscript (contents, props changed) head/sys/boot/mips/beri/loader/main.c (contents, props changed) head/sys/boot/mips/beri/loader/metadata.c (contents, props changed) head/sys/boot/mips/beri/loader/start.S (contents, props changed) head/sys/boot/mips/beri/loader/version (contents, props changed) Added: head/sys/boot/mips/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/mips/Makefile Tue Feb 18 23:18:32 2014(r262197) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +SUBDIR=beri + +.include Added: head/sys/boot/mips/Makefile.inc == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/mips/Makefile.inc Tue Feb 18 23:18:32 2014 (r262197) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Added: head/sys/boot/mips/beri/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/mips/beri/MakefileTue Feb 18 23:18:32 2014 (r262197) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +SUBDIR=boot2 loader + +.include Added: head/sys/boot/mips/beri/Makefile.inc
svn commit: r262198 - in head/sys/boot/mips/beri: boot2 loader
Author: rwatson Date: Tue Feb 18 23:22:54 2014 New Revision: 262198 URL: http://svnweb.freebsd.org/changeset/base/262198 Log: Replace Apache-style license on two Makefiles with stock 2-clause BSD; license, although the former is pretty safe, it wasn't intended to be used in the version of MIPS boot2/loader upstreamed to FreeBSD. MFC after:3 weeks Sponsored by: DARPA, AFRL Modified: head/sys/boot/mips/beri/boot2/Makefile head/sys/boot/mips/beri/loader/Makefile Modified: head/sys/boot/mips/beri/boot2/Makefile == --- head/sys/boot/mips/beri/boot2/Makefile Tue Feb 18 23:18:32 2014 (r262197) +++ head/sys/boot/mips/beri/boot2/Makefile Tue Feb 18 23:22:54 2014 (r262198) @@ -6,25 +6,28 @@ # Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) # ("CTSRD"), as part of the DARPA CRASH research programme. # -# @BERI_LICENSE_HEADER_START@ +# 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. # -# Licensed to BERI Open Systems C.I.C (BERI) under one or more contributor -# license agreements. See the NOTICE file distributed with this work for -# additional information regarding copyright ownership. BERI licenses this -# file to you under the BERI Hardware-Software License, Version 1.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at: -# -# http://www.beri-open-systems.org/legal/license-1-0.txt -# -# Unless required by applicable law or agreed to in writing, Work distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. -# -# @BERI_LICENSE_HEADER_END@ -# -# $FreeBSD$ +# $FreeBSD$ BINDIR?= /boot INSTALLFLAGS= -b Modified: head/sys/boot/mips/beri/loader/Makefile == --- head/sys/boot/mips/beri/loader/Makefile Tue Feb 18 23:18:32 2014 (r262197) +++ head/sys/boot/mips/beri/loader/Makefile Tue Feb 18 23:22:54 2014 (r262198) @@ -6,25 +6,27 @@ # Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) # ("CTSRD"), as part of the DARPA CRASH research programme. # -# @BERI_LICENSE_HEADER_START@ +# 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. # -# Licensed to BERI
svn commit: r262200 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Wed Feb 19 04:23:01 2014 New Revision: 262200 URL: http://svnweb.freebsd.org/changeset/base/262200 Log: Add in a flag to control whether the low or high data word of a register access is latched in first. The AR8327 apparently requires the low data word be latched in first. Obtained from:Linux OpenWRT Modified: head/sys/dev/etherswitch/arswitch/arswitch_reg.c head/sys/dev/etherswitch/arswitch/arswitchvar.h Modified: head/sys/dev/etherswitch/arswitch/arswitch_reg.c == --- head/sys/dev/etherswitch/arswitch/arswitch_reg.cWed Feb 19 00:35:27 2014(r262199) +++ head/sys/dev/etherswitch/arswitch/arswitch_reg.cWed Feb 19 04:23:01 2014(r262200) @@ -172,10 +172,21 @@ arswitch_readreg(device_t dev, int addr) int arswitch_writereg(device_t dev, int addr, int value) { + struct arswitch_softc *sc; + int r; + + sc = device_get_softc(dev); /* XXX Check the first write too? */ - arswitch_writereg_msb(dev, addr, value); - return (arswitch_writereg_lsb(dev, addr, value)); + if (sc->mii_lo_first) { + r = arswitch_writereg_lsb(dev, addr, value); + r |= arswitch_writereg_msb(dev, addr, value); + } else { + r = arswitch_writereg_msb(dev, addr, value); + r |= arswitch_writereg_lsb(dev, addr, value); + } + + return r; } int Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h == --- head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Feb 19 00:35:27 2014(r262199) +++ head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Feb 19 04:23:01 2014(r262200) @@ -53,6 +53,7 @@ struct arswitch_softc { int is_mii; /* PHY mode is MII (XXX which PHY?) */ int page; int is_internal_switch; + int mii_lo_first; ar8x16_switch_type sc_switchtype; char*ifname[AR8X16_NUM_PHYS]; device_tmiibus[AR8X16_NUM_PHYS]; ___ 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: r262201 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Wed Feb 19 04:30:53 2014 New Revision: 262201 URL: http://svnweb.freebsd.org/changeset/base/262201 Log: Store away the chip version and revision; some AR8327 code depends upon the chip revision. Modified: head/sys/dev/etherswitch/arswitch/arswitch.c head/sys/dev/etherswitch/arswitch/arswitchvar.h Modified: head/sys/dev/etherswitch/arswitch/arswitch.c == --- head/sys/dev/etherswitch/arswitch/arswitch.cWed Feb 19 04:23:01 2014(r262200) +++ head/sys/dev/etherswitch/arswitch/arswitch.cWed Feb 19 04:30:53 2014(r262201) @@ -112,6 +112,8 @@ arswitch_probe(device_t dev) /* AR8xxx probe */ id = arswitch_readreg(dev, AR8X16_REG_MASK_CTRL); + sc->chip_rev = (id & AR8X16_MASK_CTRL_REV_MASK); + sc->chip_ver = (id & AR8X16_MASK_CTRL_VER_MASK) > AR8X16_MASK_CTRL_VER_SHIFT; switch (id & (AR8X16_MASK_CTRL_VER_MASK | AR8X16_MASK_CTRL_REV_MASK)) { case 0x0101: chipname = "AR8216"; Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h == --- head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Feb 19 04:23:01 2014(r262200) +++ head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Feb 19 04:30:53 2014(r262201) @@ -53,6 +53,8 @@ struct arswitch_softc { int is_mii; /* PHY mode is MII (XXX which PHY?) */ int page; int is_internal_switch; + int chip_ver; + int chip_rev; int mii_lo_first; ar8x16_switch_type sc_switchtype; char*ifname[AR8X16_NUM_PHYS]; ___ 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: r262202 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Wed Feb 19 05:09:47 2014 New Revision: 262202 URL: http://svnweb.freebsd.org/changeset/base/262202 Log: Add in the AR8327 probe/attach code and switch type. It detects fine, but (as expected) it won't attach just yet, let alone pass traffic. Tested: * DB120, AR8327 switch Modified: head/sys/dev/etherswitch/arswitch/arswitch.c head/sys/dev/etherswitch/arswitch/arswitchvar.h Modified: head/sys/dev/etherswitch/arswitch/arswitch.c == --- head/sys/dev/etherswitch/arswitch/arswitch.cWed Feb 19 04:30:53 2014(r262201) +++ head/sys/dev/etherswitch/arswitch/arswitch.cWed Feb 19 05:09:47 2014(r262202) @@ -129,6 +129,11 @@ arswitch_probe(device_t dev) chipname = "AR8316"; sc->sc_switchtype = AR8X16_SWITCH_AR8316; break; + case 0x1202: + chipname = "AR8327"; + sc->sc_switchtype = AR8X16_SWITCH_AR8327; + sc->mii_lo_first = 1; + break; default: chipname = NULL; } Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h == --- head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Feb 19 04:30:53 2014(r262201) +++ head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Feb 19 05:09:47 2014(r262202) @@ -35,6 +35,8 @@ typedef enum { AR8X16_SWITCH_AR8226, AR8X16_SWITCH_AR8316, AR8X16_SWITCH_AR9340, + AR8X16_SWITCH_AR8327, + AR8X16_SWITCH_AR8337, } ar8x16_switch_type; /* ___ 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: r262203 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Wed Feb 19 05:35:41 2014 New Revision: 262203 URL: http://svnweb.freebsd.org/changeset/base/262203 Log: Change arswitch_ports_init() to arswitch_port_init(), and teach it to take a single port to setup. This may end up later being used as part of some logic to program the PHY for a single port, rather than having to reinitialise them all at once. Tested: * DB120 Modified: head/sys/dev/etherswitch/arswitch/arswitch.c Modified: head/sys/dev/etherswitch/arswitch/arswitch.c == --- head/sys/dev/etherswitch/arswitch/arswitch.cWed Feb 19 05:09:47 2014(r262202) +++ head/sys/dev/etherswitch/arswitch/arswitch.cWed Feb 19 05:35:41 2014(r262203) @@ -224,24 +224,23 @@ arswitch_set_vlan_mode(struct arswitch_s } static void -arswitch_ports_init(struct arswitch_softc *sc) +arswitch_port_init(struct arswitch_softc *sc, int port) { - int port; /* Port0 - CPU */ - arswitch_writereg(sc->sc_dev, AR8X16_REG_PORT_STS(0), - (AR8X16_IS_SWITCH(sc, AR8216) ? - AR8X16_PORT_STS_SPEED_100 : AR8X16_PORT_STS_SPEED_1000) | - (AR8X16_IS_SWITCH(sc, AR8216) ? 0 : AR8X16_PORT_STS_RXFLOW) | - (AR8X16_IS_SWITCH(sc, AR8216) ? 0 : AR8X16_PORT_STS_TXFLOW) | - AR8X16_PORT_STS_RXMAC | - AR8X16_PORT_STS_TXMAC | - AR8X16_PORT_STS_DUPLEX); - arswitch_writereg(sc->sc_dev, AR8X16_REG_PORT_CTRL(0), - arswitch_readreg(sc->sc_dev, AR8X16_REG_PORT_CTRL(0)) & - ~AR8X16_PORT_CTRL_HEADER); - - for (port = 1; port <= sc->numphys; port++) { + if (port == AR8X16_PORT_CPU) { + arswitch_writereg(sc->sc_dev, AR8X16_REG_PORT_STS(0), + (AR8X16_IS_SWITCH(sc, AR8216) ? + AR8X16_PORT_STS_SPEED_100 : AR8X16_PORT_STS_SPEED_1000) | + (AR8X16_IS_SWITCH(sc, AR8216) ? 0 : AR8X16_PORT_STS_RXFLOW) | + (AR8X16_IS_SWITCH(sc, AR8216) ? 0 : AR8X16_PORT_STS_TXFLOW) | + AR8X16_PORT_STS_RXMAC | + AR8X16_PORT_STS_TXMAC | + AR8X16_PORT_STS_DUPLEX); + arswitch_writereg(sc->sc_dev, AR8X16_REG_PORT_CTRL(0), + arswitch_readreg(sc->sc_dev, AR8X16_REG_PORT_CTRL(0)) & + ~AR8X16_PORT_CTRL_HEADER); + } else { /* Set ports to auto negotiation. */ arswitch_writereg(sc->sc_dev, AR8X16_REG_PORT_STS(port), AR8X16_PORT_STS_LINK_AUTO); @@ -256,6 +255,7 @@ arswitch_attach(device_t dev) { struct arswitch_softc *sc; int err = 0; + int port; sc = device_get_softc(dev); @@ -319,7 +319,9 @@ arswitch_attach(device_t dev) return (err); /* Initialize the switch ports. */ - arswitch_ports_init(sc); + for (port = 0; port <= sc->numphys; port++) { + arswitch_port_init(sc, port); + } /* * Attach the PHYs and complete the bus enumeration. ___ 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: r262204 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Wed Feb 19 06:01:40 2014 New Revision: 262204 URL: http://svnweb.freebsd.org/changeset/base/262204 Log: Add a new method to set up the individual port in question. The AR8327 requires some different setup code. Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h == --- head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Feb 19 05:35:41 2014(r262203) +++ head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Feb 19 06:01:40 2014(r262204) @@ -70,8 +70,12 @@ struct arswitch_softc { uint32_tvlan_mode; struct { + /* Global setup */ int (* arswitch_hw_setup) (struct arswitch_softc *); int (* arswitch_hw_global_setup) (struct arswitch_softc *); + + /* Port functions */ + void (* arswitch_port_init) (struct arswitch_softc *, int); } hal; }; ___ 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: r262205 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Wed Feb 19 06:02:47 2014 New Revision: 262205 URL: http://svnweb.freebsd.org/changeset/base/262205 Log: Teach the PHY register path about the different MDIO bus address for the AR8327. Tested: * AR8327, DB120 Modified: head/sys/dev/etherswitch/arswitch/arswitch_phy.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_phy.c == --- head/sys/dev/etherswitch/arswitch/arswitch_phy.cWed Feb 19 06:01:40 2014(r262204) +++ head/sys/dev/etherswitch/arswitch/arswitch_phy.cWed Feb 19 06:02:47 2014(r262205) @@ -76,6 +76,7 @@ arswitch_readphy(device_t dev, int phy, struct arswitch_softc *sc; uint32_t data = 0, ctrl; int err, timeout; + uint32_t a; sc = device_get_softc(dev); ARSWITCH_LOCK_ASSERT(sc, MA_NOTOWNED); @@ -85,8 +86,13 @@ arswitch_readphy(device_t dev, int phy, if (reg < 0 || reg >= 32) return (ENXIO); + if (AR8X16_IS_SWITCH(sc, AR8327)) + a = AR8327_REG_MDIO_CTRL; + else + a = AR8X16_REG_MDIO_CTRL; + ARSWITCH_LOCK(sc); - err = arswitch_writereg_msb(dev, AR8X16_REG_MDIO_CTRL, + err = arswitch_writereg_msb(dev, a, AR8X16_MDIO_CTRL_BUSY | AR8X16_MDIO_CTRL_MASTER_EN | AR8X16_MDIO_CTRL_CMD_READ | (phy << AR8X16_MDIO_CTRL_PHY_ADDR_SHIFT) | @@ -95,13 +101,13 @@ arswitch_readphy(device_t dev, int phy, if (err != 0) goto fail; for (timeout = 100; timeout--; ) { - ctrl = arswitch_readreg_msb(dev, AR8X16_REG_MDIO_CTRL); + ctrl = arswitch_readreg_msb(dev, a); if ((ctrl & AR8X16_MDIO_CTRL_BUSY) == 0) break; } if (timeout < 0) goto fail; - data = arswitch_readreg_lsb(dev, AR8X16_REG_MDIO_CTRL) & + data = arswitch_readreg_lsb(dev, a) & AR8X16_MDIO_CTRL_DATA_MASK; ARSWITCH_UNLOCK(sc); return (data); @@ -117,6 +123,7 @@ arswitch_writephy(device_t dev, int phy, struct arswitch_softc *sc; uint32_t ctrl; int err, timeout; + uint32_t a; sc = device_get_softc(dev); ARSWITCH_LOCK_ASSERT(sc, MA_NOTOWNED); @@ -124,8 +131,13 @@ arswitch_writephy(device_t dev, int phy, if (reg < 0 || reg >= 32) return (ENXIO); + if (AR8X16_IS_SWITCH(sc, AR8327)) + a = AR8327_REG_MDIO_CTRL; + else + a = AR8X16_REG_MDIO_CTRL; + ARSWITCH_LOCK(sc); - err = arswitch_writereg(dev, AR8X16_REG_MDIO_CTRL, + err = arswitch_writereg(dev, a, AR8X16_MDIO_CTRL_BUSY | AR8X16_MDIO_CTRL_MASTER_EN | AR8X16_MDIO_CTRL_CMD_WRITE | @@ -135,7 +147,7 @@ arswitch_writephy(device_t dev, int phy, if (err != 0) goto out; for (timeout = 100; timeout--; ) { - ctrl = arswitch_readreg(dev, AR8X16_REG_MDIO_CTRL); + ctrl = arswitch_readreg(dev, a); if ((ctrl & AR8X16_MDIO_CTRL_BUSY) == 0) break; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r262206 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Wed Feb 19 06:03:58 2014 New Revision: 262206 URL: http://svnweb.freebsd.org/changeset/base/262206 Log: Turn the port init function into a HAL method and initialise it to the default port init code. This needs to be overridden for the AR8327. Modified: head/sys/dev/etherswitch/arswitch/arswitch.c Modified: head/sys/dev/etherswitch/arswitch/arswitch.c == --- head/sys/dev/etherswitch/arswitch/arswitch.cWed Feb 19 06:02:47 2014(r262205) +++ head/sys/dev/etherswitch/arswitch/arswitch.cWed Feb 19 06:03:58 2014(r262206) @@ -224,7 +224,7 @@ arswitch_set_vlan_mode(struct arswitch_s } static void -arswitch_port_init(struct arswitch_softc *sc, int port) +arswitch_port_init_8xxx(struct arswitch_softc *sc, int port) { /* Port0 - CPU */ @@ -266,6 +266,9 @@ arswitch_attach(device_t dev) strlcpy(sc->info.es_name, device_get_desc(dev), sizeof(sc->info.es_name)); + /* Default HAL methods */ + sc->hal.arswitch_port_init = arswitch_port_init_8xxx; + /* * Attach switch related functions */ @@ -320,7 +323,7 @@ arswitch_attach(device_t dev) /* Initialize the switch ports. */ for (port = 0; port <= sc->numphys; port++) { - arswitch_port_init(sc, port); + sc->hal.arswitch_port_init(sc, port); } /* @@ -459,8 +462,15 @@ arswitch_miipollstat(struct arswitch_sof if (sc->miibus[i] == NULL) continue; mii = device_get_softc(sc->miibus[i]); - portstatus = arswitch_readreg(sc->sc_dev, - AR8X16_REG_PORT_STS(arswitch_portforphy(i))); + /* XXX This would be nice to have abstracted out to be per-chip */ + /* AR8327/AR8337 has a different register base */ + if (AR8X16_IS_SWITCH(sc, AR8327)) + portstatus = arswitch_readreg(sc->sc_dev, + AR8327_REG_PORT_STATUS(arswitch_portforphy(i))); + else + portstatus = arswitch_readreg(sc->sc_dev, + AR8X16_REG_PORT_STS(arswitch_portforphy(i))); + #if 0 DPRINTF(sc->sc_dev, "p[%d]=%b\n", i, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r262207 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Wed Feb 19 06:35:17 2014 New Revision: 262207 URL: http://svnweb.freebsd.org/changeset/base/262207 Log: Add methods for the VLAN port set/get routines. The registers (and perhaps the flags) are different for the AR8327, so I'll stub those out until they're written. Tested: * DB120 - both on-chip AR9340 and AR8327 switches. Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h == --- head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Feb 19 06:03:58 2014(r262206) +++ head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Feb 19 06:35:17 2014(r262207) @@ -76,6 +76,12 @@ struct arswitch_softc { /* Port functions */ void (* arswitch_port_init) (struct arswitch_softc *, int); + + /* VLAN functions */ + int (* arswitch_port_vlan_setup) (struct arswitch_softc *, + etherswitch_port_t *); + int (* arswitch_port_vlan_get) (struct arswitch_softc *, + etherswitch_port_t *); } hal; }; ___ 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: r262208 - head/sys/dev/etherswitch/arswitch
Author: adrian Date: Wed Feb 19 06:43:52 2014 New Revision: 262208 URL: http://svnweb.freebsd.org/changeset/base/262208 Log: Extract out the port VLAN flags/setup code and throw it into two new HAL methods. This allows the AR8327 code to override it as appropriate. Tested: * DB120 - AR8327 and AR9340 on-board switch; only running 'etherswitchcfg' to check configs. The actual VLAN programming wasn't tested. Modified: head/sys/dev/etherswitch/arswitch/arswitch.c Modified: head/sys/dev/etherswitch/arswitch/arswitch.c == --- head/sys/dev/etherswitch/arswitch/arswitch.cWed Feb 19 06:35:17 2014(r262207) +++ head/sys/dev/etherswitch/arswitch/arswitch.cWed Feb 19 06:43:52 2014(r262208) @@ -80,6 +80,10 @@ static inline int arswitch_portforphy(in static void arswitch_tick(void *arg); static int arswitch_ifmedia_upd(struct ifnet *); static void arswitch_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static int ar8xxx_port_vlan_setup(struct arswitch_softc *sc, +etherswitch_port_t *p); +static int ar8xxx_port_vlan_get(struct arswitch_softc *sc, +etherswitch_port_t *p); static int arswitch_probe(device_t dev) @@ -224,7 +228,7 @@ arswitch_set_vlan_mode(struct arswitch_s } static void -arswitch_port_init_8xxx(struct arswitch_softc *sc, int port) +ar8xxx_port_init(struct arswitch_softc *sc, int port) { /* Port0 - CPU */ @@ -267,7 +271,9 @@ arswitch_attach(device_t dev) sizeof(sc->info.es_name)); /* Default HAL methods */ - sc->hal.arswitch_port_init = arswitch_port_init_8xxx; + sc->hal.arswitch_port_init = ar8xxx_port_init; + sc->hal.arswitch_port_vlan_setup = ar8xxx_port_vlan_setup; + sc->hal.arswitch_port_vlan_get = ar8xxx_port_vlan_get; /* * Attach switch related functions @@ -525,17 +531,9 @@ arswitch_getinfo(device_t dev) } static int -arswitch_getport(device_t dev, etherswitch_port_t *p) +ar8xxx_port_vlan_get(struct arswitch_softc *sc, etherswitch_port_t *p) { - struct arswitch_softc *sc; - struct ifmediareq *ifmr; - struct mii_data *mii; uint32_t reg; - int err; - - sc = device_get_softc(dev); - if (p->es_port < 0 || p->es_port > sc->numphys) - return (ENXIO); ARSWITCH_LOCK(sc); @@ -553,9 +551,29 @@ arswitch_getport(device_t dev, etherswit p->es_flags |= ETHERSWITCH_PORT_STRIPTAG; ARSWITCH_UNLOCK(sc); + return (0); +} + +static int +arswitch_getport(device_t dev, etherswitch_port_t *p) +{ + struct arswitch_softc *sc; + struct mii_data *mii; + struct ifmediareq *ifmr; + int err; + + sc = device_get_softc(dev); + if (p->es_port < 0 || p->es_port > sc->numphys) + return (ENXIO); + + err = sc->hal.arswitch_port_vlan_get(sc, p); + if (err != 0) + return (err); + mii = arswitch_miiforport(sc, p->es_port); - if (p->es_port == 0) { + if (p->es_port == AR8X16_PORT_CPU) { /* fill in fixed values for CPU port */ + /* XXX is this valid in all cases? */ p->es_flags |= ETHERSWITCH_PORT_CPU; ifmr = &p->es_ifmr; ifmr->ifm_count = 0; @@ -575,10 +593,47 @@ arswitch_getport(device_t dev, etherswit } static int +ar8xxx_port_vlan_setup(struct arswitch_softc *sc, etherswitch_port_t *p) +{ + uint32_t reg; + int err; + + ARSWITCH_LOCK(sc); + + /* Set the PVID. */ + if (p->es_pvid != 0) + arswitch_set_pvid(sc, p->es_port, p->es_pvid); + + /* Mutually exclusive. */ + if (p->es_flags & ETHERSWITCH_PORT_ADDTAG && + p->es_flags & ETHERSWITCH_PORT_STRIPTAG) { + ARSWITCH_UNLOCK(sc); + return (EINVAL); + } + + reg = 0; + if (p->es_flags & ETHERSWITCH_PORT_DOUBLE_TAG) + reg |= AR8X16_PORT_CTRL_DOUBLE_TAG; + if (p->es_flags & ETHERSWITCH_PORT_ADDTAG) + reg |= AR8X16_PORT_CTRL_EGRESS_VLAN_MODE_ADD << + AR8X16_PORT_CTRL_EGRESS_VLAN_MODE_SHIFT; + if (p->es_flags & ETHERSWITCH_PORT_STRIPTAG) + reg |= AR8X16_PORT_CTRL_EGRESS_VLAN_MODE_STRIP << + AR8X16_PORT_CTRL_EGRESS_VLAN_MODE_SHIFT; + + err = arswitch_modifyreg(sc->sc_dev, + AR8X16_REG_PORT_CTRL(p->es_port), + 0x3 << AR8X16_PORT_CTRL_EGRESS_VLAN_MODE_SHIFT | + AR8X16_PORT_CTRL_DOUBLE_TAG, reg); + + ARSWITCH_UNLOCK(sc); + return (err); +} + +static int arswitch_setport(device_t dev, etherswitch_port_t *p) { int err; - uint32_t reg; struct arswitch_softc *sc; struct ifmedia *ifm; struct mii_data *mii; @@ -590,38 +645,10 @@ arswitch_setport(device_t dev, etherswit /* Port flags. */ if (sc-
svn commit: r262209 - in head/kerberos5/lib: libasn1 libgssapi_spnego libhdb libhx509
Author: peter Date: Wed Feb 19 07:09:14 2014 New Revision: 262209 URL: http://svnweb.freebsd.org/changeset/base/262209 Log: Really (I think) fix the sporadic heimdal build failures with high -j levels. The root of the problem was that make was attempting to run up to three concurrent asn1_compile commands to produce the three outputs that it was declared to produce. The failure was caused when the asn1_compiles were started out of sync and a later one was truncating the files that another thread was trying to copy. In reality it is supposed to be run exactly once and all three outputs are produced in one pass. Use the same hack as for the parent's Makefile.inc for the compile_et multi-output rule. Modified: head/kerberos5/lib/libasn1/Makefile head/kerberos5/lib/libgssapi_spnego/Makefile head/kerberos5/lib/libhdb/Makefile head/kerberos5/lib/libhx509/Makefile Modified: head/kerberos5/lib/libasn1/Makefile == --- head/kerberos5/lib/libasn1/Makefile Wed Feb 19 06:43:52 2014 (r262208) +++ head/kerberos5/lib/libasn1/Makefile Wed Feb 19 07:09:14 2014 (r262209) @@ -56,10 +56,12 @@ INCS+= krb5_asn1.h \ digest_asn1.h \ kx509_asn1.h +.ORDER: ${GEN_CMS} ${GEN_CMS}: cms.asn1 cms.opt ${ASN1_COMPILE} --one-code-file \ --option-file=${.ALLSRC:M*.opt} ${.ALLSRC:M*.asn1} cms_asn1 +.ORDER: ${GEN_RFC2459} ${GEN_RFC2459}: rfc2459.asn1 ${ASN1_COMPILE} \ --one-code-file \ @@ -70,32 +72,39 @@ ${GEN_RFC2459}: rfc2459.asn1 --sequence=Extensions \ --sequence=CRLDistributionPoints ${.ALLSRC:M*.asn1} rfc2459_asn1 +.ORDER: ${GEN_K5} ${GEN_K5}: krb5.asn1 krb5.opt ${ASN1_COMPILE} \ --one-code-file \ --option-file=${.ALLSRC:M*.opt} \ ${.ALLSRC:M*.asn1} krb5_asn1 +.ORDER: ${GEN_PKINIT} ${GEN_PKINIT}: pkinit.asn1 ${ASN1_COMPILE} --one-code-file \ ${.ALLSRC:M*.asn1} pkinit_asn1 +.ORDER: ${GEN_PKCS8} ${GEN_PKCS8}: pkcs8.asn1 ${ASN1_COMPILE} --one-code-file \ ${.ALLSRC:M*.asn1} pkcs8_asn1 +.ORDER: ${GEN_PKCS9} ${GEN_PKCS9}: pkcs9.asn1 ${ASN1_COMPILE} --one-code-file \ ${.ALLSRC:M*.asn1} pkcs9_asn1 +.ORDER: ${GEN_PKCS12} ${GEN_PKCS12}: pkcs12.asn1 ${ASN1_COMPILE} --one-code-file \ ${.ALLSRC:M*.asn1} pkcs12_asn1 +.ORDER: ${GEN_DIGEST} ${GEN_DIGEST}: digest.asn1 ${ASN1_COMPILE} --one-code-file \ ${.ALLSRC:M*.asn1} digest_asn1 +.ORDER: ${GEN_KX509} ${GEN_KX509}: kx509.asn1 ${ASN1_COMPILE} --one-code-file \ ${.ALLSRC:M*.asn1} kx509_asn1 Modified: head/kerberos5/lib/libgssapi_spnego/Makefile == --- head/kerberos5/lib/libgssapi_spnego/MakefileWed Feb 19 06:43:52 2014(r262208) +++ head/kerberos5/lib/libgssapi_spnego/MakefileWed Feb 19 07:09:14 2014(r262209) @@ -38,6 +38,7 @@ CFLAGS+=-I${KRB5DIR}/lib/roken -I. CLEANFILES=${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} \ spnego_asn1_files spnego_asn1-template.c +.ORDER: ${GEN} ${GEN}: spnego.asn1 spnego.opt ${ASN1_COMPILE} --option-file=${.ALLSRC:M*.opt} \ ${.ALLSRC:M*.asn1} spnego_asn1 Modified: head/kerberos5/lib/libhdb/Makefile == --- head/kerberos5/lib/libhdb/Makefile Wed Feb 19 06:43:52 2014 (r262208) +++ head/kerberos5/lib/libhdb/Makefile Wed Feb 19 07:09:14 2014 (r262209) @@ -84,6 +84,7 @@ GEN= asn1_Salt.x \ CLEANFILES=${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} hdb_asn1_files \ hdb_asn1-template.[ch]* +.ORDER: ${GEN} ${GEN}: hdb.asn1 ${ASN1_COMPILE} ${.ALLSRC:M*.asn1} hdb_asn1 Modified: head/kerberos5/lib/libhx509/Makefile == --- head/kerberos5/lib/libhx509/MakefileWed Feb 19 06:43:52 2014 (r262208) +++ head/kerberos5/lib/libhx509/MakefileWed Feb 19 07:09:14 2014 (r262209) @@ -269,14 +269,17 @@ CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx INCS+= ocsp_asn1.h pkcs10_asn1.h crmf_asn1.h +.ORDER: ${GEN_OSCP} ${GEN_OCSP}: ocsp.asn1 ocsp.opt ${ASN1_COMPILE} --option-file=${.ALLSRC:M*.opt} \ ${.ALLSRC:M*.asn1} ocsp_asn1 +.ORDER: ${GEN_PKCS10} ${GEN_PKCS10}: pkcs10.asn1 pkcs10.opt ${ASN1_COMPILE} --option-file=${.ALLSRC:M*.opt} \ ${.ALLSRC:M*.asn1} pkcs10_asn1 +.ORDER: ${GEN_CRMF} ${GEN_CRMF}: crmf.asn1 ${ASN1_COMPILE} ${.ALLSRC:M*.asn1} crmf_asn1 ___ 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..
svn commit: r262210 - in stable: 10/sys/netpfil/ipfw 9/sys/netpfil/ipfw
Author: dim Date: Wed Feb 19 07:51:58 2014 New Revision: 262210 URL: http://svnweb.freebsd.org/changeset/base/262210 Log: MFC r261915: Under sys/netpfil/ipfw, surround two IPv6-specific static functions with #ifdef INET6, since they are unused when INET6 is disabled. Modified: stable/10/sys/netpfil/ipfw/ip_fw_dynamic.c stable/10/sys/netpfil/ipfw/ip_fw_table.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c stable/9/sys/netpfil/ipfw/ip_fw_table.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/netpfil/ipfw/ip_fw_dynamic.c == --- stable/10/sys/netpfil/ipfw/ip_fw_dynamic.c Wed Feb 19 07:09:14 2014 (r262209) +++ stable/10/sys/netpfil/ipfw/ip_fw_dynamic.c Wed Feb 19 07:51:58 2014 (r262210) @@ -231,6 +231,7 @@ SYSEND #endif /* SYSCTL_NODE */ +#ifdef INET6 static __inline int hash_packet6(struct ipfw_flow_id *id) { @@ -242,6 +243,7 @@ hash_packet6(struct ipfw_flow_id *id) (id->dst_port) ^ (id->src_port); return i; } +#endif /* * IMPORTANT: the hash function for dynamic rules must be commutative Modified: stable/10/sys/netpfil/ipfw/ip_fw_table.c == --- stable/10/sys/netpfil/ipfw/ip_fw_table.cWed Feb 19 07:09:14 2014 (r262209) +++ stable/10/sys/netpfil/ipfw/ip_fw_table.cWed Feb 19 07:51:58 2014 (r262210) @@ -123,6 +123,7 @@ struct table_xentry { #define OFF_LEN_IFACE (8 * offsetof(struct xaddr_iface, ifname)) +#ifdef INET6 static inline void ipv6_writemask(struct in6_addr *addr6, uint8_t mask) { @@ -132,6 +133,7 @@ ipv6_writemask(struct in6_addr *addr6, u *cp++ = 0x; *cp = htonl(mask ? ~((1 << (32 - mask)) - 1) : 0); } +#endif int ipfw_add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, void *paddr, ___ 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: r262210 - in stable: 10/sys/netpfil/ipfw 9/sys/netpfil/ipfw
Author: dim Date: Wed Feb 19 07:51:58 2014 New Revision: 262210 URL: http://svnweb.freebsd.org/changeset/base/262210 Log: MFC r261915: Under sys/netpfil/ipfw, surround two IPv6-specific static functions with #ifdef INET6, since they are unused when INET6 is disabled. Modified: stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c stable/9/sys/netpfil/ipfw/ip_fw_table.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/netpfil/ipfw/ip_fw_dynamic.c stable/10/sys/netpfil/ipfw/ip_fw_table.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c == --- stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c Wed Feb 19 07:09:14 2014 (r262209) +++ stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c Wed Feb 19 07:51:58 2014 (r262210) @@ -231,6 +231,7 @@ SYSEND #endif /* SYSCTL_NODE */ +#ifdef INET6 static __inline int hash_packet6(struct ipfw_flow_id *id) { @@ -242,6 +243,7 @@ hash_packet6(struct ipfw_flow_id *id) (id->dst_port) ^ (id->src_port); return i; } +#endif /* * IMPORTANT: the hash function for dynamic rules must be commutative Modified: stable/9/sys/netpfil/ipfw/ip_fw_table.c == --- stable/9/sys/netpfil/ipfw/ip_fw_table.c Wed Feb 19 07:09:14 2014 (r262209) +++ stable/9/sys/netpfil/ipfw/ip_fw_table.c Wed Feb 19 07:51:58 2014 (r262210) @@ -123,6 +123,7 @@ struct table_xentry { #define OFF_LEN_IFACE (8 * offsetof(struct xaddr_iface, ifname)) +#ifdef INET6 static inline void ipv6_writemask(struct in6_addr *addr6, uint8_t mask) { @@ -132,6 +133,7 @@ ipv6_writemask(struct in6_addr *addr6, u *cp++ = 0x; *cp = htonl(mask ? ~((1 << (32 - mask)) - 1) : 0); } +#endif int ipfw_add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, void *paddr, ___ 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: r262211 - stable/10/sys/fs/nandfs
Author: dim Date: Wed Feb 19 07:55:28 2014 New Revision: 262211 URL: http://svnweb.freebsd.org/changeset/base/262211 Log: MFC r261914: In sys/fs/nandfs/nandfs_vfsops.c, #if 0 an unused static function. Modified: stable/10/sys/fs/nandfs/nandfs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nandfs/nandfs_vfsops.c == --- stable/10/sys/fs/nandfs/nandfs_vfsops.c Wed Feb 19 07:51:58 2014 (r262210) +++ stable/10/sys/fs/nandfs/nandfs_vfsops.c Wed Feb 19 07:55:28 2014 (r262211) @@ -285,6 +285,7 @@ nandfs_sblocks_in_block(struct nandfs_de return (fsdev->nd_devblocksize / sizeof(struct nandfs_super_block)); } +#if 0 static __inline int nandfs_sblocks_in_first_block(struct nandfs_device *fsdev) { @@ -297,6 +298,7 @@ nandfs_sblocks_in_first_block(struct nan return (n); } +#endif static int nandfs_write_superblock_at(struct nandfs_device *fsdev, ___ 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"