Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc
please mark this in src/UPDATING, maybe bump freebsd_version too? On Sun, Apr 17, 2011 at 09:03:23PM +, Dimitry Andric wrote: > Author: dim > Date: Sun Apr 17 21:03:23 2011 > New Revision: 220755 > URL: http://svn.freebsd.org/changeset/base/220755 > > Log: > Remove libobjc and other Objective-C related components, as these are > extremely outdated, and not used by anything in the base system. > > Silence from: current@ > > Deleted: > head/contrib/gcc/doc/objc.texi > head/contrib/gcc/objc/ > head/contrib/libobjc/ > head/gnu/lib/libobjc/ > head/gnu/usr.bin/cc/cc1obj/ > Modified: > head/Makefile.inc1 > head/ObsoleteFiles.inc > head/contrib/gcc/doc/cpp.1 > head/contrib/gcc/doc/cpp.texi > head/contrib/gcc/doc/cppenv.texi > head/contrib/gcc/doc/cppinternals.texi > head/contrib/gcc/doc/cppopts.texi > head/contrib/gcc/doc/extend.texi > head/contrib/gcc/doc/frontends.texi > head/contrib/gcc/doc/gcc.1 > head/contrib/gcc/doc/gcc.texi > head/contrib/gcc/doc/invoke.texi > head/contrib/gcc/doc/sourcebuild.texi > head/contrib/gcc/doc/standards.texi > head/contrib/gcc/doc/tm.texi > head/etc/mtree/BSD.include.dist > head/gnu/lib/Makefile > head/gnu/usr.bin/cc/Makefile > head/gnu/usr.bin/cc/cc_tools/Makefile > head/gnu/usr.bin/cc/doc/Makefile > head/share/mk/bsd.dep.mk > head/share/mk/bsd.lib.mk > head/share/mk/bsd.libnames.mk > head/share/mk/bsd.own.mk > head/share/mk/bsd.prog.mk > > Modified: head/Makefile.inc1 > == > --- head/Makefile.inc1Sun Apr 17 20:44:02 2011(r220754) > +++ head/Makefile.inc1Sun Apr 17 21:03:23 2011(r220755) > @@ -306,7 +306,6 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR > PATH=${TMPPATH} \ > CC="${CC} ${LIB32FLAGS}" \ > CXX="${CXX} ${LIB32FLAGS}" \ > - OBJC="${OBJC} ${LIB32FLAGS}" \ > LIBDIR=/usr/lib32 \ > SHLIBDIR=/usr/lib32 > > > Modified: head/ObsoleteFiles.inc > == > --- head/ObsoleteFiles.incSun Apr 17 20:44:02 2011(r220754) > +++ head/ObsoleteFiles.incSun Apr 17 21:03:23 2011(r220755) > @@ -38,6 +38,26 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20110417: removal of Objective-C support > +OLD_FILES+=usr/include/objc/encoding.h > +OLD_FILES+=usr/include/objc/hash.h > +OLD_FILES+=usr/include/objc/NXConstStr.h > +OLD_FILES+=usr/include/objc/objc-api.h > +OLD_FILES+=usr/include/objc/objc-decls.h > +OLD_FILES+=usr/include/objc/objc-list.h > +OLD_FILES+=usr/include/objc/objc.h > +OLD_FILES+=usr/include/objc/Object.h > +OLD_FILES+=usr/include/objc/Protocol.h > +OLD_FILES+=usr/include/objc/runtime.h > +OLD_FILES+=usr/include/objc/sarray.h > +OLD_FILES+=usr/include/objc/thr.h > +OLD_FILES+=usr/include/objc/typedstream.h > +OLD_FILES+=usr/lib/libobjc.a > +OLD_FILES+=usr/lib/libobjc.so > +OLD_FILES+=usr/lib/libobjc_p.a > +OLD_FILES+=usr/libexec/cc1obj > +OLD_LIBS+=usr/lib/libobjc.so.4 > +OLD_DIRS+=usr/include/objc > # 20110224: sticky.8 -> sticky.7 > OLD_FILES+=usr/share/man/man8/sticky.8.gz > # 20110220: new clang import which bumps version from 2.8 to 2.9 > > Modified: head/contrib/gcc/doc/cpp.1 > == > --- head/contrib/gcc/doc/cpp.1Sun Apr 17 20:44:02 2011 > (r220754) > +++ head/contrib/gcc/doc/cpp.1Sun Apr 17 21:03:23 2011 > (r220755) > @@ -153,14 +153,14 @@ before compilation. It is called a macr > you to define \fImacros\fR, which are brief abbreviations for longer > constructs. > .PP > -The C preprocessor is intended to be used only with C, \*(C+, and > -Objective-C source code. In the past, it has been abused as a general > -text processor. It will choke on input which does not obey C's lexical > -rules. For example, apostrophes will be interpreted as the beginning of > -character constants, and cause errors. Also, you cannot rely on it > -preserving characteristics of the input which are not significant to > -C\-family languages. If a Makefile is preprocessed, all the hard tabs > -will be removed, and the Makefile will not work. > +The C preprocessor is intended to be used only with C and \*(C+ source > +code. In the past, it has been abused as a general text processor. It > +will choke on input which does not obey C's lexical rules. For > +example, apostrophes will be interpreted as the beginning of character > +constants, and cause errors. Also, you cannot rely on it preserving > +characteristics of the input which are not significant to C\-family > +languages. If a Makefile is preprocessed, all the hard tabs will be > +removed, and the Makefile will not work. > .PP > Having said that, you can often get away with using cpp on things which > are not C. Other Algol-ish programming langu
Re: svn commit: r220761 - head/sys/fs/nfsclient
On Sun, Apr 17, 2011 at 11:04:04PM +, Rick Macklem wrote: > Author: rmacklem > Date: Sun Apr 17 23:04:03 2011 > New Revision: 220761 > URL: http://svn.freebsd.org/changeset/base/220761 > > Log: > Add checks for MNTK_UNMOUNTF at the beginning of three > functions, so that threads don't get stuck in them during > a forced dismount. nfs_sync/VFS_SYNC() needs this, since it is > called by dounmount() before VFS_UNMOUNT(). The nfscl_nget() > case makes sure that a thread doing an VOP_OPEN() or > VOP_ADVLOCK() call doesn't get blocked before attempting > the RPC. Attempting RPCs don't block, since they all > fail once a forced dismount is in progress. > The third one at the beginning of nfsrpc_close() > is done so threads don't get blocked while doing VOP_INACTIVE() > as the vnodes are cleared out. > With these three changes plus a change to the umount(1) > command so that it doesn't do "sync()" for the forced case > seem to make forced dismounts work for the experimental NFS > client. > > MFC after: 2 weeks > > Modified: > head/sys/fs/nfsclient/nfs_clrpcops.c > head/sys/fs/nfsclient/nfs_clstate.c > head/sys/fs/nfsclient/nfs_clvfsops.c > > Modified: head/sys/fs/nfsclient/nfs_clrpcops.c > == > --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 17 22:31:36 2011 > (r220760) > +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 17 23:04:03 2011 > (r220761) > @@ -567,6 +567,11 @@ nfsrpc_close(vnode_t vp, int doclose, NF > > if (vnode_vtype(vp) != VREG) > return (0); > + > + /* For forced unmounts, just return. */ > + if ((vp->v_mount->mnt_kern_flag & MNTK_UNMOUNTF) != 0) > + return (0); > + Is there anything that would prevent the MNTK_UNMOUNTF flag from being set immediately after the test returned success ? Usually, the tests for MNTK_UNMOUNTF are bugs. I coould see how terminating the RPCs would be useful for forced unmounts, but do not think that preventing entry into close would help. > if (doclose) > error = nfscl_doclose(vp, &clp, p); > else > pgp9Tkr81BCJh.pgp Description: PGP signature
svn commit: r220765 - stable/8/lib/libdevstat
Author: pluknet Date: Mon Apr 18 08:49:25 2011 New Revision: 220765 URL: http://svn.freebsd.org/changeset/base/220765 Log: MFC r220319: Do not increment num_args if strsep(3) returned an empty field. That fixes devstat_buildmatch(3) crashes with certain strings. Reported by: arundel Modified: stable/8/lib/libdevstat/devstat.c Directory Properties: stable/8/lib/libdevstat/ (props changed) Modified: stable/8/lib/libdevstat/devstat.c == --- stable/8/lib/libdevstat/devstat.c Mon Apr 18 01:02:43 2011 (r220764) +++ stable/8/lib/libdevstat/devstat.c Mon Apr 18 08:49:25 2011 (r220765) @@ -1014,11 +1014,12 @@ devstat_buildmatch(char *match_str, stru * Break the (comma delimited) input string out into separate strings. */ for (tempstr = tstr, num_args = 0; -(*tempstr = strsep(&match_str, ",")) != NULL && (num_args < 5); -num_args++) - if (**tempstr != '\0') +(*tempstr = strsep(&match_str, ",")) != NULL && (num_args < 5);) + if (**tempstr != '\0') { + num_args++; if (++tempstr >= &tstr[5]) break; + } /* The user gave us too many type arguments */ if (num_args > 3) { ___ 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: r220766 - stable/7/lib/libdevstat
Author: pluknet Date: Mon Apr 18 08:53:22 2011 New Revision: 220766 URL: http://svn.freebsd.org/changeset/base/220766 Log: MFC r220319: Do not increment num_args if strsep(3) returned an empty field. That fixes devstat_buildmatch(3) crashes with certain strings. Reported by: arundel Modified: stable/7/lib/libdevstat/devstat.c Directory Properties: stable/7/lib/libdevstat/ (props changed) Modified: stable/7/lib/libdevstat/devstat.c == --- stable/7/lib/libdevstat/devstat.c Mon Apr 18 08:49:25 2011 (r220765) +++ stable/7/lib/libdevstat/devstat.c Mon Apr 18 08:53:22 2011 (r220766) @@ -1014,11 +1014,12 @@ devstat_buildmatch(char *match_str, stru * Break the (comma delimited) input string out into separate strings. */ for (tempstr = tstr, num_args = 0; -(*tempstr = strsep(&match_str, ",")) != NULL && (num_args < 5); -num_args++) - if (**tempstr != '\0') +(*tempstr = strsep(&match_str, ",")) != NULL && (num_args < 5);) + if (**tempstr != '\0') { + num_args++; if (++tempstr >= &tstr[5]) break; + } /* The user gave us too many type arguments */ if (num_args > 3) { ___ 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: r220767 - head/sys/netgraph
Author: ae Date: Mon Apr 18 09:10:27 2011 New Revision: 220767 URL: http://svn.freebsd.org/changeset/base/220767 Log: Use M_WAITOK flag instead M_WAIT for malloc. Suggested by: glebius MFC after:1 week Modified: head/sys/netgraph/ng_patch.c Modified: head/sys/netgraph/ng_patch.c == --- head/sys/netgraph/ng_patch.cMon Apr 18 08:53:22 2011 (r220766) +++ head/sys/netgraph/ng_patch.cMon Apr 18 09:10:27 2011 (r220767) @@ -165,7 +165,7 @@ ng_patch_constructor(node_p node) { priv_p privdata; - privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAIT | M_ZERO); + privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, privdata); privdata->in = NULL; privdata->out = NULL; @@ -208,7 +208,8 @@ ng_patch_rcvmsg(node_p node, item_p item if (privp->config == NULL) break; NG_MKRESPONSE(resp, msg, - NG_PATCH_CONF_SIZE(privp->config->count), M_WAIT); + NG_PATCH_CONF_SIZE(privp->config->count), + M_WAITOK); bcopy(privp->config, resp->data, NG_PATCH_CONF_SIZE(privp->config->count)); break; @@ -248,10 +249,10 @@ ng_patch_rcvmsg(node_p node, item_p item if (error == 0) { newconf = malloc( NG_PATCH_CONF_SIZE(conf->count), - M_NETGRAPH, M_WAIT); + M_NETGRAPH, M_WAITOK); newval = malloc(conf->count * sizeof(union patch_val), M_NETGRAPH, - M_WAIT); + M_WAITOK); for(i = 0; i < conf->count; i++) { switch (conf->ops[i].length) { case 1: @@ -288,7 +289,7 @@ ng_patch_rcvmsg(node_p node, item_p item /* FALLTHROUGH */ case NGM_PATCH_GET_STATS: NG_MKRESPONSE(resp, msg, sizeof(struct ng_patch_stats), - M_WAIT); + M_WAITOK); bcopy(&(privp->stats), resp->data, sizeof(struct ng_patch_stats)); if (clear == 0) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r220768 - in head/sys/netgraph: . atm/ccatm atm/sscfu atm/sscop atm/uni bluetooth/hci bluetooth/l2cap netflow
Author: glebius Date: Mon Apr 18 09:12:27 2011 New Revision: 220768 URL: http://svn.freebsd.org/changeset/base/220768 Log: Node constructor methods are supposed to be called in syscall context always. Convert nodes to consistently use M_WAITOK flag for memory allocation. Reviewed by: julian Modified: head/sys/netgraph/atm/ccatm/ng_ccatm.c head/sys/netgraph/atm/sscfu/ng_sscfu.c head/sys/netgraph/atm/sscop/ng_sscop.c head/sys/netgraph/atm/uni/ng_uni.c head/sys/netgraph/bluetooth/hci/ng_hci_main.c head/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netgraph/ng_UI.c head/sys/netgraph/ng_async.c head/sys/netgraph/ng_atmllc.c head/sys/netgraph/ng_bridge.c head/sys/netgraph/ng_car.c head/sys/netgraph/ng_cisco.c head/sys/netgraph/ng_device.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_etf.c head/sys/netgraph/ng_fec.c head/sys/netgraph/ng_frame_relay.c head/sys/netgraph/ng_gif_demux.c head/sys/netgraph/ng_hub.c head/sys/netgraph/ng_iface.c head/sys/netgraph/ng_ksocket.c head/sys/netgraph/ng_l2tp.c head/sys/netgraph/ng_lmi.c head/sys/netgraph/ng_mppc.c head/sys/netgraph/ng_nat.c head/sys/netgraph/ng_one2many.c head/sys/netgraph/ng_pipe.c head/sys/netgraph/ng_ppp.c head/sys/netgraph/ng_pppoe.c head/sys/netgraph/ng_pptpgre.c head/sys/netgraph/ng_rfc1490.c head/sys/netgraph/ng_sample.c head/sys/netgraph/ng_source.c head/sys/netgraph/ng_split.c head/sys/netgraph/ng_sppp.c head/sys/netgraph/ng_tee.c head/sys/netgraph/ng_tty.c head/sys/netgraph/ng_vjc.c head/sys/netgraph/ng_vlan.c Modified: head/sys/netgraph/atm/ccatm/ng_ccatm.c == --- head/sys/netgraph/atm/ccatm/ng_ccatm.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/atm/ccatm/ng_ccatm.c Mon Apr 18 09:12:27 2011 (r220768) @@ -348,9 +348,7 @@ ng_ccatm_constructor(node_p node) { struct ccnode *priv; - priv = malloc(sizeof(*priv), M_NG_CCATM, M_NOWAIT | M_ZERO); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NG_CCATM, M_WAITOK | M_ZERO); priv->node = node; priv->data = cc_create(&cc_funcs); Modified: head/sys/netgraph/atm/sscfu/ng_sscfu.c == --- head/sys/netgraph/atm/sscfu/ng_sscfu.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/atm/sscfu/ng_sscfu.c Mon Apr 18 09:12:27 2011 (r220768) @@ -538,8 +538,7 @@ ng_sscfu_constructor(node_p node) { struct priv *priv; - if ((priv = malloc(sizeof(*priv), M_NG_SSCFU, M_NOWAIT|M_ZERO)) == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NG_SSCFU, M_WAITOK | M_ZERO); if ((priv->sscf = sscfu_create(node, &sscfu_funcs)) == NULL) { free(priv, M_NG_SSCFU); Modified: head/sys/netgraph/atm/sscop/ng_sscop.c == --- head/sys/netgraph/atm/sscop/ng_sscop.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/atm/sscop/ng_sscop.c Mon Apr 18 09:12:27 2011 (r220768) @@ -246,8 +246,7 @@ ng_sscop_constructor(node_p node) { struct priv *p; - if ((p = malloc(sizeof(*p), M_NG_SSCOP, M_NOWAIT | M_ZERO)) == NULL) - return (ENOMEM); + p = malloc(sizeof(*p), M_NG_SSCOP, M_WAITOK | M_ZERO); if ((p->sscop = sscop_create(node, &sscop_funcs)) == NULL) { free(p, M_NG_SSCOP); Modified: head/sys/netgraph/atm/uni/ng_uni.c == --- head/sys/netgraph/atm/uni/ng_uni.c Mon Apr 18 09:10:27 2011 (r220767) +++ head/sys/netgraph/atm/uni/ng_uni.c Mon Apr 18 09:12:27 2011 (r220768) @@ -223,8 +223,7 @@ ng_uni_constructor(node_p node) { struct priv *priv; - if ((priv = malloc(sizeof(*priv), M_NG_UNI, M_NOWAIT | M_ZERO)) == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NG_UNI, M_WAITOK | M_ZERO); if ((priv->uni = uni_create(node, &uni_funcs)) == NULL) { free(priv, M_NG_UNI); Modified: head/sys/netgraph/bluetooth/hci/ng_hci_main.c == --- head/sys/netgraph/bluetooth/hci/ng_hci_main.c Mon Apr 18 09:10:27 2011(r220767) +++ head/sys/netgraph/bluetooth/hci/ng_hci_main.c Mon Apr 18 09:12:27 2011(r220768) @@ -109,10 +109,7 @@ ng_hci_constructor(node_p node) { ng_hci_unit_p unit = NULL; - unit = malloc(sizeof(*unit), M_NETGRAPH_HCI, - M_NOWAIT | M_ZERO); - if (unit == NULL) - return (ENOMEM); + unit = malloc(sizeof(*unit), M_NETGRAPH_HCI, M_WAITOK | M_ZERO); unit
svn commit: r220769 - head/sys/netgraph/netflow
Author: glebius Date: Mon Apr 18 09:14:23 2011 New Revision: 220769 URL: http://svn.freebsd.org/changeset/base/220769 Log: ng_netflow_cache_init() can be void. Modified: head/sys/netgraph/netflow/netflow.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netgraph/netflow/ng_netflow.h Modified: head/sys/netgraph/netflow/netflow.c == --- head/sys/netgraph/netflow/netflow.c Mon Apr 18 09:12:27 2011 (r220768) +++ head/sys/netgraph/netflow/netflow.c Mon Apr 18 09:14:23 2011 (r220769) @@ -503,7 +503,7 @@ hash6_insert(priv_p priv, struct flow6_h */ /* Allocate memory and set up flow cache */ -int +void ng_netflow_cache_init(priv_p priv) { struct flow_hash_entry *hsh; @@ -546,8 +546,6 @@ ng_netflow_cache_init(priv_p priv) ng_netflow_v9_cache_init(priv); CTR0(KTR_NET, "ng_netflow startup()"); - - return (0); } /* Initialize new FIB table for v5 and v9 */ Modified: head/sys/netgraph/netflow/ng_netflow.c == --- head/sys/netgraph/netflow/ng_netflow.c Mon Apr 18 09:12:27 2011 (r220768) +++ head/sys/netgraph/netflow/ng_netflow.c Mon Apr 18 09:14:23 2011 (r220769) @@ -220,7 +220,7 @@ static int ng_netflow_constructor(node_p node) { priv_p priv; - int error = 0, i; + int i; /* Initialize private data */ priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); @@ -241,8 +241,7 @@ ng_netflow_constructor(node_p node) callout_init(&priv->exp_callout, CALLOUT_MPSAFE); /* Allocate memory and set up flow cache */ - if ((error = ng_netflow_cache_init(priv))) - return (error); + ng_netflow_cache_init(priv); return (0); } Modified: head/sys/netgraph/netflow/ng_netflow.h == --- head/sys/netgraph/netflow/ng_netflow.h Mon Apr 18 09:12:27 2011 (r220768) +++ head/sys/netgraph/netflow/ng_netflow.h Mon Apr 18 09:14:23 2011 (r220769) @@ -458,7 +458,7 @@ struct flow6_hash_entry { ((t) << 3))/* 8 */ /* Prototypes for netflow.c */ -intng_netflow_cache_init(priv_p); +void ng_netflow_cache_init(priv_p); void ng_netflow_cache_flush(priv_p); intng_netflow_fib_init(priv_p priv, int fib); void ng_netflow_copyinfo(priv_p, struct ng_netflow_info *); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220653 - in head/sys: . arm/mv/orion boot/fdt/dts
On Fri, Apr 15, 2011 at 01:37:43PM +, Philip Paeps wrote: P> Author: philip P> Date: Fri Apr 15 13:37:43 2011 P> New Revision: 220653 P> URL: http://svn.freebsd.org/changeset/base/220653 P> P> Log: P> Add basic support for the Marvell Orion TS-7800. P> P> Submitted by: Kristof Provost P> P> Added: P> head/sys/arm/mv/orion/files.ts7800 (contents, props changed) P> head/sys/arm/mv/orion/std.ts7800 (contents, props changed) P> head/sys/boot/fdt/dts/ts7800.dts (contents, props changed) P> head/sys/files.ts7800 (contents, props changed) ^ Should this be in the root of kernel sources? -- Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220653 - in head/sys: . arm/mv/orion boot/fdt/dts
On 2011-04-18 13:17:22 (+0400), Gleb Smirnoff wrote: > On Fri, Apr 15, 2011 at 01:37:43PM +, Philip Paeps wrote: > P> Author: philip > P> Date: Fri Apr 15 13:37:43 2011 > P> New Revision: 220653 > P> URL: http://svn.freebsd.org/changeset/base/220653 > P> > P> Log: > P> Add basic support for the Marvell Orion TS-7800. > P> > P> Submitted by:Kristof Provost > P> > P> Added: > P> head/sys/arm/mv/orion/files.ts7800 (contents, props changed) > P> head/sys/arm/mv/orion/std.ts7800 (contents, props changed) > P> head/sys/boot/fdt/dts/ts7800.dts (contents, props changed) > P> head/sys/files.ts7800 (contents, props changed) > ^ > > Should this be in the root of kernel sources? > No, it shouldn't. It belongs in sys/arm/mv/orion/. I suspect something went wrong with the conversion of the patch. It seems to have beed added twice. I shall hold Philips beer hostage until this is fixed. Regards, Kristof ___ 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: r220770 - in head: . sys/sys
Author: dim Date: Mon Apr 18 10:25:54 2011 New Revision: 220770 URL: http://svn.freebsd.org/changeset/base/220770 Log: After removing libobjc and other Objective-C components in r220755, belatedly bump __FreeBSD_version, and add a note to UPDATING. Reminded by: rdivacky Modified: head/UPDATING head/sys/sys/param.h Modified: head/UPDATING == --- head/UPDATING Mon Apr 18 09:14:23 2011(r220769) +++ head/UPDATING Mon Apr 18 10:25:54 2011(r220770) @@ -22,6 +22,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20110418: + The GNU Objective-C runtime library (libobjc), and other Objective-C + related components have been removed from the base system. If you + require an Objective-C library, please use one of the available ports. + 20110331: ath(4) has been split into bus- and device- modules. if_ath contains the HAL, the TX rate control and the network device code. if_ath_pci Modified: head/sys/sys/param.h == --- head/sys/sys/param.hMon Apr 18 09:14:23 2011(r220769) +++ head/sys/sys/param.hMon Apr 18 10:25:54 2011(r220770) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900035 /* Master, propagated to newvers */ +#define __FreeBSD_version 900036 /* Master, propagated to newvers */ #ifdef _KERNEL #defineP_OSREL_SIGSEGV 74 ___ 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: r220771 - stable/8/sys/dev/usb/storage
Author: mav Date: Mon Apr 18 11:25:13 2011 New Revision: 220771 URL: http://svn.freebsd.org/changeset/base/220771 Log: Rework change made at r203146. Instead of reporting all wire errors as SCSI status errors to CAM (that was wrong, as it too often turned retriable wire errors into non-retriable REQUEST SENSE errors), do it only for STALL errors on control pipe of the CBI devices. STALL on control pipe is just a one of the ways to report error for CBI devices. PR: usb/150401, usb/154593. Reviewed by: hselasky Modified: stable/8/sys/dev/usb/storage/umass.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/storage/umass.c == --- stable/8/sys/dev/usb/storage/umass.cMon Apr 18 10:25:54 2011 (r220770) +++ stable/8/sys/dev/usb/storage/umass.cMon Apr 18 11:25:13 2011 (r220771) @@ -1850,9 +1850,23 @@ umass_t_cbi_command_callback(struct usb_ break; default:/* Error */ - umass_tr_error(xfer, error); - /* skip reset */ - sc->sc_last_xfer_index = UMASS_T_CBI_COMMAND; + /* +* STALL on the control pipe can be result of the command error. +* Attempt to clear this STALL same as for bulk pipe also +* results in command completion interrupt, but ASC/ASCQ there +* look like not always valid, so don't bother about it. +*/ + if ((error == USB_ERR_STALLED) || + (sc->sc_transfer.callback == &umass_cam_cb)) { + sc->sc_transfer.ccb = NULL; + (sc->sc_transfer.callback) + (sc, ccb, sc->sc_transfer.data_len, + STATUS_CMD_UNKNOWN); + } else { + umass_tr_error(xfer, error); + /* skip reset */ + sc->sc_last_xfer_index = UMASS_T_CBI_COMMAND; + } break; } } @@ -2606,17 +2620,9 @@ umass_cam_cb(struct umass_softc *sc, uni /* * The wire protocol failed and will hopefully have * recovered. We return an error to CAM and let CAM -* retry the command if necessary. In case of SCSI IO -* commands we ask the CAM layer to check the -* condition first. This is a quick hack to make -* certain devices work. +* retry the command if necessary. */ - if (ccb->ccb_h.func_code == XPT_SCSI_IO) { - ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; - ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; - } else { - ccb->ccb_h.status = CAM_REQ_CMP_ERR; - } + ccb->ccb_h.status = CAM_REQ_CMP_ERR; xpt_done(ccb); 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: r220772 - in head/sys/dev/ath: . ath_hal ath_hal/ar5416
Author: adrian Date: Mon Apr 18 12:15:43 2011 New Revision: 220772 URL: http://svn.freebsd.org/changeset/base/220772 Log: Add global TX timeout handling. The global TX timeout counter increments whenever a frame is ready to be transmitted and the medium is busy. Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_athioctl.h head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Mon Apr 18 11:25:13 2011 (r220771) +++ head/sys/dev/ath/ath_hal/ah.h Mon Apr 18 12:15:43 2011 (r220772) @@ -123,6 +123,7 @@ typedef enum { HAL_CAP_SPLIT_4KB_TRANS = 40, /* hardware supports descriptors straddling a 4k page boundary */ HAL_CAP_HAS_PSPOLL = 41, /* hardware has ps-poll support */ HAL_CAP_RXDESC_SELFLINK = 42, /* support a self-linked tail RX descriptor */ + HAL_CAP_GTXTO = 43, /* hardware supports global tx timeout */ } HAL_CAPABILITY_TYPE; /* Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Mon Apr 18 11:25:13 2011(r220771) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Mon Apr 18 12:15:43 2011(r220772) @@ -275,6 +275,8 @@ ar5416GetCapability(struct ath_hal *ah, uint32_t capability, uint32_t *result) { switch (type) { + case HAL_CAP_GTXTO: + return HAL_OK; /* All AR5416+ supports Global TX Timeout */ case HAL_CAP_BB_HANG: switch (capability) { case HAL_BB_HANG_RIFS: Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Mon Apr 18 11:25:13 2011(r220771) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Mon Apr 18 12:15:43 2011(r220772) @@ -605,10 +605,8 @@ ar5416InitUserSettings(struct ath_hal *a ar5212SetCTSTimeout(ah, ahp->ah_ctstimeout); if (AH_PRIVATE(ah)->ah_diagreg != 0) OS_REG_WRITE(ah, AR_DIAG_SW, AH_PRIVATE(ah)->ah_diagreg); -#if 0 /* XXX Todo */ - if (ahp->ah_globaltxtimeout != (u_int) -1) - ar5416SetGlobalTxTimeout(ah, ahp->ah_globaltxtimeout); -#endif + if (AH5416(ah)->ah_globaltxtimeout != (u_int) -1) + ar5416SetGlobalTxTimeout(ah, AH5416(ah)->ah_globaltxtimeout); } static void Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Mon Apr 18 11:25:13 2011(r220771) +++ head/sys/dev/ath/if_ath.c Mon Apr 18 12:15:43 2011(r220772) @@ -1355,6 +1355,8 @@ ath_intr(void *arg) sc->sc_stats.ast_bmiss++; taskqueue_enqueue(sc->sc_tq, &sc->sc_bmisstask); } + if (status & HAL_INT_GTT) + sc->sc_stats.ast_tx_timeout++; if (status & HAL_INT_MIB) { sc->sc_stats.ast_mib++; /* @@ -1559,6 +1561,10 @@ ath_init(void *arg) if (sc->sc_needmib && ic->ic_opmode == IEEE80211_M_STA) sc->sc_imask |= HAL_INT_MIB; + /* Enable global TX timeout statistics if available */ + if (ath_hal_gtxto_supported(ah)) + sc->sc_imask |= (HAL_INT_GTT & HAL_INT_BMISC); + ifp->if_drv_flags |= IFF_DRV_RUNNING; callout_reset(&sc->sc_wd_ch, hz, ath_watchdog, sc); ath_hal_intrset(ah, sc->sc_imask); Modified: head/sys/dev/ath/if_ath_sysctl.c == --- head/sys/dev/ath/if_ath_sysctl.cMon Apr 18 11:25:13 2011 (r220771) +++ head/sys/dev/ath/if_ath_sysctl.cMon Apr 18 12:15:43 2011 (r220772) @@ -705,6 +705,8 @@ ath_sysctl_stats_attach(struct ath_softc &sc->sc_stats.ast_tx_htprotect, 0, "HT tx frames with protection"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_hitqueueend", CTLFLAG_RD, &sc->sc_stats.ast_rx_hitqueueend, 0, "RX hit queue end"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_timeout", CTLFLAG_RD, + &sc->sc_stats.ast_tx_timeout, 0, "TX Global Timeout"); /* Attach the RX phy error array */ ath_sysctl_stats_attach_rxphyerr(sc, child); Modified: head/sys/dev/ath/if_athioctl.h == --- head/sys/dev/ath/if_athioctl.h Mon Apr 18 11:25:13 2011 (r220771) +++ head/sys/dev/at
svn commit: r220773 - stable/8/sys/netinet6
Author: bz Date: Mon Apr 18 12:18:27 2011 New Revision: 220773 URL: http://svn.freebsd.org/changeset/base/220773 Log: MFC r220743: Fix IPv6 ND. After r219562 we in nd6_ns_input() were erroneously always passing the cached proxydl reference (sockaddr_dl initialized or not) to nd6_na_output(). nd6_na_output() will thus assume a proxy NA. Revert to conditionally passing either &proxydl or NULL if no proxy case desired. Tested by: ipv6gw and ref9-i386 Tested by: Pete French (petefrench ingresso.co.uk on stable) Reported by:Pete French (petefrench ingresso.co.uk on stable) Reported by:bz, simon on Y! cluster Reported by:kib PR: kern/151908 X-Early-MFC: yes Modified: stable/8/sys/netinet6/nd6_nbr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet6/nd6_nbr.c == --- stable/8/sys/netinet6/nd6_nbr.c Mon Apr 18 12:15:43 2011 (r220772) +++ stable/8/sys/netinet6/nd6_nbr.c Mon Apr 18 12:18:27 2011 (r220773) @@ -339,7 +339,7 @@ nd6_ns_input(struct mbuf *m, int off, in nd6_na_output(ifp, &in6_all, &taddr6, ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | (V_ip6_forwarding ? ND_NA_FLAG_ROUTER : 0), - tlladdr, (struct sockaddr *)&proxydl); + tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL); goto freeit; } @@ -349,7 +349,7 @@ nd6_ns_input(struct mbuf *m, int off, in nd6_na_output(ifp, &saddr6, &taddr6, ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | (V_ip6_forwarding ? ND_NA_FLAG_ROUTER : 0) | ND_NA_FLAG_SOLICITED, - tlladdr, (struct sockaddr *)&proxydl); + tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL); freeit: if (ifa != NULL) ifa_free(ifa); ___ 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: r220774 - in head/sys: . arm/conf
Author: philip Date: Mon Apr 18 12:27:57 2011 New Revision: 220774 URL: http://svn.freebsd.org/changeset/base/220774 Log: Delete mistakenly added sys/files.ts7800 Add mistakenly forgotten sys/arm/conf/TS7800 Not sure how this happened. Apologies for the repo-churn. Submitted by: glebius Pointy hat to:philip Added: head/sys/arm/conf/TS7800 (contents, props changed) Deleted: head/sys/files.ts7800 Added: head/sys/arm/conf/TS7800 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/TS7800Mon Apr 18 12:27:57 2011(r220774) @@ -0,0 +1,80 @@ +# +# Custom kernel for the TS-7800 board. +# +# $FreeBSD$ +# + +ident TS7800 +include"../mv/orion/std.ts7800" + +optionsSOC_MV_ORION +makeoptionsMODULES_OVERRIDE="" + +#makeoptions DEBUG=-g#Build kernel with gdb(1) debug symbols +makeoptionsWERROR="-Werror" + +optionsSCHED_4BSD #4BSD scheduler +optionsINET#InterNETworking +optionsINET6 #IPv6 communications protocols +optionsFFS #Berkeley Fast Filesystem +optionsSOFTUPDATES # Enable FFS soft updates support +optionsNFSCLIENT #Network Filesystem Client +optionsNFSLOCKD#Network Lock Manager +optionsNFS_ROOT#NFS usable as /, requires NFSCLIENT +optionsBOOTP +optionsBOOTP_NFSROOT +optionsBOOTP_NFSV3 +optionsBOOTP_WIRED_TO=mge0 + +optionsSYSVSHM #SYSV-style shared memory +optionsSYSVMSG #SYSV-style message queues +optionsSYSVSEM #SYSV-style semaphores +options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +optionsMUTEX_NOINLINE +optionsRWLOCK_NOINLINE +optionsNO_FFS_SNAPSHOT +optionsNO_SWAPPING + +# Debugging +optionsALT_BREAK_TO_DEBUGGER +optionsDDB +optionsKDB +optionsGDB # Support remote GDB. + +device mvs +device pci + +# Pseudo devices +device md +device loop +device pty +device random + +# Serial ports +device uart + +# Networking +device ether +device mge # Marvell Gigabit Ethernet controller +device mii +device e1000phy +device bpf +optionsHZ=1000 + +# USB +device usb +device ehci +device umass +device scbus +device pass +device da + +# SATA +device ata +device atadisk + +# Flattened Device Tree +optionsFDT +optionsFDT_DTB_STATIC +makeoptionsFDT_DTS_FILE=ts7800.dts + ___ 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: r220775 - stable/7/sys/netinet6
Author: bz Date: Mon Apr 18 12:32:06 2011 New Revision: 220775 URL: http://svn.freebsd.org/changeset/base/220775 Log: MFC r220743: Fix IPv6 ND. After r219562 we in nd6_ns_input() were erroneously always passing the cached proxydl reference (sockaddr_dl initialized or not) to nd6_na_output(). nd6_na_output() will thus assume a proxy NA. Revert to conditionally passing either &proxydl or NULL if no proxy case desired. Tested by: ipv6gw and ref9-i386 Tested by: Pete French (petefrench ingresso.co.uk) Reported by:Pete French (petefrench ingresso.co.uk on stable) Reported by:bz, simon on Y! cluster Reported by:kib PR: kern/151908 X-Early-MFC: yes Modified: stable/7/sys/netinet6/nd6_nbr.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet6/nd6_nbr.c == --- stable/7/sys/netinet6/nd6_nbr.c Mon Apr 18 12:27:57 2011 (r220774) +++ stable/7/sys/netinet6/nd6_nbr.c Mon Apr 18 12:32:06 2011 (r220775) @@ -327,7 +327,7 @@ nd6_ns_input(struct mbuf *m, int off, in nd6_na_output(ifp, &in6_all, &taddr6, ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | (ip6_forwarding ? ND_NA_FLAG_ROUTER : 0), - tlladdr, (struct sockaddr *)&proxydl); + tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL); goto freeit; } @@ -337,7 +337,7 @@ nd6_ns_input(struct mbuf *m, int off, in nd6_na_output(ifp, &saddr6, &taddr6, ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | (ip6_forwarding ? ND_NA_FLAG_ROUTER : 0) | ND_NA_FLAG_SOLICITED, - tlladdr, (struct sockaddr *)&proxydl); + tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL); freeit: m_freem(m); return; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220773 - stable/8/sys/netinet6
On 18 Apr 2011, at 14:18, Bjoern A. Zeeb wrote: > Author: bz > Date: Mon Apr 18 12:18:27 2011 > New Revision: 220773 > URL: http://svn.freebsd.org/changeset/base/220773 > > Log: > MFC r220743: > >Fix IPv6 ND. After r219562 we in nd6_ns_input() were erroneously always >passing the cached proxydl reference (sockaddr_dl initialized or not) to >nd6_na_output(). nd6_na_output() will thus assume a proxy NA. Revert to >conditionally passing either &proxydl or NULL if no proxy case desired. Thanks for the quick fix! >Tested by: ipv6gw and ref9-i386 FWIW, ipv6gw is also running stable/8 so the patch bz MFC'ed has been running in production for a day or so. -- Simon L. B. Nielsen ___ 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: r220776 - head/release
Author: nwhitehorn Date: Mon Apr 18 13:20:54 2011 New Revision: 220776 URL: http://svn.freebsd.org/changeset/base/220776 Log: Mention the memstick target here. Modified: head/release/Makefile Modified: head/release/Makefile == --- head/release/Makefile Mon Apr 18 12:32:06 2011(r220775) +++ head/release/Makefile Mon Apr 18 13:20:54 2011(r220776) @@ -4,6 +4,7 @@ # # User-driven targets: # cdrom: Builds release CD-ROM media (release.iso) +# memstick: Builds memory stick image (memstick) # ftp: Sets up FTP distribution area (ftp) # release: Build all media and FTP distribution area # install: Copies all release media into ${DESTDIR} ___ 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: r220777 - head/sys/dev/ahci
Author: mav Date: Mon Apr 18 13:34:31 2011 New Revision: 220777 URL: http://svn.freebsd.org/changeset/base/220777 Log: - Tune different wait loops to cut some more milliseconds from reset time. - Do not call ahci_start() before device signature received. It is required by the specification and caused non-fatal reset timeouts on AMD chipsets. Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c == --- head/sys/dev/ahci/ahci.cMon Apr 18 13:20:54 2011(r220776) +++ head/sys/dev/ahci/ahci.cMon Apr 18 13:34:31 2011(r220777) @@ -1747,11 +1747,11 @@ ahci_execute_transaction(struct ahci_slo if (ccb->ccb_h.func_code == XPT_ATA_IO && (ccb->ataio.cmd.command == ATA_DEVICE_RESET || (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL))) { - int count, timeout = ccb->ccb_h.timeout; + int count, timeout = ccb->ccb_h.timeout * 100; enum ahci_err_type et = AHCI_ERR_NONE; for (count = 0; count < timeout; count++) { - DELAY(1000); + DELAY(10); if (!(ATA_INL(ch->r_mem, AHCI_P_CI) & (1 << slot->slot))) break; if (ATA_INL(ch->r_mem, AHCI_P_TFD) & ATA_S_ERROR) { @@ -1787,7 +1787,7 @@ ahci_execute_transaction(struct ahci_slo (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL) && (ccb->ataio.cmd.control & ATA_A_RESET) == 0) { while ((val = fis[2]) & (ATA_S_BUSY | ATA_S_DRQ)) { - DELAY(1000); + DELAY(10); if (count++ >= timeout) { device_printf(dev, "device is not " "ready after soft-reset: " @@ -2305,8 +2305,8 @@ ahci_stop(device_t dev) /* Wait for activity stop. */ timeout = 0; do { - DELAY(1000); - if (timeout++ > 1000) { + DELAY(10); + if (timeout++ > 5) { device_printf(dev, "stopping AHCI engine failed\n"); break; } @@ -2328,8 +2328,8 @@ ahci_clo(device_t dev) ATA_OUTL(ch->r_mem, AHCI_P_CMD, cmd); timeout = 0; do { - DELAY(1000); - if (timeout++ > 1000) { + DELAY(10); + if (timeout++ > 5) { device_printf(dev, "executing CLO failed\n"); break; } @@ -2350,8 +2350,8 @@ ahci_stop_fr(device_t dev) /* Wait for FIS reception stop. */ timeout = 0; do { - DELAY(1000); - if (timeout++ > 1000) { + DELAY(10); + if (timeout++ > 5) { device_printf(dev, "stopping AHCI FR engine failed\n"); break; } @@ -2408,11 +2408,11 @@ ahci_reset_to(void *arg) if (ahci_wait_ready(dev, ch->resetting == 0 ? -1 : 0, (310 - ch->resetting) * 100) == 0) { ch->resetting = 0; + ahci_start(dev, 1); xpt_release_simq(ch->sim, TRUE); return; } if (ch->resetting == 0) { - ahci_stop(dev); ahci_clo(dev); ahci_start(dev, 1); xpt_release_simq(ch->sim, TRUE); @@ -2495,7 +2495,6 @@ ahci_reset(device_t dev) else ch->resetting = 310; } - ahci_start(dev, 1); ch->devices = 1; /* Enable wanted port interrupts */ ATA_OUTL(ch->r_mem, AHCI_P_IE, @@ -2507,8 +2506,10 @@ ahci_reset(device_t dev) AHCI_P_IX_DS | AHCI_P_IX_PS | (ctlr->ccc ? 0 : AHCI_P_IX_DHR))); if (ch->resetting) callout_reset(&ch->reset_timer, hz / 10, ahci_reset_to, dev); - else + else { + ahci_start(dev, 1); xpt_release_simq(ch->sim, TRUE); + } } static int @@ -2569,7 +2570,7 @@ ahci_sata_connect(struct ahci_channel *c int timeout; /* Wait up to 100ms for "connect well" */ - for (timeout = 0; timeout < 100 ; timeout++) { + for (timeout = 0; timeout < 1000 ; timeout++) { status = ATA_INL(ch->r_mem, AHCI_P_SSTS); if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && @@ -2582,9 +2583,9 @@ ahci_sata_connect(struct ahci_channel *c } return (0); } - DELAY(1000); + DELAY(100); } - if (timeout
svn commit: r220778 - head/sys/cam/ata
Author: mav Date: Mon Apr 18 13:59:56 2011 New Revision: 220778 URL: http://svn.freebsd.org/changeset/base/220778 Log: Remove some used variables. Found with: Clang Static Analyzer Modified: head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_pmp.c Modified: head/sys/cam/ata/ata_da.c == --- head/sys/cam/ata/ata_da.c Mon Apr 18 13:34:31 2011(r220777) +++ head/sys/cam/ata/ata_da.c Mon Apr 18 13:59:56 2011(r220778) @@ -274,7 +274,6 @@ adaopen(struct disk *dp) { struct cam_periph *periph; struct ada_softc *softc; - int unit; int error; periph = (struct cam_periph *)dp->d_drv1; @@ -293,13 +292,12 @@ adaopen(struct disk *dp) return (error); } - unit = periph->unit_number; softc = (struct ada_softc *)periph->softc; softc->flags |= ADA_FLAG_OPEN; CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("adaopen: disk=%s%d (unit %d)\n", dp->d_name, dp->d_unit, -unit)); +periph->unit_number)); if ((softc->flags & ADA_FLAG_PACK_INVALID) != 0) { /* Invalidate our pack information. */ @@ -1314,11 +1312,6 @@ adadone(struct cam_periph *periph, union static int adaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) { - struct ada_softc *softc; - struct cam_periph *periph; - - periph = xpt_path_periph(ccb->ccb_h.path); - softc = (struct ada_softc *)periph->softc; return(cam_periph_error(ccb, cam_flags, sense_flags, NULL)); } Modified: head/sys/cam/ata/ata_pmp.c == --- head/sys/cam/ata/ata_pmp.c Mon Apr 18 13:34:31 2011(r220777) +++ head/sys/cam/ata/ata_pmp.c Mon Apr 18 13:59:56 2011(r220778) @@ -215,12 +215,9 @@ pmprelease(struct cam_periph *periph, in static void pmponinvalidate(struct cam_periph *periph) { - struct pmp_softc *softc; struct cam_path *dpath; int i; - softc = (struct pmp_softc *)periph->softc; - /* * De-register any async callbacks. */ @@ -548,7 +545,7 @@ pmpdone(struct cam_periph *periph, union struct ccb_trans_settings cts; struct pmp_softc *softc; struct ccb_ataio *ataio; - struct cam_path *path, *dpath; + struct cam_path *dpath; u_int32_t priority, res; int i; @@ -557,7 +554,6 @@ pmpdone(struct cam_periph *periph, union CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("pmpdone\n")); - path = done_ccb->ccb_h.path; priority = done_ccb->ccb_h.pinfo.priority; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { @@ -583,10 +579,10 @@ pmpdone(struct cam_periph *periph, union switch (softc->state) { case PMP_STATE_PORTS: - softc->pm_ports = (done_ccb->ataio.res.lba_high << 24) + - (done_ccb->ataio.res.lba_mid << 16) + - (done_ccb->ataio.res.lba_low << 8) + - done_ccb->ataio.res.sector_count; + softc->pm_ports = (ataio->res.lba_high << 24) + + (ataio->res.lba_mid << 16) + + (ataio->res.lba_low << 8) + + ataio->res.sector_count; /* This PMP declares 6 ports, while only 5 of them are real. * Port 5 is enclosure management bridge port, which has implementation * problems, causing probe faults. Hide it for now. */ @@ -650,10 +646,10 @@ pmpdone(struct cam_periph *periph, union xpt_schedule(periph, priority); return; case PMP_STATE_CHECK: - res = (done_ccb->ataio.res.lba_high << 24) + - (done_ccb->ataio.res.lba_mid << 16) + - (done_ccb->ataio.res.lba_low << 8) + - done_ccb->ataio.res.sector_count; + res = (ataio->res.lba_high << 24) + + (ataio->res.lba_mid << 16) + + (ataio->res.lba_low << 8) + + ataio->res.sector_count; if (((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) || (res & 0x600) != 0) { if (bootverbose) { ___ 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: r220779 - in head/sys/dev/ath: . ath_hal/ar5416
Author: adrian Date: Mon Apr 18 14:03:05 2011 New Revision: 220779 URL: http://svn.freebsd.org/changeset/base/220779 Log: Rework the Global TX timeout handling to look more like ath9k. It correctly now sets the AR_IMR BCNMISC register, along with the GTT register in AR_IMR_S2. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Mon Apr 18 13:59:56 2011(r220778) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Mon Apr 18 14:03:05 2011(r220779) @@ -234,14 +234,20 @@ ar5416SetInterrupts(struct ath_hal *ah, mask2 |= AR_IMR_S2_DTIMSYNC; if (ints & HAL_INT_CABEND) mask2 |= (AR_IMR_S2_CABEND ); - if (ints & HAL_INT_GTT) - mask2 |= AR_IMR_S2_GTT; if (ints & HAL_INT_CST) mask2 |= AR_IMR_S2_CST; if (ints & HAL_INT_TSFOOR) mask2 |= AR_IMR_S2_TSFOOR; } + if (ints & (HAL_INT_GTT | HAL_INT_CST)) { + mask |= AR_IMR_BCNMISC; + if (ints & HAL_INT_GTT) + mask2 |= AR_IMR_S2_GTT; + if (ints & HAL_INT_CST) + mask2 |= AR_IMR_S2_CST; + } + /* Write the new IMR and store off our SW copy. */ HALDEBUG(ah, HAL_DEBUG_INTERRUPT, "%s: new IMR 0x%x\n", __func__, mask); OS_REG_WRITE(ah, AR_IMR, mask); Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Mon Apr 18 13:59:56 2011(r220778) +++ head/sys/dev/ath/if_ath.c Mon Apr 18 14:03:05 2011(r220779) @@ -1563,7 +1563,10 @@ ath_init(void *arg) /* Enable global TX timeout statistics if available */ if (ath_hal_gtxto_supported(ah)) - sc->sc_imask |= (HAL_INT_GTT & HAL_INT_BMISC); + sc->sc_imask |= HAL_INT_GTT; + + DPRINTF(sc, ATH_DEBUG_RESET, "%s: imask=0x%x\n", + __func__, sc->sc_imask); ifp->if_drv_flags |= IFF_DRV_RUNNING; callout_reset(&sc->sc_wd_ch, hz, ath_watchdog, sc); ___ 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: r220780 - head/sys/dev/ath
Author: adrian Date: Mon Apr 18 14:03:37 2011 New Revision: 220780 URL: http://svn.freebsd.org/changeset/base/220780 Log: Bump pad, I'm adding more statistics. Modified: head/sys/dev/ath/if_athioctl.h Modified: head/sys/dev/ath/if_athioctl.h == --- head/sys/dev/ath/if_athioctl.h Mon Apr 18 14:03:05 2011 (r220779) +++ head/sys/dev/ath/if_athioctl.h Mon Apr 18 14:03:37 2011 (r220780) @@ -130,7 +130,7 @@ struct ath_stats { u_int32_t ast_tx_htprotect; /* HT tx frames with protection */ u_int32_t ast_rx_hitqueueend; u_int32_t ast_tx_timeout; /* Global TX timeout */ - u_int32_t ast_pad[1]; + u_int32_t ast_pad[16]; }; #defineSIOCGATHSTATS _IOWR('i', 137, struct ifreq) ___ 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: r220781 - head/sys/netgraph
Author: glebius Date: Mon Apr 18 14:05:26 2011 New Revision: 220781 URL: http://svn.freebsd.org/changeset/base/220781 Log: Further cleanup of node creation path from M_NOWAIT usage. Modified: head/sys/netgraph/ng_sppp.c Modified: head/sys/netgraph/ng_sppp.c == --- head/sys/netgraph/ng_sppp.c Mon Apr 18 14:03:37 2011(r220780) +++ head/sys/netgraph/ng_sppp.c Mon Apr 18 14:05:26 2011(r220781) @@ -108,7 +108,7 @@ static unsigned charng_units_in_use = 0 * Find the first free unit number for a new interface. * Increase the size of the unit bitmap as necessary. */ -static __inline int +static __inline void ng_sppp_get_unit (int *unit) { int index, bit; @@ -122,9 +122,7 @@ ng_sppp_get_unit (int *unit) newlen = (2 * ng_sppp_units_len) + sizeof (*ng_sppp_units); newarray = malloc (newlen * sizeof (*ng_sppp_units), - M_NETGRAPH_SPPP, M_NOWAIT); - if (newarray == NULL) - return (ENOMEM); + M_NETGRAPH_SPPP, M_WAITOK); bcopy (ng_sppp_units, newarray, ng_sppp_units_len * sizeof (*ng_sppp_units)); bzero (newarray + ng_sppp_units_len, @@ -142,7 +140,6 @@ ng_sppp_get_unit (int *unit) ng_sppp_units[index] |= (1 << bit); *unit = (index * NBBY) + bit; ng_units_in_use++; - return (0); } /* @@ -262,12 +259,7 @@ ng_sppp_constructor (node_p node) priv->ifp = ifp; /* Get an interface unit number */ - if ((error = ng_sppp_get_unit(&priv->unit)) != 0) { - free (pp, M_NETGRAPH_SPPP); - free (priv, M_NETGRAPH_SPPP); - return (error); - } - + ng_sppp_get_unit(&priv->unit); /* Link together node and private info */ NG_NODE_SET_PRIVATE (node, priv); ___ 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: r220782 - head/sys/dev/ath
Author: adrian Date: Mon Apr 18 14:06:18 2011 New Revision: 220782 URL: http://svn.freebsd.org/changeset/base/220782 Log: Add TX carrier sense timeout statistics. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_athioctl.h Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Mon Apr 18 14:05:26 2011(r220781) +++ head/sys/dev/ath/if_ath.c Mon Apr 18 14:06:18 2011(r220782) @@ -1357,6 +1357,8 @@ ath_intr(void *arg) } if (status & HAL_INT_GTT) sc->sc_stats.ast_tx_timeout++; + if (status & HAL_INT_CST) + sc->sc_stats.ast_tx_cst++; if (status & HAL_INT_MIB) { sc->sc_stats.ast_mib++; /* @@ -1561,9 +1563,9 @@ ath_init(void *arg) if (sc->sc_needmib && ic->ic_opmode == IEEE80211_M_STA) sc->sc_imask |= HAL_INT_MIB; - /* Enable global TX timeout statistics if available */ + /* Enable global TX timeout and carrier sense timeout if available */ if (ath_hal_gtxto_supported(ah)) - sc->sc_imask |= HAL_INT_GTT; + sc->sc_imask |= (HAL_INT_GTT | HAL_INT_CST); DPRINTF(sc, ATH_DEBUG_RESET, "%s: imask=0x%x\n", __func__, sc->sc_imask); Modified: head/sys/dev/ath/if_ath_sysctl.c == --- head/sys/dev/ath/if_ath_sysctl.cMon Apr 18 14:05:26 2011 (r220781) +++ head/sys/dev/ath/if_ath_sysctl.cMon Apr 18 14:06:18 2011 (r220782) @@ -707,6 +707,8 @@ ath_sysctl_stats_attach(struct ath_softc &sc->sc_stats.ast_rx_hitqueueend, 0, "RX hit queue end"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_timeout", CTLFLAG_RD, &sc->sc_stats.ast_tx_timeout, 0, "TX Global Timeout"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_cst", CTLFLAG_RD, + &sc->sc_stats.ast_tx_cst, 0, "TX Carrier Sense Timeout"); /* Attach the RX phy error array */ ath_sysctl_stats_attach_rxphyerr(sc, child); Modified: head/sys/dev/ath/if_athioctl.h == --- head/sys/dev/ath/if_athioctl.h Mon Apr 18 14:05:26 2011 (r220781) +++ head/sys/dev/ath/if_athioctl.h Mon Apr 18 14:06:18 2011 (r220782) @@ -130,6 +130,7 @@ struct ath_stats { u_int32_t ast_tx_htprotect; /* HT tx frames with protection */ u_int32_t ast_rx_hitqueueend; u_int32_t ast_tx_timeout; /* Global TX timeout */ + u_int32_t ast_tx_cst; /* Carrier sense timeout */ u_int32_t ast_pad[16]; }; ___ 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: r220783 - head/sys/netgraph
Author: glebius Date: Mon Apr 18 14:07:01 2011 New Revision: 220783 URL: http://svn.freebsd.org/changeset/base/220783 Log: Finish last change. Pointy hat to: glebius Modified: head/sys/netgraph/ng_sppp.c Modified: head/sys/netgraph/ng_sppp.c == --- head/sys/netgraph/ng_sppp.c Mon Apr 18 14:06:18 2011(r220782) +++ head/sys/netgraph/ng_sppp.c Mon Apr 18 14:07:01 2011(r220783) @@ -242,7 +242,6 @@ ng_sppp_constructor (node_p node) struct sppp *pp; struct ifnet *ifp; priv_p priv; - int error = 0; /* Allocate node and interface private structures */ priv = malloc(sizeof(*priv), M_NETGRAPH_SPPP, M_WAITOK | M_ZERO); ___ 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: r220784 - head/sys/dev/ath
Author: adrian Date: Mon Apr 18 14:14:54 2011 New Revision: 220784 URL: http://svn.freebsd.org/changeset/base/220784 Log: For now, only enable GTT. CST is firing very frequently during local tests; I'll figure out what's going on before re-enabling this as it does add to the interrupt load. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Mon Apr 18 14:07:01 2011(r220783) +++ head/sys/dev/ath/if_ath.c Mon Apr 18 14:14:54 2011(r220784) @@ -1565,7 +1565,7 @@ ath_init(void *arg) /* Enable global TX timeout and carrier sense timeout if available */ if (ath_hal_gtxto_supported(ah)) - sc->sc_imask |= (HAL_INT_GTT | HAL_INT_CST); + sc->sc_imask |= HAL_INT_GTT; DPRINTF(sc, ATH_DEBUG_RESET, "%s: imask=0x%x\n", __func__, sc->sc_imask); ___ 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: r220785 - head/sys/cam
Author: mav Date: Mon Apr 18 14:15:52 2011 New Revision: 220785 URL: http://svn.freebsd.org/changeset/base/220785 Log: Remove some used variables. Found with: Clang Static Analyzer Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c == --- head/sys/cam/cam_xpt.c Mon Apr 18 14:14:54 2011(r220784) +++ head/sys/cam/cam_xpt.c Mon Apr 18 14:15:52 2011(r220785) @@ -2521,12 +2521,8 @@ xpt_action_default(union ccb *start_ccb) start_ccb->ccb_h.status = CAM_DEV_NOT_THERE; } else { struct ccb_getdev *cgd; - struct cam_eb *bus; - struct cam_et *tar; cgd = &start_ccb->cgd; - bus = cgd->ccb_h.path->bus; - tar = cgd->ccb_h.path->target; cgd->protocol = dev->protocol; cgd->inq_data = dev->inq_data; cgd->ident_data = dev->ident_data; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r220786 - head/sys/cam
Author: mav Date: Mon Apr 18 14:34:10 2011 New Revision: 220786 URL: http://svn.freebsd.org/changeset/base/220786 Log: Remove always false "< 0" check for unsgined int variable. This check is also duplicate, as the value was already checked for 0 before decrementing. Reported by: rpaulo Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c == --- head/sys/cam/cam_periph.c Mon Apr 18 14:15:52 2011(r220785) +++ head/sys/cam/cam_periph.c Mon Apr 18 14:34:10 2011(r220786) @@ -527,8 +527,6 @@ cam_periph_invalidate(struct cam_periph xpt_lock_buses(); if (periph->refcount == 0) camperiphfree(periph); - else if (periph->refcount < 0) - printf("cam_invalidate_periph: refcount < 0!!\n"); xpt_unlock_buses(); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r220787 - head/share/man/man9
Author: glebius Date: Mon Apr 18 15:30:25 2011 New Revision: 220787 URL: http://svn.freebsd.org/changeset/base/220787 Log: It is already seven years since mbuf allocator uses same M_WAITOK/M_NOWAIT flags as malloc(9). Update manual page. Submitted by: Vadim Goncharov Modified: head/share/man/man9/mbuf.9 Modified: head/share/man/man9/mbuf.9 == --- head/share/man/man9/mbuf.9 Mon Apr 18 14:34:10 2011(r220786) +++ head/share/man/man9/mbuf.9 Mon Apr 18 15:30:25 2011(r220787) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 7, 2010 +.Dd April 18, 2011 .Dt MBUF 9 .Os .\" @@ -371,9 +371,9 @@ on failure. The .Fa how argument is to be set to -.Dv M_WAIT +.Dv M_WAITOK or -.Dv M_DONTWAIT . +.Dv M_NOWAIT . It specifies whether the caller is willing to block if necessary. A number of other functions and macros related to .Vt mbufs @@ -381,15 +381,16 @@ have the same argument because they may at some point need to allocate new .Vt mbufs . .Pp -Programmers should be careful not to confuse the +Historical .Vt mbuf -allocation flag -.Dv M_DONTWAIT -with the -.Xr malloc 9 -allocation flag, -.Dv M_NOWAIT . -They are not the same. +allocator (See +.Sx HISTORY +section) used allocation flags +.Dv M_WAIT +and +.Dv M_DONTWAIT . +These constants are kept for compatibility +and their use in new code is discouraged. .It Fn MGETHDR mbuf how type Allocate an .Vt mbuf @@ -964,9 +965,9 @@ Upon success, the original chain will be chain will be returned. .Fa how should be either -.Dv M_WAIT +.Dv M_WAITOK or -.Dv M_DONTWAIT , +.Dv M_NOWAIT , depending on the caller's preference. .Pp This function is especially useful in network drivers, where @@ -982,9 +983,9 @@ The original mbuf chain is always reclai count of any shared mbuf clusters is decremented. .Fa how should be either -.Dv M_WAIT +.Dv M_WAITOK or -.Dv M_DONTWAIT , +.Dv M_NOWAIT , depending on the caller's preference. As a side-effect of this process the returned mbuf chain may be compacted. ___ 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: r220788 - stable/8/sys/compat/x86bios
Author: jkim Date: Mon Apr 18 15:55:02 2011 New Revision: 220788 URL: http://svn.freebsd.org/changeset/base/220788 Log: MFC: r219430 Remove custom interrupt dispatcher. This is a pointless micro-optimization and it may cause problems if SS and SP are modified by real-mode code. Modified: stable/8/sys/compat/x86bios/x86bios.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/compat/x86bios/x86bios.c == --- stable/8/sys/compat/x86bios/x86bios.c Mon Apr 18 15:30:25 2011 (r220787) +++ stable/8/sys/compat/x86bios/x86bios.c Mon Apr 18 15:55:02 2011 (r220788) @@ -291,25 +291,6 @@ x86bios_emu_outl(struct x86emu *emu, uin outl(port, val); } -static void -x86bios_emu_get_intr(struct x86emu *emu, int intno) -{ - uint16_t *sp; - uint32_t iv; - - emu->x86.R_SP -= 6; - - sp = (uint16_t *)((vm_offset_t)x86bios_seg + emu->x86.R_SP); - sp[0] = htole16(emu->x86.R_IP); - sp[1] = htole16(emu->x86.R_CS); - sp[2] = htole16(emu->x86.R_FLG); - - iv = x86bios_get_intr(intno); - emu->x86.R_IP = iv & 0x; - emu->x86.R_CS = (iv >> 16) & 0x; - emu->x86.R_FLG &= ~(F_IF | F_TF); -} - void * x86bios_alloc(uint32_t *offset, size_t size) { @@ -567,7 +548,6 @@ x86bios_unmap_mem(void) static void x86bios_init(void *arg __unused) { - int i; mtx_init(&x86bios_lock, "x86bios lock", NULL, MTX_SPIN); @@ -598,9 +578,6 @@ x86bios_init(void *arg __unused) x86bios_emu.emu_outb = x86bios_emu_outb; x86bios_emu.emu_outw = x86bios_emu_outw; x86bios_emu.emu_outl = x86bios_emu_outl; - - for (i = 0; i < 256; i++) - x86bios_emu._x86emu_intrTab[i] = x86bios_emu_get_intr; } static void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r220789 - head/sys/dev/ahci
Author: mav Date: Mon Apr 18 16:00:46 2011 New Revision: 220789 URL: http://svn.freebsd.org/changeset/base/220789 Log: Handle ready timeout during polled operation same as done in mvs(4) before. Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h Modified: head/sys/dev/ahci/ahci.c == --- head/sys/dev/ahci/ahci.cMon Apr 18 15:55:02 2011(r220788) +++ head/sys/dev/ahci/ahci.cMon Apr 18 16:00:46 2011(r220789) @@ -2856,4 +2856,9 @@ ahcipoll(struct cam_sim *sim) struct ahci_channel *ch = (struct ahci_channel *)cam_sim_softc(sim); ahci_ch_intr(ch->dev); + if (ch->resetting != 0 && + (--ch->resetpolldiv <= 0 || !callout_pending(&ch->reset_timer))) { + ch->resetpolldiv = 1000; + ahci_reset_to(ch->dev); + } } Modified: head/sys/dev/ahci/ahci.h == --- head/sys/dev/ahci/ahci.hMon Apr 18 15:55:02 2011(r220788) +++ head/sys/dev/ahci/ahci.hMon Apr 18 16:00:46 2011(r220789) @@ -414,6 +414,7 @@ struct ahci_channel { int lastslot; /* Last used slot */ int taggedtarget; /* Last tagged target */ int resetting; /* Hard-reset in progress. */ + int resetpolldiv; /* Hard-reset poll divider. */ int listening; /* SUD bit is cleared. */ union ccb *frozen;/* Frozen command */ struct callout pm_timer; /* Power management events */ ___ 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: r220790 - head/sys/geom/raid
Author: mav Date: Mon Apr 18 16:15:59 2011 New Revision: 220790 URL: http://svn.freebsd.org/changeset/base/220790 Log: Reduce geom_raid log verbosity. Modified: head/sys/geom/raid/g_raid.c Modified: head/sys/geom/raid/g_raid.c == --- head/sys/geom/raid/g_raid.c Mon Apr 18 16:00:46 2011(r220789) +++ head/sys/geom/raid/g_raid.c Mon Apr 18 16:15:59 2011(r220790) @@ -55,7 +55,7 @@ u_int g_raid_aggressive_spare = 0; TUNABLE_INT("kern.geom.raid.aggressive_spare", &g_raid_aggressive_spare); SYSCTL_UINT(_kern_geom_raid, OID_AUTO, aggressive_spare, CTLFLAG_RW, &g_raid_aggressive_spare, 0, "Use disks without metadata as spare"); -u_int g_raid_debug = 2; +u_int g_raid_debug = 0; TUNABLE_INT("kern.geom.raid.debug", &g_raid_debug); SYSCTL_UINT(_kern_geom_raid, OID_AUTO, debug, CTLFLAG_RW, &g_raid_debug, 0, "Debug level"); ___ 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: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys
Author: mdf Date: Mon Apr 18 16:32:22 2011 New Revision: 220791 URL: http://svn.freebsd.org/changeset/base/220791 Log: Add the posix_fallocate(2) syscall. The default implementation in vop_stdallocate() is filesystem agnostic and will run as slow as a read/write loop in userspace; however, it serves to correctly implement the functionality for filesystems that do not implement a VOP_ALLOCATE. Note that __FreeBSD_version was already bumped today to 900036 for any ports which would like to use this function. Also reserve space in the syscall table for posix_fadvise(2). Reviewed by: -arch (previous version) Added: head/lib/libc/sys/posix_fallocate.2 (contents, props changed) Modified: head/lib/libc/sys/Makefile.inc head/lib/libc/sys/Symbol.map head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/syscalls.master head/sys/kern/syscalls.master head/sys/kern/vfs_default.c head/sys/kern/vfs_syscalls.c head/sys/kern/vnode_if.src head/sys/sys/fcntl.h head/sys/sys/vnode.h Modified: head/lib/libc/sys/Makefile.inc == --- head/lib/libc/sys/Makefile.inc Mon Apr 18 16:15:59 2011 (r220790) +++ head/lib/libc/sys/Makefile.inc Mon Apr 18 16:32:22 2011 (r220791) @@ -96,7 +96,7 @@ MAN+= abort2.2 accept.2 access.2 acct.2 mq_setattr.2 \ msgctl.2 msgget.2 msgrcv.2 msgsnd.2 \ msync.2 munmap.2 nanosleep.2 nfssvc.2 ntp_adjtime.2 open.2 \ - pathconf.2 pipe.2 poll.2 posix_openpt.2 profil.2 \ + pathconf.2 pipe.2 poll.2 posix_fallocate.2 posix_openpt.2 profil.2 \ pselect.2 ptrace.2 quotactl.2 \ read.2 readlink.2 reboot.2 recv.2 rename.2 revoke.2 rfork.2 rmdir.2 \ rtprio.2 Modified: head/lib/libc/sys/Symbol.map == --- head/lib/libc/sys/Symbol.mapMon Apr 18 16:15:59 2011 (r220790) +++ head/lib/libc/sys/Symbol.mapMon Apr 18 16:32:22 2011 (r220791) @@ -364,6 +364,7 @@ FBSD_1.2 { cap_enter; cap_getmode; getloginclass; + posix_fallocate; rctl_get_racct; rctl_get_rules; rctl_get_limits; Added: head/lib/libc/sys/posix_fallocate.2 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/posix_fallocate.2 Mon Apr 18 16:32:22 2011 (r220791) @@ -0,0 +1,146 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\"The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" 4. Neither the name of the University nor the names of its contributors +.\"may be used to endorse or promote products derived from this software +.\"without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)open.2 8.2 (Berkeley) 11/16/93 +.\" $FreeBSD$ +.\" +.Dd April 13, 2011 +.Dt POSIX_FALLOCATE 2 +.Os +.Sh NAME +.Nm posix_fallocate +.Nd pre-allocate storage for a range in a file +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In fcntl.h +.Ft int +.Fn posix_fallocate "int fd" "off_t offset" "off_t len" +.Sh DESCRIPTION +Required storage for the range +.Fa offset +to +.Fa offset + +.Fa len +in the file referenced by +.Fa fd +is guarateed to be allocated upon successful return. +That is, if +.Fn posix_fallocate +returns successfully, subsequent writes to the specified file data +will not fail due to lack of free space on the file system storage +media. +Any existing file data in the specified range is unmodified. +If +.Fa offset + +.Fa len +is beyond the curr
svn commit: r220792 - in head/sys: compat/freebsd32 kern sys
Author: mdf Date: Mon Apr 18 16:32:47 2011 New Revision: 220792 URL: http://svn.freebsd.org/changeset/base/220792 Log: Regen. Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h == --- head/sys/compat/freebsd32/freebsd32_proto.h Mon Apr 18 16:32:22 2011 (r220791) +++ head/sys/compat/freebsd32/freebsd32_proto.h Mon Apr 18 16:32:47 2011 (r220792) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 220238 2011-04-01 11:16:29Z kib + * created from FreeBSD */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -568,6 +568,13 @@ struct freebsd32_pselect_args { char ts_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * ts; char ts_r_[PADR_(const struct timespec32 *)]; char sm_l_[PADL_(const sigset_t *)]; const sigset_t * sm; char sm_r_[PADR_(const sigset_t *)]; }; +struct freebsd32_posix_fallocate_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char offsetlo_l_[PADL_(uint32_t)]; uint32_t offsetlo; char offsetlo_r_[PADR_(uint32_t)]; + char offsethi_l_[PADL_(uint32_t)]; uint32_t offsethi; char offsethi_r_[PADR_(uint32_t)]; + char lenlo_l_[PADL_(uint32_t)]; uint32_t lenlo; char lenlo_r_[PADR_(uint32_t)]; + char lenhi_l_[PADL_(uint32_t)]; uint32_t lenhi; char lenhi_r_[PADR_(uint32_t)]; +}; #if !defined(PAD64_REQUIRED) && defined(__powerpc__) #define PAD64_REQUIRED #endif @@ -676,6 +683,7 @@ int freebsd32_semctl(struct thread *, st intfreebsd32_msgctl(struct thread *, struct freebsd32_msgctl_args *); intfreebsd32_shmctl(struct thread *, struct freebsd32_shmctl_args *); intfreebsd32_pselect(struct thread *, struct freebsd32_pselect_args *); +intfreebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *); #ifdef COMPAT_43 @@ -1042,6 +1050,7 @@ int freebsd7_freebsd32_shmctl(struct thr #defineFREEBSD32_SYS_AUE_freebsd32_msgctl AUE_MSGCTL #defineFREEBSD32_SYS_AUE_freebsd32_shmctl AUE_SHMCTL #defineFREEBSD32_SYS_AUE_freebsd32_pselect AUE_SELECT +#defineFREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_NULL #undef PAD_ #undef PADL_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h == --- head/sys/compat/freebsd32/freebsd32_syscall.h Mon Apr 18 16:32:22 2011(r220791) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Mon Apr 18 16:32:47 2011(r220792) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 220238 2011-04-01 11:16:29Z kib + * created from FreeBSD */ #defineFREEBSD32_SYS_syscall 0 @@ -421,4 +421,5 @@ #defineFREEBSD32_SYS_rctl_get_limits 527 #defineFREEBSD32_SYS_rctl_add_rule 528 #defineFREEBSD32_SYS_rctl_remove_rule 529 -#defineFREEBSD32_SYS_MAXSYSCALL530 +#defineFREEBSD32_SYS_freebsd32_posix_fallocate 530 +#defineFREEBSD32_SYS_MAXSYSCALL532 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c == --- head/sys/compat/freebsd32/freebsd32_syscalls.c Mon Apr 18 16:32:22 2011(r220791) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Mon Apr 18 16:32:47 2011(r220792) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 220238 2011-04-01 11:16:29Z kib + * created from FreeBSD */ const char *freebsd32_syscallnames[] = { @@ -553,4 +553,6 @@ const char *freebsd32_syscallnames[] = { "rctl_get_limits", /* 527 = rctl_get_limits */ "rctl_add_rule",/* 528 = rctl_add_rule */ "rctl_remove_rule", /* 529 = rctl_remove_rule */ + "freebsd32_posix_fallocate",/* 530 = freebsd32_posix_fallocate */ + "#531", /* 531 = posix_fadvise */ }; Modified: head/sys/compat/freebsd32/freebsd32_sysent.c == --- head/sys/compat/freebsd32/freebsd32_sysent.cMon Apr 18 16:32:22 2011(r220791) +++ head/sys/compat/
svn commit: r220793 - head/sys/kern
Author: mdf Date: Mon Apr 18 16:40:47 2011 New Revision: 220793 URL: http://svn.freebsd.org/changeset/base/220793 Log: Fix a copy/paste whitespace error. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c == --- head/sys/kern/vfs_syscalls.cMon Apr 18 16:32:47 2011 (r220792) +++ head/sys/kern/vfs_syscalls.cMon Apr 18 16:40:47 2011 (r220793) @@ -4699,10 +4699,10 @@ kern_posix_fallocate(struct thread *td, error = ENODEV; goto out; } -if ((fp->f_flag & FWRITE) == 0) { -error = EBADF; + if ((fp->f_flag & FWRITE) == 0) { + error = EBADF; goto out; -} + } vp = fp->f_vnode; if (vp->v_type != VREG) { error = ENODEV; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc
On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: > please mark this in src/UPDATING, maybe bump freebsd_version too? Please do not bump freebsd_version just for this. Ports wishing to know can go off the last bump, if there are any. Every freebsd_version bump forces rebuilding all modules and such and is a pita. Warner > > On Sun, Apr 17, 2011 at 09:03:23PM +, Dimitry Andric wrote: >> Author: dim >> Date: Sun Apr 17 21:03:23 2011 >> New Revision: 220755 >> URL: http://svn.freebsd.org/changeset/base/220755 >> >> Log: >> Remove libobjc and other Objective-C related components, as these are >> extremely outdated, and not used by anything in the base system. >> >> Silence from: current@ >> >> Deleted: >> head/contrib/gcc/doc/objc.texi >> head/contrib/gcc/objc/ >> head/contrib/libobjc/ >> head/gnu/lib/libobjc/ >> head/gnu/usr.bin/cc/cc1obj/ >> Modified: >> head/Makefile.inc1 >> head/ObsoleteFiles.inc >> head/contrib/gcc/doc/cpp.1 >> head/contrib/gcc/doc/cpp.texi >> head/contrib/gcc/doc/cppenv.texi >> head/contrib/gcc/doc/cppinternals.texi >> head/contrib/gcc/doc/cppopts.texi >> head/contrib/gcc/doc/extend.texi >> head/contrib/gcc/doc/frontends.texi >> head/contrib/gcc/doc/gcc.1 >> head/contrib/gcc/doc/gcc.texi >> head/contrib/gcc/doc/invoke.texi >> head/contrib/gcc/doc/sourcebuild.texi >> head/contrib/gcc/doc/standards.texi >> head/contrib/gcc/doc/tm.texi >> head/etc/mtree/BSD.include.dist >> head/gnu/lib/Makefile >> head/gnu/usr.bin/cc/Makefile >> head/gnu/usr.bin/cc/cc_tools/Makefile >> head/gnu/usr.bin/cc/doc/Makefile >> head/share/mk/bsd.dep.mk >> head/share/mk/bsd.lib.mk >> head/share/mk/bsd.libnames.mk >> head/share/mk/bsd.own.mk >> head/share/mk/bsd.prog.mk >> >> Modified: head/Makefile.inc1 >> == >> --- head/Makefile.inc1 Sun Apr 17 20:44:02 2011(r220754) >> +++ head/Makefile.inc1 Sun Apr 17 21:03:23 2011(r220755) >> @@ -306,7 +306,6 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR >> PATH=${TMPPATH} \ >> CC="${CC} ${LIB32FLAGS}" \ >> CXX="${CXX} ${LIB32FLAGS}" \ >> -OBJC="${OBJC} ${LIB32FLAGS}" \ >> LIBDIR=/usr/lib32 \ >> SHLIBDIR=/usr/lib32 >> >> >> Modified: head/ObsoleteFiles.inc >> == >> --- head/ObsoleteFiles.inc Sun Apr 17 20:44:02 2011(r220754) >> +++ head/ObsoleteFiles.inc Sun Apr 17 21:03:23 2011(r220755) >> @@ -38,6 +38,26 @@ >> # xargs -n1 | sort | uniq -d; >> # done >> >> +# 20110417: removal of Objective-C support >> +OLD_FILES+=usr/include/objc/encoding.h >> +OLD_FILES+=usr/include/objc/hash.h >> +OLD_FILES+=usr/include/objc/NXConstStr.h >> +OLD_FILES+=usr/include/objc/objc-api.h >> +OLD_FILES+=usr/include/objc/objc-decls.h >> +OLD_FILES+=usr/include/objc/objc-list.h >> +OLD_FILES+=usr/include/objc/objc.h >> +OLD_FILES+=usr/include/objc/Object.h >> +OLD_FILES+=usr/include/objc/Protocol.h >> +OLD_FILES+=usr/include/objc/runtime.h >> +OLD_FILES+=usr/include/objc/sarray.h >> +OLD_FILES+=usr/include/objc/thr.h >> +OLD_FILES+=usr/include/objc/typedstream.h >> +OLD_FILES+=usr/lib/libobjc.a >> +OLD_FILES+=usr/lib/libobjc.so >> +OLD_FILES+=usr/lib/libobjc_p.a >> +OLD_FILES+=usr/libexec/cc1obj >> +OLD_LIBS+=usr/lib/libobjc.so.4 >> +OLD_DIRS+=usr/include/objc >> # 20110224: sticky.8 -> sticky.7 >> OLD_FILES+=usr/share/man/man8/sticky.8.gz >> # 20110220: new clang import which bumps version from 2.8 to 2.9 >> >> Modified: head/contrib/gcc/doc/cpp.1 >> == >> --- head/contrib/gcc/doc/cpp.1 Sun Apr 17 20:44:02 2011 >> (r220754) >> +++ head/contrib/gcc/doc/cpp.1 Sun Apr 17 21:03:23 2011 >> (r220755) >> @@ -153,14 +153,14 @@ before compilation. It is called a macr >> you to define \fImacros\fR, which are brief abbreviations for longer >> constructs. >> .PP >> -The C preprocessor is intended to be used only with C, \*(C+, and >> -Objective-C source code. In the past, it has been abused as a general >> -text processor. It will choke on input which does not obey C's lexical >> -rules. For example, apostrophes will be interpreted as the beginning of >> -character constants, and cause errors. Also, you cannot rely on it >> -preserving characteristics of the input which are not significant to >> -C\-family languages. If a Makefile is preprocessed, all the hard tabs >> -will be removed, and the Makefile will not work. >> +The C preprocessor is intended to be used only with C and \*(C+ source >> +code. In the past, it has been abused as a general text processor. It >> +will choke on input which does not obey C's lexical rules. For >> +example, apostrophes will be interpreted as the beginning of character >> +constants, and cause errors. Also, you cannot rely on it preser
svn commit: r220794 - head/sys/netinet
Author: jhb Date: Mon Apr 18 17:43:16 2011 New Revision: 220794 URL: http://svn.freebsd.org/changeset/base/220794 Log: When checking to see if a window update should be sent to the remote peer, don't force a window update if the window would not actually grow due to window scaling. Specifically, if the window scaling factor is larger than 2 * MSS, then after the local reader has drained 2 * MSS bytes from the socket, a window update can end up advertising the same window. If this happens, the supposed window update actually ends up being a duplicate ACK. This can result in an excessive number of duplicate ACKs when using a higher maximum socket buffer size. Reviewed by: bz MFC after:1 month Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_output.c Mon Apr 18 16:40:47 2011 (r220793) +++ head/sys/netinet/tcp_output.c Mon Apr 18 17:43:16 2011 (r220794) @@ -564,11 +564,19 @@ after_sack_rexmit: long adv = min(recwin, (long)TCP_MAXWIN << tp->rcv_scale) - (tp->rcv_adv - tp->rcv_nxt); + /* +* If the new window size ends up being the same as the old +* size when it is scaled, then don't force a window update. +*/ + if ((tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale == + (adv + tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale) + goto dontupdate; if (adv >= (long) (2 * tp->t_maxseg)) goto send; if (2 * adv >= (long) so->so_rcv.sb_hiwat) goto send; } +dontupdate: /* * Send if we owe the peer an ACK, RST, SYN, or urgent data. ACKNOW ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220777 - head/sys/dev/ahci
On Monday, April 18, 2011 9:34:31 am Alexander Motin wrote: > Author: mav > Date: Mon Apr 18 13:34:31 2011 > New Revision: 220777 > URL: http://svn.freebsd.org/changeset/base/220777 > > Log: >- Tune different wait loops to cut some more milliseconds from reset time. >- Do not call ahci_start() before device signature received. It is required > by the specification and caused non-fatal reset timeouts on AMD chipsets. Do you have to use DELAY() here rather than a blocking sleep via pause()? -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220736 - head/sbin/natd
On Sun, Apr 17, 2011 at 06:05:38AM +, Maxim Sobolev wrote: M> Author: sobomax M> Date: Sun Apr 17 06:05:37 2011 M> New Revision: 220736 M> URL: http://svn.freebsd.org/changeset/base/220736 M> M> Log: M> If we can retrieve interface address sleep for one second and try again. M> This can happen during start-up, when natd starts before dhclient has a M> chance to receive IP address from the upstream provider. M> M> MFC after: 2 weeks This looks like a hack and better place for this hack would be shell scripts rather than nat daemon. -- Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc
On Mon, Apr 18, 2011 at 11:06:42AM -0600, Warner Losh wrote: > > On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: > > > please mark this in src/UPDATING, maybe bump freebsd_version too? > > Please do not bump freebsd_version just for this. Ports wishing to know can > go off the last bump, if there are any. > > Every freebsd_version bump forces rebuilding all modules and such and is a > pita. I agree that this is a PITA, but there also should be a way to force module load even on version bump. This is PITA especially for developers. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpurWxPsKu5d.pgp Description: PGP signature
svn commit: r220795 - stable/8/sys/dev/cxgbe
Author: np Date: Mon Apr 18 18:18:07 2011 New Revision: 220795 URL: http://svn.freebsd.org/changeset/base/220795 Log: MFC r220643: There is no need to request a tx credit flush if such a request is already pending. Modified: stable/8/sys/dev/cxgbe/adapter.h stable/8/sys/dev/cxgbe/t4_main.c stable/8/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/cxgbe/adapter.h == --- stable/8/sys/dev/cxgbe/adapter.hMon Apr 18 17:43:16 2011 (r220794) +++ stable/8/sys/dev/cxgbe/adapter.hMon Apr 18 18:18:07 2011 (r220795) @@ -260,7 +260,7 @@ enum { /* eq flags */ EQ_ALLOCATED= (1 << 1), /* firmware resources allocated */ EQ_STARTED = (1 << 2), /* started */ - EQ_STALLED = (1 << 3), /* currently stalled */ + EQ_CRFLUSHED= (1 << 3), /* expecting an update from SGE */ }; /* Modified: stable/8/sys/dev/cxgbe/t4_main.c == --- stable/8/sys/dev/cxgbe/t4_main.cMon Apr 18 17:43:16 2011 (r220794) +++ stable/8/sys/dev/cxgbe/t4_main.cMon Apr 18 18:18:07 2011 (r220795) @@ -2673,6 +2673,7 @@ cxgbe_txq_start(void *arg, int count) struct sge_txq *txq = arg; TXQ_LOCK(txq); + txq->eq.flags &= ~EQ_CRFLUSHED; txq_start(txq->ifp, txq); TXQ_UNLOCK(txq); } Modified: stable/8/sys/dev/cxgbe/t4_sge.c == --- stable/8/sys/dev/cxgbe/t4_sge.c Mon Apr 18 17:43:16 2011 (r220794) +++ stable/8/sys/dev/cxgbe/t4_sge.c Mon Apr 18 18:18:07 2011 (r220795) @@ -876,7 +876,7 @@ doorbell: * WR that reduced it to 0 so we don't need another flush (we don't have * any descriptor for a flush WR anyway, duh). */ - if (m && eq->avail > 0) + if (m && eq->avail > 0 && !(eq->flags & EQ_CRFLUSHED)) write_eqflush_wr(eq); txq->m = m; @@ -1882,8 +1882,11 @@ write_txpkt_wr(struct port_info *pi, str wr->op_immdlen = htobe32(V_FW_WR_OP(FW_ETH_TX_PKT_WR) | V_FW_WR_IMMDLEN(ctrl)); ctrl = V_FW_WR_LEN16(howmany(nflits, 2)); - if (eq->avail == ndesc) + if (eq->avail == ndesc && !(eq->flags & EQ_CRFLUSHED)) { ctrl |= F_FW_WR_EQUEQ | F_FW_WR_EQUIQ; + eq->flags |= EQ_CRFLUSHED; + } + wr->equiq_to_len16 = htobe32(ctrl); wr->r3 = 0; @@ -2071,8 +2074,10 @@ write_txpkts_wr(struct sge_txq *txq, str wr->op_immdlen = htobe32(V_FW_WR_OP(FW_ETH_TX_PKTS_WR) | V_FW_WR_IMMDLEN(0)); /* immdlen does not matter in this WR */ ctrl = V_FW_WR_LEN16(howmany(txpkts->nflits, 2)); - if (eq->avail == ndesc) + if (eq->avail == ndesc && !(eq->flags & EQ_CRFLUSHED)) { ctrl |= F_FW_WR_EQUEQ | F_FW_WR_EQUIQ; + eq->flags |= EQ_CRFLUSHED; + } wr->equiq_to_len16 = htobe32(ctrl); wr->plen = htobe16(txpkts->plen); wr->npkt = txpkts->npkt; @@ -2083,7 +2088,7 @@ write_txpkts_wr(struct sge_txq *txq, str txsd = &eq->sdesc[eq->pidx]; txsd->desc_used = ndesc; - KASSERT(eq->avail >= ndesc, ("%s: out ouf descriptors", __func__)); + KASSERT(eq->avail >= ndesc, ("%s: out of descriptors", __func__)); eq->pending += ndesc; eq->avail -= ndesc; @@ -2384,6 +2389,7 @@ write_eqflush_wr(struct sge_eq *eq) txsd->desc_used = 1; txsd->map_used = 0; + eq->flags |= EQ_CRFLUSHED; eq->pending++; eq->avail--; if (++eq->pidx == eq->cap) @@ -2438,6 +2444,10 @@ handle_sge_egr_update(struct adapter *sc struct port_info *pi; txq = (void *)s->eqmap[qid - s->eq_start]; + + KASSERT(txq->eq.flags & EQ_CRFLUSHED, + ("%s: tx queue %p not expecting an update.", __func__, txq)); + pi = txq->ifp->if_softc; taskqueue_enqueue(pi->tq, &txq->resume_tx); txq->egr_update++; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc
On 04/18/2011 11:14, Pawel Jakub Dawidek wrote: On Mon, Apr 18, 2011 at 11:06:42AM -0600, Warner Losh wrote: On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: please mark this in src/UPDATING, maybe bump freebsd_version too? Please do not bump freebsd_version just for this. Ports wishing to know can go off the last bump, if there are any. Every freebsd_version bump forces rebuilding all modules and such and is a pita. I agree that this is a PITA, but there also should be a way to force module load even on version bump. This is PITA especially for developers. who make up a tiny percentage of the FreeBSD user community. Seriously? We're going to whine because version bumps cause a little extra compile time? -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ 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: r220796 - head/sys/netinet/ipfw
Author: glebius Date: Mon Apr 18 18:22:10 2011 New Revision: 220796 URL: http://svn.freebsd.org/changeset/base/220796 Log: Pullup up to TCP header length before matching against 'tcpopts'. PR: kern/156180 Reviewed by: luigi Modified: head/sys/netinet/ipfw/ip_fw2.c Modified: head/sys/netinet/ipfw/ip_fw2.c == --- head/sys/netinet/ipfw/ip_fw2.c Mon Apr 18 18:18:07 2011 (r220795) +++ head/sys/netinet/ipfw/ip_fw2.c Mon Apr 18 18:22:10 2011 (r220796) @@ -913,9 +913,10 @@ ipfw_chk(struct ip_fw_args *args) * pointer might become stale after other pullups (but we never use it * this way). */ -#define PULLUP_TO(_len, p, T) \ +#define PULLUP_TO(_len, p, T) PULLUP_LEN(_len, p, sizeof(T)) +#define PULLUP_LEN(_len, p, T) \ do { \ - int x = (_len) + sizeof(T); \ + int x = (_len) + T; \ if ((m)->m_len < x) { \ args->m = m = m_pullup(m, x); \ if (m == NULL) \ @@ -1600,6 +1601,7 @@ do { \ break; case O_TCPOPTS: + PULLUP_LEN(hlen, ulp, (TCP(ulp)->th_off << 2)); match = (proto == IPPROTO_TCP && offset == 0 && tcpopts_match(TCP(ulp), cmd)); break; @@ -2233,6 +2235,7 @@ do { \ } } /* end of inner loop, scan opcodes */ +#undef PULLUP_LEN if (done) 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"
Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc
On Monday, April 18, 2011 1:06:42 pm Warner Losh wrote: > > On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: > > > please mark this in src/UPDATING, maybe bump freebsd_version too? > > Please do not bump freebsd_version just for this. Ports wishing to know can > go off the last bump, if there are any. > > Every freebsd_version bump forces rebuilding all modules and such and is a > pita. No, what it breaks is building a module with a newer source tree than your running kernel and trying to kldload it. That is never really supported, but the kernel only notices when a version bump happens. The real fix there is to run a kernel + modules that are in sync on test boxes. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r220797 - stable/8/sys/amd64/amd64
Author: jhb Date: Mon Apr 18 18:55:27 2011 New Revision: 220797 URL: http://svn.freebsd.org/changeset/base/220797 Log: MFC 220430,220431,220452,220460: If a system call does not request a full interrupt return, use a fast path via the sysretq instruction to return from the system call. This resolves most of the performance regression in system call microbenchmarks between 7 and 8 on amd64. While here, trim an instruction (and memory access) from the doreti path and fix a typo in a comment. Modified: stable/8/sys/amd64/amd64/exception.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/amd64/exception.S == --- stable/8/sys/amd64/amd64/exception.SMon Apr 18 18:22:10 2011 (r220796) +++ stable/8/sys/amd64/amd64/exception.SMon Apr 18 18:55:27 2011 (r220797) @@ -339,6 +339,9 @@ IDTVEC(prot) * and the new privilige level. We are still running on the old user stack * pointer. We have to juggle a few things around to find our stack etc. * swapgs gives us access to our PCPU space only. + * + * We do not support invoking this from a custom %cs or %ss (e.g. using + * entries from an LDT). */ IDTVEC(fast_syscall) swapgs @@ -379,7 +382,38 @@ IDTVEC(fast_syscall) FAKE_MCOUNT(TF_RIP(%rsp)) movq%rsp,%rdi callsyscall - movqPCPU(CURPCB),%rax +1: movqPCPU(CURPCB),%rax + /* Disable interrupts before testing PCB_FULL_IRET. */ + cli + testl $PCB_FULL_IRET,PCB_FLAGS(%rax) + jnz 3f + /* Check for and handle AST's on return to userland. */ + movqPCPU(CURTHREAD),%rax + testl $TDF_ASTPENDING | TDF_NEEDRESCHED,TD_FLAGS(%rax) + je 2f + sti + movq%rsp, %rdi + callast + jmp 1b +2: /* Restore preserved registers. */ + MEXITCOUNT + movqTF_RDI(%rsp),%rdi /* bonus; preserve arg 1 */ + movqTF_RSI(%rsp),%rsi /* bonus: preserve arg 2 */ + movqTF_RDX(%rsp),%rdx /* return value 2 */ + movqTF_RAX(%rsp),%rax /* return value 1 */ + movqTF_RBX(%rsp),%rbx /* C preserved */ + movqTF_RBP(%rsp),%rbp /* C preserved */ + movqTF_R12(%rsp),%r12 /* C preserved */ + movqTF_R13(%rsp),%r13 /* C preserved */ + movqTF_R14(%rsp),%r14 /* C preserved */ + movqTF_R15(%rsp),%r15 /* C preserved */ + movqTF_RFLAGS(%rsp),%r11/* original %rflags */ + movqTF_RIP(%rsp),%rcx /* original %rip */ + movqTF_RSP(%rsp),%r9/* user stack pointer */ + movq%r9,%rsp/* original %rsp */ + swapgs + sysretq +3: /* Requested full context restore, use doreti for that. */ MEXITCOUNT jmp doreti @@ -628,7 +662,7 @@ doreti: doreti_ast: /* * Check for ASTs atomically with returning. Disabling CPU -* interrupts provides sufficient locking eve in the SMP case, +* interrupts provides sufficient locking even in the SMP case, * since we will be informed of any new ASTs by an IPI. */ cli @@ -649,8 +683,7 @@ doreti_ast: */ doreti_exit: MEXITCOUNT - movqPCPU(CURTHREAD),%r8 - movqTD_PCB(%r8),%r8 + movqPCPU(CURPCB),%r8 /* * Do not reload segment registers for 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: r220798 - head/sys/dev/acpica
Author: mdf Date: Mon Apr 18 19:02:41 2011 New Revision: 220798 URL: http://svn.freebsd.org/changeset/base/220798 Log: Fix a few acpi sysctls that want "IK" formatting to specify CTLTYPE_INT. This got broken after r217586. Pointy hat: to me Tested by:David Wolfskill < davit AT catwhisker DOT org > Modified: head/sys/dev/acpica/acpi_thermal.c Modified: head/sys/dev/acpica/acpi_thermal.c == --- head/sys/dev/acpica/acpi_thermal.c Mon Apr 18 18:55:27 2011 (r220797) +++ head/sys/dev/acpica/acpi_thermal.c Mon Apr 18 19:02:41 2011 (r220798) @@ -257,10 +257,10 @@ acpi_tz_attach(device_t dev) sc->tz_sysctl_tree = SYSCTL_ADD_NODE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, oidname, CTLFLAG_RD, 0, ""); -SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), - OID_AUTO, "temperature", CTLFLAG_RD, &sc->tz_temperature, - sizeof(sc->tz_temperature), "IK", - "current thermal zone temperature"); +SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), + OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, + &sc->tz_temperature, 0, sysctl_handle_int, + "IK", "current thermal zone temperature"); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "active", CTLTYPE_INT | CTLFLAG_RW, sc, 0, acpi_tz_active_sysctl, "I", "cooling is active"); @@ -286,9 +286,9 @@ acpi_tz_attach(device_t dev) sc, offsetof(struct acpi_tz_softc, tz_zone.crt), acpi_tz_temp_sysctl, "IK", "critical temp setpoint (shutdown now)"); -SYSCTL_ADD_OPAQUE(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), - OID_AUTO, "_ACx", CTLFLAG_RD, &sc->tz_zone.ac, - sizeof(sc->tz_zone.ac), "IK", ""); +SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), + OID_AUTO, "_ACx", CTLTYPE_INT | CTLFLAG_RD, + &sc->tz_zone.ac, 0, sysctl_handle_int, "IK", ""); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "_TC1", CTLTYPE_INT | CTLFLAG_RW, sc, offsetof(struct acpi_tz_softc, tz_zone.tc1), ___ 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: r220799 - head/bin/ps
Author: trasz Date: Mon Apr 18 19:20:47 2011 New Revision: 220799 URL: http://svn.freebsd.org/changeset/base/220799 Log: Document problems with -d/-w and the fact that -X is the default. Suggested by: arundel@ Reviewed by: arundel@ Modified: head/bin/ps/ps.1 Modified: head/bin/ps/ps.1 == --- head/bin/ps/ps.1Mon Apr 18 19:02:41 2011(r220798) +++ head/bin/ps/ps.1Mon Apr 18 19:20:47 2011(r220799) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 16, 2011 +.Dd April 18, 2011 .Dt PS 1 .Os .Sh NAME @@ -130,7 +130,10 @@ If either of the and .Fl r options are also used, they control how sibling processes are sorted -relative to eachother. +relative to each other. +Note that this option has no effect if the +.Dq command +column is not the last column displayed. .It Fl e Display the environment as well. .It Fl f @@ -244,9 +247,13 @@ If the option is specified more than once, .Nm will use as many columns as necessary without regard for your window size. +Note that this option has no effect if the +.Dq command +column is not the last column displayed. .It Fl X When displaying processes matched by other options, skip any processes which do not have a controlling terminal. +This is the default behaviour. .It Fl x When displaying processes matched by other options, include processes which do not have a controlling terminal. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys
On Mon, Apr 18, 2011 at 04:32:22PM +, Matthew D Fleming wrote: > Author: mdf > Date: Mon Apr 18 16:32:22 2011 > New Revision: 220791 > URL: http://svn.freebsd.org/changeset/base/220791 > > Log: > Add the posix_fallocate(2) syscall. The default implementation in > vop_stdallocate() is filesystem agnostic and will run as slow as a > read/write loop in userspace; however, it serves to correctly > implement the functionality for filesystems that do not implement a > VOP_ALLOCATE. > > Note that __FreeBSD_version was already bumped today to 900036 for any > ports which would like to use this function. > > Also reserve space in the syscall table for posix_fadvise(2). > > Reviewed by:-arch (previous version) Thank you for taking the remarks into consideration. > > +int > +vop_stdallocate(struct vop_allocate_args *ap) > +{ > +#ifdef __notyet__ > + struct statfs sfs; > +#endif > + struct iovec aiov; > + struct vattr vattr, *vap; > + struct uio auio; > + off_t len, cur, offset; > + uint8_t *buf; > + struct thread *td; > + struct vnode *vp; > + size_t iosize; > + int error, locked; > + > + buf = NULL; > + error = 0; > + locked = 1; > + td = curthread; > + vap = &vattr; > + vp = ap->a_vp; > + len = ap->a_len; > + offset = ap->a_offset; > + > + error = VOP_GETATTR(vp, vap, td->td_ucred); > + if (error != 0) > + goto out; > + iosize = vap->va_blocksize; > + if (iosize == 0) > + iosize = BLKDEV_IOSIZE; > + if (iosize > MAXPHYS) > + iosize = MAXPHYS; > + buf = malloc(iosize, M_TEMP, M_WAITOK); > + > +#ifdef __notyet__ > + /* > + * Check if the filesystem sets f_maxfilesize; if not use > + * VOP_SETATTR to perform the check. > + */ > + error = VFS_STATFS(vp->v_mount, &sfs, td); > + if (error != 0) > + goto out; > + if (sfs.f_maxfilesize) { > + if (offset > sfs.f_maxfilesize || len > sfs.f_maxfilesize || > + offset + len > sfs.f_maxfilesize) { > + error = EFBIG; > + goto out; > + } > + } else > +#endif > + if (offset + len > vap->va_size) { > + VATTR_NULL(vap); > + vap->va_size = offset + len; > + error = VOP_SETATTR(vp, vap, td->td_ucred); > + if (error != 0) > + goto out; > + } I still do not see a reason to do VOP_SETATTR() there. VOP_WRITE() will do auto-extend as needed. Also, see below. > + > + while (len > 0) { > + if (should_yield()) { > + VOP_UNLOCK(vp, 0); > + locked = 0; > + kern_yield(-1); Please note that, despite dropping the vnode lock, the snapshot creation is still blocked at this point, due to previous vn_start_write(). If doing vn_finished_write() there, then bwillwrite() before next iteration is desired. > + error = vn_lock(vp, LK_EXCLUSIVE); > + if (error != 0) > + break; > + locked = 1; > + error = VOP_GETATTR(vp, vap, td->td_ucred); > + if (error != 0) > + break; > + } > + > + /* > + * Read and write back anything below the nominal file > + * size. There's currently no way outside the filesystem > + * to know whether this area is sparse or not. > + */ > + cur = iosize; > + if ((offset % iosize) != 0) > + cur -= (offset % iosize); > + if (cur > len) > + cur = len; > + if (offset < vap->va_size) { > + aiov.iov_base = buf; > + aiov.iov_len = cur; > + auio.uio_iov = &aiov; > + auio.uio_iovcnt = 1; > + auio.uio_offset = offset; > + auio.uio_resid = cur; > + auio.uio_segflg = UIO_SYSSPACE; > + auio.uio_rw = UIO_READ; > + auio.uio_td = td; > + error = VOP_READ(vp, &auio, 0, td->td_ucred); > + if (error != 0) > + break; > + if (auio.uio_resid > 0) { > + bzero(buf + cur - auio.uio_resid, > + auio.uio_resid); > + } > + } else { > + bzero(buf, cur); > + } Wouldn't VOP_SETATTR() at the start of the function mostly prevent this bzero from executing ? > + > + aiov.iov_base = buf; > + aiov.iov_len = cur; > + auio.uio_iov = &aiov; > + auio.uio_iovcnt = 1; > + auio.uio_offset = offset; > + auio.uio_r
Re: svn commit: r220777 - head/sys/dev/ahci
On 18.04.2011 20:06, John Baldwin wrote: On Monday, April 18, 2011 9:34:31 am Alexander Motin wrote: Author: mav Date: Mon Apr 18 13:34:31 2011 New Revision: 220777 URL: http://svn.freebsd.org/changeset/base/220777 Log: - Tune different wait loops to cut some more milliseconds from reset time. - Do not call ahci_start() before device signature received. It is required by the specification and caused non-fatal reset timeouts on AMD chipsets. Do you have to use DELAY() here rather than a blocking sleep via pause()? At the moment I would say yes. These paths are called from CAM while holding SIM lock. CAM may not like if I drop the lock in the middle of the call. Also during recovery those functions could be called from the callout and interrupt threads. In that case even dropping the lock won't allow thread to sleep. I will think more about possibilities to refactor the code to replace some DELAYs with callouts, but requirement to keep functionality in polled mode doesn't make the task easier. -- Alexander Motin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220736 - head/sbin/natd
2011/4/18 Gleb Smirnoff : > On Sun, Apr 17, 2011 at 06:05:38AM +, Maxim Sobolev wrote: > M> Author: sobomax > M> Date: Sun Apr 17 06:05:37 2011 > M> New Revision: 220736 > M> URL: http://svn.freebsd.org/changeset/base/220736 > M> > M> Log: > M> Â If we can retrieve interface address sleep for one second and try again. > M> Â This can happen during start-up, when natd starts before dhclient has a > M> Â chance to receive IP address from the upstream provider. > M> > M> Â MFC after: 2 weeks > > This looks like a hack and better place for this hack would be shell > scripts rather than nat daemon. +1 -- in particular because this will affect all cases, and not just the dhclient-acquired IP external NIC case as the above commit message notes. Thanks, -Garrett ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys
On Mon, Apr 18, 2011 at 10:28:10PM +0300, Kostik Belousov wrote: > > + if (offset + len > vap->va_size) { > > + VATTR_NULL(vap); > > + vap->va_size = offset + len; > > + error = VOP_SETATTR(vp, vap, td->td_ucred); > > + if (error != 0) > > + goto out; > > + } > I still do not see a reason to do VOP_SETATTR() there. VOP_WRITE() will > do auto-extend as needed. Also, see below. Yeah, also when we extend file size we could skip reading zeros. > > + if (offset < vap->va_size) { [...] > > + } else { > > + bzero(buf, cur); > > + } > Wouldn't VOP_SETATTR() at the start of the function mostly prevent > this bzero from executing ? Once we drop the vnode lock, the file size can change under us, no? > I estimated what it would take to do the optimized implementation for UFS, > and I think that the following change would allow to lessen the code > duplication much. > > What if the vnode lock drop and looping be handled by the syscall, instead > of the vop implementation ? In other words, allow the VOP_ALLOCATE() > to allocate less then requested, and return the allocated amount to > the caller. The loop would be centralized then, freeing fs from doing > the dance. Also, if fs considers that suitable, it would do a whole > allocation in one run. I'd still go with SEEK_DATA/SEEK_HOLE loop as I suggested on arch@. If you would like to spend time on it, having SEEK_DATA/SEEK_HOLE support in UFS would be beneficial for other purposes too. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgp1qSb3OEnrS.pgp Description: PGP signature
Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc
On Apr 18, 2011, at 12:18 PM, Doug Barton wrote: > On 04/18/2011 11:14, Pawel Jakub Dawidek wrote: >> On Mon, Apr 18, 2011 at 11:06:42AM -0600, Warner Losh wrote: >>> >>> On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: >>> please mark this in src/UPDATING, maybe bump freebsd_version too? >>> >>> Please do not bump freebsd_version just for this. Ports wishing to know >>> can go off the last bump, if there are any. >>> >>> Every freebsd_version bump forces rebuilding all modules and such and is a >>> pita. >> >> I agree that this is a PITA, but there also should be a way to force >> module load even on version bump. This is PITA especially for >> developers. > > who make up a tiny percentage of the FreeBSD user community. Seriously? > We're going to whine because version bumps cause a little extra compile time? The problem usually manifests itself when I got to debug a new problem, load a driver and find I have to rebuild everything else to use it, which forces an extra reboot on the machine in question. Sometimes this can be quite disruptive to other things that machine is doing. In this case, there was a new kernel thing just after, so it turned out OK. But let's not gratuitously bump the version since the granularity we have already allows the ports to make good choices on when to leave something in or out. Warner ___ 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: r220800 - in head/sys: netgraph netinet/ipfw netinet/libalias
Author: glebius Date: Mon Apr 18 20:07:08 2011 New Revision: 220800 URL: http://svn.freebsd.org/changeset/base/220800 Log: LibAliasInit() should allocate memory with M_WAITOK flag. Modify it and its callers. Modified: head/sys/netgraph/ng_nat.c head/sys/netinet/ipfw/ip_fw_nat.c head/sys/netinet/libalias/alias_db.c Modified: head/sys/netgraph/ng_nat.c == --- head/sys/netgraph/ng_nat.c Mon Apr 18 19:20:47 2011(r220799) +++ head/sys/netgraph/ng_nat.c Mon Apr 18 20:07:08 2011(r220800) @@ -276,10 +276,6 @@ ng_nat_constructor(node_p node) /* Init aliasing engine. */ priv->lib = LibAliasInit(NULL); - if (priv->lib == NULL) { - free(priv, M_NETGRAPH); - return (ENOMEM); - } /* Set same ports on. */ (void )LibAliasSetMode(priv->lib, PKT_ALIAS_SAME_PORTS, Modified: head/sys/netinet/ipfw/ip_fw_nat.c == --- head/sys/netinet/ipfw/ip_fw_nat.c Mon Apr 18 19:20:47 2011 (r220799) +++ head/sys/netinet/ipfw/ip_fw_nat.c Mon Apr 18 20:07:08 2011 (r220800) @@ -359,28 +359,17 @@ ipfw_nat_cfg(struct sockopt *sopt) IPFW_WLOCK(chain); ptr = lookup_nat(&chain->nat, ser_n->id); if (ptr == NULL) { + IPFW_WUNLOCK(chain); /* New rule: allocate and init new instance. */ - ptr = malloc(sizeof(struct cfg_nat), - M_IPFW, M_NOWAIT | M_ZERO); - if (ptr == NULL) { - IPFW_WUNLOCK(chain); - free(buf, M_IPFW); - return (ENOSPC); - } + ptr = malloc(sizeof(struct cfg_nat), M_IPFW, M_WAITOK | M_ZERO); ptr->lib = LibAliasInit(NULL); - if (ptr->lib == NULL) { - IPFW_WUNLOCK(chain); - free(ptr, M_IPFW); - free(buf, M_IPFW); - return (EINVAL); - } LIST_INIT(&ptr->redir_chain); } else { /* Entry already present: temporarly unhook it. */ LIST_REMOVE(ptr, _next); flush_nat_ptrs(chain, ser_n->id); + IPFW_WUNLOCK(chain); } - IPFW_WUNLOCK(chain); /* * Basic nat configuration. @@ -407,6 +396,10 @@ ipfw_nat_cfg(struct sockopt *sopt) add_redir_spool_cfg(&buf[(sizeof(struct cfg_nat))], ptr); free(buf, M_IPFW); IPFW_WLOCK(chain); + /* +* XXXGL race here: another ipfw_nat_cfg() may already inserted +* entry with the same ser_n->id. +*/ LIST_INSERT_HEAD(&chain->nat, ptr, _next); IPFW_WUNLOCK(chain); return (0); Modified: head/sys/netinet/libalias/alias_db.c == --- head/sys/netinet/libalias/alias_db.cMon Apr 18 19:20:47 2011 (r220799) +++ head/sys/netinet/libalias/alias_db.cMon Apr 18 20:07:08 2011 (r220800) @@ -2490,9 +2490,14 @@ LibAliasInit(struct libalias *la) #endif if (la == NULL) { +#ifdef _KERNEL +#undef malloc /* XXX: ugly */ + la = malloc(sizeof *la, M_ALIAS, M_WAITOK | M_ZERO); +#else la = calloc(sizeof *la, 1); if (la == NULL) return (la); +#endif #ifndef_KERNEL /* kernel cleans up on module unload */ if (LIST_EMPTY(&instancehead)) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc
On Apr 18, 2011, at 12:48 PM, John Baldwin wrote: > On Monday, April 18, 2011 1:06:42 pm Warner Losh wrote: >> >> On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: >> >>> please mark this in src/UPDATING, maybe bump freebsd_version too? >> >> Please do not bump freebsd_version just for this. Ports wishing to know can >> go off the last bump, if there are any. >> >> Every freebsd_version bump forces rebuilding all modules and such and is a >> pita. > > No, what it breaks is building a module with a newer source tree than your > running kernel and trying to kldload it. That is never really supported, > but the kernel only notices when a version bump happens. The real fix there > is to run a kernel + modules that are in sync on test boxes. The problem is that this is a technical solution that precludes me from saying "look, I know that this will be OK, so let me do it" I know nothing has changed that would cause a problem. Warner ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys
On Mon, Apr 18, 2011 at 12:49:38PM -0700, m...@freebsd.org wrote: > On Mon, Apr 18, 2011 at 12:28 PM, Kostik Belousov wrote: > > On Mon, Apr 18, 2011 at 04:32:22PM +, Matthew D Fleming wrote: > >> Author: mdf > >> Date: Mon Apr 18 16:32:22 2011 > >> New Revision: 220791 > >> URL: http://svn.freebsd.org/changeset/base/220791 > >> > >> Log: > >> Â Add the posix_fallocate(2) syscall. Â The default implementation in > >> Â vop_stdallocate() is filesystem agnostic and will run as slow as a > >> Â read/write loop in userspace; however, it serves to correctly > >> Â implement the functionality for filesystems that do not implement a > >> Â VOP_ALLOCATE. > >> > >> Â Note that __FreeBSD_version was already bumped today to 900036 for any > >> Â ports which would like to use this function. > >> > >> Â Also reserve space in the syscall table for posix_fadvise(2). > > >> +#ifdef __notyet__ > >> + Â Â /* > >> + Â Â Â * Check if the filesystem sets f_maxfilesize; if not use > >> + Â Â Â * VOP_SETATTR to perform the check. > >> + Â Â Â */ > >> + Â Â error = VFS_STATFS(vp->v_mount, &sfs, td); > >> + Â Â if (error != 0) > >> + Â Â Â Â Â Â goto out; > >> + Â Â if (sfs.f_maxfilesize) { > >> + Â Â Â Â Â Â if (offset > sfs.f_maxfilesize || len > sfs.f_maxfilesize || > >> + Â Â Â Â Â Â Â Â offset + len > sfs.f_maxfilesize) { > >> + Â Â Â Â Â Â Â Â Â Â error = EFBIG; > >> + Â Â Â Â Â Â Â Â Â Â goto out; > >> + Â Â Â Â Â Â } > >> + Â Â } else > >> +#endif > >> + Â Â if (offset + len > vap->va_size) { > >> + Â Â Â Â Â Â VATTR_NULL(vap); > >> + Â Â Â Â Â Â vap->va_size = offset + len; > >> + Â Â Â Â Â Â error = VOP_SETATTR(vp, vap, td->td_ucred); > >> + Â Â Â Â Â Â if (error != 0) > >> + Â Â Â Â Â Â Â Â Â Â goto out; > >> + Â Â } > > I still do not see a reason to do VOP_SETATTR() there. VOP_WRITE() will > > do auto-extend as needed. Also, see below. > > The need is, as commented, to return EFBIG when the new file size will > be larger than the FS supports. Without this code, passing in > something like posix_fallocate(fd, 0, OFF_MAX) will run the filesystem > out of space. Handling max file size and not overflowing the fs are different things. VOP_WRITE() will handle file size on its own too. I see no problem with exhausting free space if this is what user asked for. > > >> + > >> + Â Â while (len > 0) { > >> + Â Â Â Â Â Â if (should_yield()) { > >> + Â Â Â Â Â Â Â Â Â Â VOP_UNLOCK(vp, 0); > >> + Â Â Â Â Â Â Â Â Â Â locked = 0; > >> + Â Â Â Â Â Â Â Â Â Â kern_yield(-1); > > Please note that, despite dropping the vnode lock, the snapshot creation > > is still blocked at this point, due to previous vn_start_write(). > > > > If doing vn_finished_write() there, then bwillwrite() before > > next iteration is desired. > >> + Â Â Â Â Â Â Â Â Â Â error = vn_lock(vp, LK_EXCLUSIVE); > >> + Â Â Â Â Â Â Â Â Â Â if (error != 0) > >> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â break; > >> + Â Â Â Â Â Â Â Â Â Â locked = 1; > >> + Â Â Â Â Â Â Â Â Â Â error = VOP_GETATTR(vp, vap, td->td_ucred); > >> + Â Â Â Â Â Â Â Â Â Â if (error != 0) > >> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â break; > >> + Â Â Â Â Â Â } > >> + > >> + Â Â Â Â Â Â /* > >> + Â Â Â Â Â Â Â * Read and write back anything below the nominal file > >> + Â Â Â Â Â Â Â * size. Â There's currently no way outside the filesystem > >> + Â Â Â Â Â Â Â * to know whether this area is sparse or not. > >> + Â Â Â Â Â Â Â */ > >> + Â Â Â Â Â Â cur = iosize; > >> + Â Â Â Â Â Â if ((offset % iosize) != 0) > >> + Â Â Â Â Â Â Â Â Â Â cur -= (offset % iosize); > >> + Â Â Â Â Â Â if (cur > len) > >> + Â Â Â Â Â Â Â Â Â Â cur = len; > >> + Â Â Â Â Â Â if (offset < vap->va_size) { > >> + Â Â Â Â Â Â Â Â Â Â aiov.iov_base = buf; > >> + Â Â Â Â Â Â Â Â Â Â aiov.iov_len = cur; > >> + Â Â Â Â Â Â Â Â Â Â auio.uio_iov = &aiov; > >> + Â Â Â Â Â Â Â Â Â Â auio.uio_iovcnt = 1; > >> + Â Â Â Â Â Â Â Â Â Â auio.uio_offset = offset; > >> + Â Â Â Â Â Â Â Â Â Â auio.uio_resid = cur; > >> + Â Â Â Â Â Â Â Â Â Â auio.uio_segflg = UIO_SYSSPACE; > >> + Â Â Â Â Â Â Â Â Â Â auio.uio_rw = UIO_READ; > >> + Â Â Â Â Â Â Â Â Â Â auio.uio_td = td; > >> + Â Â Â Â Â Â Â Â Â Â error = VOP_READ(vp, &auio, 0, td->td_ucred); > >> + Â Â Â Â Â Â Â Â Â Â if (error != 0) > >> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â break; > >> + Â Â Â Â Â Â Â Â Â Â if (auio.uio_resid > 0) { > >> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â bzero(buf + cur - auio.uio_resid, > >> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â auio.uio_resid); > >> + Â Â Â Â Â Â Â Â Â Â } > >> + Â Â Â Â Â Â } else { > >> + Â Â Â Â Â Â Â Â Â Â bzero(buf, cur); > >> + Â Â Â Â Â Â } > > Wouldn't VOP_SETATTR() at the start of the function mostly prevent > > this bzero from executing ? > > Yes. If struct statfs had a member indicating the file system's max > file size, then the extend wouldn't be necessary. We have that > feature locally, but it's only implemented for ufs and our custom file > system, and it requires an ABI change so it's a bit of work to > upstream. And as with most of those things, it's hard to find the > time to upstr
Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys
On Mon, Apr 18, 2011 at 12:28 PM, Kostik Belousov wrote: > On Mon, Apr 18, 2011 at 04:32:22PM +, Matthew D Fleming wrote: >> Author: mdf >> Date: Mon Apr 18 16:32:22 2011 >> New Revision: 220791 >> URL: http://svn.freebsd.org/changeset/base/220791 >> >> Log: >>  Add the posix_fallocate(2) syscall.  The default implementation in >>  vop_stdallocate() is filesystem agnostic and will run as slow as a >>  read/write loop in userspace; however, it serves to correctly >>  implement the functionality for filesystems that do not implement a >>  VOP_ALLOCATE. >> >>  Note that __FreeBSD_version was already bumped today to 900036 for any >>  ports which would like to use this function. >> >>  Also reserve space in the syscall table for posix_fadvise(2). >> +#ifdef __notyet__ >> +   /* >> +    * Check if the filesystem sets f_maxfilesize; if not use >> +    * VOP_SETATTR to perform the check. >> +    */ >> +   error = VFS_STATFS(vp->v_mount, &sfs, td); >> +   if (error != 0) >> +       goto out; >> +   if (sfs.f_maxfilesize) { >> +       if (offset > sfs.f_maxfilesize || len > sfs.f_maxfilesize || >> +         offset + len > sfs.f_maxfilesize) { >> +           error = EFBIG; >> +           goto out; >> +       } >> +   } else >> +#endif >> +   if (offset + len > vap->va_size) { >> +       VATTR_NULL(vap); >> +       vap->va_size = offset + len; >> +       error = VOP_SETATTR(vp, vap, td->td_ucred); >> +       if (error != 0) >> +           goto out; >> +   } > I still do not see a reason to do VOP_SETATTR() there. VOP_WRITE() will > do auto-extend as needed. Also, see below. The need is, as commented, to return EFBIG when the new file size will be larger than the FS supports. Without this code, passing in something like posix_fallocate(fd, 0, OFF_MAX) will run the filesystem out of space. >> + >> +   while (len > 0) { >> +       if (should_yield()) { >> +           VOP_UNLOCK(vp, 0); >> +           locked = 0; >> +           kern_yield(-1); > Please note that, despite dropping the vnode lock, the snapshot creation > is still blocked at this point, due to previous vn_start_write(). > > If doing vn_finished_write() there, then bwillwrite() before > next iteration is desired. >> +           error = vn_lock(vp, LK_EXCLUSIVE); >> +           if (error != 0) >> +               break; >> +           locked = 1; >> +           error = VOP_GETATTR(vp, vap, td->td_ucred); >> +           if (error != 0) >> +               break; >> +       } >> + >> +       /* >> +        * Read and write back anything below the nominal file >> +        * size.  There's currently no way outside the filesystem >> +        * to know whether this area is sparse or not. >> +        */ >> +       cur = iosize; >> +       if ((offset % iosize) != 0) >> +           cur -= (offset % iosize); >> +       if (cur > len) >> +           cur = len; >> +       if (offset < vap->va_size) { >> +           aiov.iov_base = buf; >> +           aiov.iov_len = cur; >> +           auio.uio_iov = &aiov; >> +           auio.uio_iovcnt = 1; >> +           auio.uio_offset = offset; >> +           auio.uio_resid = cur; >> +           auio.uio_segflg = UIO_SYSSPACE; >> +           auio.uio_rw = UIO_READ; >> +           auio.uio_td = td; >> +           error = VOP_READ(vp, &auio, 0, td->td_ucred); >> +           if (error != 0) >> +               break; >> +           if (auio.uio_resid > 0) { >> +               bzero(buf + cur - auio.uio_resid, >> +                 auio.uio_resid); >> +           } >> +       } else { >> +           bzero(buf, cur); >> +       } > Wouldn't VOP_SETATTR() at the start of the function mostly prevent > this bzero from executing ? Yes. If struct statfs had a member indicating the file system's max file size, then the extend wouldn't be necessary. We have that feature locally, but it's only implemented for ufs and our custom file system, and it requires an ABI change so it's a bit of work to upstream. And as with most of those things, it's hard to find the time to upstream it outside of work hours. > I estimated what it would take to do the optimized implementation for UFS, > and I think that the following change would allow to lessen the code > duplication much. > > What if the vnode lock drop and looping be handled by the syscall, instead > of the vop implementation ? In other words, allow the VOP_ALLOCATE() > to  allocate less then requested, and return the allocated amount to > the caller. The loop would be centralized then, freeing fs fr
Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys
On Mon, Apr 18, 2011 at 12:47 PM, Pawel Jakub Dawidek wrote: > On Mon, Apr 18, 2011 at 10:28:10PM +0300, Kostik Belousov wrote: >> > +  if (offset + len > vap->va_size) { >> > +      VATTR_NULL(vap); >> > +      vap->va_size = offset + len; >> > +      error = VOP_SETATTR(vp, vap, td->td_ucred); >> > +      if (error != 0) >> > +          goto out; >> > +  } >> I still do not see a reason to do VOP_SETATTR() there. VOP_WRITE() will >> do auto-extend as needed. Also, see below. > > Yeah, also when we extend file size we could skip reading zeros. > >> > +      if (offset < vap->va_size) { > [...] >> > +      } else { >> > +          bzero(buf, cur); >> > +      } >> Wouldn't VOP_SETATTR() at the start of the function mostly prevent >> this bzero from executing ? > > Once we drop the vnode lock, the file size can change under us, no? Yes, which is why the VOP_GETATTR is re-run. The SETATTR doesn't need to be re-run, since the purpose was just to check that offset + len is less than the filesystem's maximum supported file size. >> I estimated what it would take to do the optimized implementation for UFS, >> and I think that the following change would allow to lessen the code >> duplication much. >> >> What if the vnode lock drop and looping be handled by the syscall, instead >> of the vop implementation ? In other words, allow the VOP_ALLOCATE() >> to  allocate less then requested, and return the allocated amount to >> the caller. The loop would be centralized then, freeing fs from doing >> the dance. Also, if fs considers that suitable, it would do a whole >> allocation in one run. > > I'd still go with SEEK_DATA/SEEK_HOLE loop as I suggested on arch@. > If you would like to spend time on it, having SEEK_DATA/SEEK_HOLE > support in UFS would be beneficial for other purposes too. Well, if we had this functionality it could be used. I'd like the framework but the filesystems need modification to support it. We want it for OneFS at Isilon so eventually when I get to this part of the project I'll have some wrapper code if someone doesn't get there first. Cheers, matthew ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220778 - head/sys/cam/ata
On 04/18/2011 06:59, Alexander Motin wrote: Remove some used variables. If they are used, perhaps they should not be removed? :) -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220778 - head/sys/cam/ata
Doug Barton wrote: > On 04/18/2011 06:59, Alexander Motin wrote: >>Remove some used variables. > > If they are used, perhaps they should not be removed? :) :) Unused. -- Alexander Motin ___ 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: r220801 - head/sbin/conscontrol
Author: ru Date: Mon Apr 18 20:28:07 2011 New Revision: 220801 URL: http://svn.freebsd.org/changeset/base/220801 Log: Changed "conscontrol unset" to accept an existing virtual console device as an argument. Unsetting virtual console using /dev/console seems to have never worked. MFC after:3 days Modified: head/sbin/conscontrol/conscontrol.8 head/sbin/conscontrol/conscontrol.c Modified: head/sbin/conscontrol/conscontrol.8 == --- head/sbin/conscontrol/conscontrol.8 Mon Apr 18 20:07:08 2011 (r220800) +++ head/sbin/conscontrol/conscontrol.8 Mon Apr 18 20:28:07 2011 (r220801) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 23, 2001 +.Dd April 14, 2011 .Dt CONSCONTROL 8 .Os .Sh NAME @@ -40,7 +40,7 @@ .Cm add | delete .Ar console .Nm -.Cm set Ar console | Cm unset +.Cm set | unset Ar console .Sh DESCRIPTION The .Nm @@ -91,7 +91,7 @@ the name of the directory may be omitted Change the state of console muting. All console output is suppressed when console muting is .Cm on . -.It Cm set Ar console | Cm unset +.It Cm set | unset Ar console Set or unset the virtual console. When unset, output from the system, such as the kernel .Xr printf 9 , Modified: head/sbin/conscontrol/conscontrol.c == --- head/sbin/conscontrol/conscontrol.c Mon Apr 18 20:07:08 2011 (r220800) +++ head/sbin/conscontrol/conscontrol.c Mon Apr 18 20:28:07 2011 (r220801) @@ -50,7 +50,7 @@ usage(void) "usage: conscontrol [list]", " conscontrol mute on | off", " conscontrol add | delete console", - " conscontrol set console | unset"); + " conscontrol set | unset console"); exit(1); } @@ -153,28 +153,16 @@ consdel(char *devnam) } static void -consset(char *devnam) +consset(char *devnam, int flag) { - int ttyfd, flag = 1; + int ttyfd; ttyfd = open(devnam, O_RDONLY); if (ttyfd == -1) err(1, "opening %s", devnam); if (ioctl(ttyfd, TIOCCONS, &flag) == -1) - err(1, "could not set %s as virtual console", devnam); - close(ttyfd); -} - -static void -consunset(void) -{ - int ttyfd, flag = 0; - - ttyfd = open(DEVDIR "console", O_RDONLY); - if (ttyfd == -1) - err(1, "opening virtual console"); - if (ioctl(ttyfd, TIOCCONS, &flag) == -1) - err(1, "could not unset virtual console"); + err(1, "could not %s %s as virtual console", + flag ? "set" : "unset", devnam); close(ttyfd); } @@ -188,9 +176,7 @@ main(int argc, char **argv) argv += optind; if (argc > 0 && strcmp(argv[0], "list") != 0) { - if (argc == 1 && strcmp(argv[0], "unset") == 0) - consunset(); - else if (argc != 2) + if (argc != 2) usage(); else if (strcmp(argv[0], "mute") == 0) consmute(argv[1]); @@ -199,7 +185,9 @@ main(int argc, char **argv) else if (strcmp(argv[0], "delete") == 0) consdel(argv[1]); else if (strcmp(argv[0], "set") == 0) - consset(argv[1]); + consset(argv[1], 1); + else if (strcmp(argv[0], "unset") == 0) + consset(argv[1], 0); else usage(); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys
2011/4/18 Kostik Belousov : > On Mon, Apr 18, 2011 at 12:49:38PM -0700, m...@freebsd.org wrote: >> On Mon, Apr 18, 2011 at 12:28 PM, Kostik Belousov >> wrote: >> > On Mon, Apr 18, 2011 at 04:32:22PM +, Matthew D Fleming wrote: >> >> Author: mdf >> >> Date: Mon Apr 18 16:32:22 2011 >> >> New Revision: 220791 >> >> URL: http://svn.freebsd.org/changeset/base/220791 >> >> >> >> Log: >> >> Â Add the posix_fallocate(2) syscall. Â The default implementation in >> >> Â vop_stdallocate() is filesystem agnostic and will run as slow as a >> >> Â read/write loop in userspace; however, it serves to correctly >> >> Â implement the functionality for filesystems that do not implement a >> >> Â VOP_ALLOCATE. >> >> >> >> Â Note that __FreeBSD_version was already bumped today to 900036 for any >> >> Â ports which would like to use this function. >> >> >> >> Â Also reserve space in the syscall table for posix_fadvise(2). >> The need is, as commented, to return EFBIG when the new file size will >> be larger than the FS supports. Â Without this code, passing in >> something like posix_fallocate(fd, 0, OFF_MAX) will run the filesystem >> out of space. > Handling max file size and not overflowing the fs are different things. > VOP_WRITE() will handle file size on its own too. I see no problem with > exhausting free space if this is what user asked for. This violates the standard, though, since it would return ENOSPC instead of EFBIG. Also, this is just the default implementation. I'm adding a second VOP_SETATTR in vop_stdallocate() to restore the file size after extending, which will let the implementation use bzero/VOP_WRITE instead of VOP_READ/VOP_WRITE when past the original EOF. This is more of an issue when calling the vop iteratively, since subsequent calls don't know what the "correct" file size is. Cheers, matthew ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220791 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys
On Mon, Apr 18, 2011 at 11:13:02PM +0300, Kostik Belousov wrote: > > The need is, as commented, to return EFBIG when the new file size will > > be larger than the FS supports. Without this code, passing in > > something like posix_fallocate(fd, 0, OFF_MAX) will run the filesystem > > out of space. > Handling max file size and not overflowing the fs are different things. > VOP_WRITE() will handle file size on its own too. I see no problem with > exhausting free space if this is what user asked for. This makes me wonder that current implementation isn't atomic. If we get out of space error, we won't shrink the file back. Even if we could shirk it at the end, we won't be able to put holes in the middle of it. Not sure if this is a big issue, but one doesn't expect from rename(2) to create new link and not remove old one. All in all, making it atomic would be impossible currently for various reasons (we can't put holes back and we can crash in the middle). -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpaERe1jUaAu.pgp Description: PGP signature
Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc
On Monday, April 18, 2011 4:02:10 pm Warner Losh wrote: > > On Apr 18, 2011, at 12:48 PM, John Baldwin wrote: > > > On Monday, April 18, 2011 1:06:42 pm Warner Losh wrote: > >> > >> On Apr 18, 2011, at 1:01 AM, Roman Divacky wrote: > >> > >>> please mark this in src/UPDATING, maybe bump freebsd_version too? > >> > >> Please do not bump freebsd_version just for this. Ports wishing to know > >> can go off the last bump, if there are any. > >> > >> Every freebsd_version bump forces rebuilding all modules and such and is a > >> pita. > > > > No, what it breaks is building a module with a newer source tree than your > > running kernel and trying to kldload it. That is never really supported, > > but the kernel only notices when a version bump happens. The real fix there > > is to run a kernel + modules that are in sync on test boxes. > > The problem is that this is a technical solution that precludes me from > saying "look, I know that this will be OK, so let me do it" I know nothing has changed that would cause a problem. We could easily support some sort of cpp #define to disable the automatic MODULE_DEPEND() on the kernel. Then you could use 'make DEBUG_FLAGS="-DDISABLE_KERNEL_VERSION"' or whatever the variable is called when building your kernel modules. You could even have a DISABLE_KERNEL_VERSION make variable that adds that to CFLAGS in bsd.kmod.mk and then set it to yes in your /etc/make.conf. However, for normal users I think the precaution against loading an 8.x kld on 7 is worth it. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r220802 - head/sbin/ipfw
Author: glebius Date: Mon Apr 18 21:18:22 2011 New Revision: 220802 URL: http://svn.freebsd.org/changeset/base/220802 Log: Whitespace fixes. Checked with: md5, diff -w Modified: head/sbin/ipfw/altq.c head/sbin/ipfw/dummynet.c head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipv6.c head/sbin/ipfw/main.c head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/altq.c == --- head/sbin/ipfw/altq.c Mon Apr 18 20:28:07 2011(r220801) +++ head/sbin/ipfw/altq.c Mon Apr 18 21:18:22 2011(r220802) @@ -45,7 +45,7 @@ /* * Map between current altq queue id numbers and names. */ -static TAILQ_HEAD(, pf_altq) altq_entries = +static TAILQ_HEAD(, pf_altq) altq_entries = TAILQ_HEAD_INITIALIZER(altq_entries); void @@ -139,13 +139,13 @@ altq_qid_to_name(u_int32_t qid) void print_altq_cmd(ipfw_insn_altq *altqptr) { -if (altqptr) { -const char *qname; + if (altqptr) { + const char *qname; -qname = altq_qid_to_name(altqptr->qid); -if (qname == NULL) -printf(" altq ?<%u>", altqptr->qid); -else -printf(" altq %s", qname); -} + qname = altq_qid_to_name(altqptr->qid); + if (qname == NULL) + printf(" altq ?<%u>", altqptr->qid); + else + printf(" altq %s", qname); + } } Modified: head/sbin/ipfw/dummynet.c == --- head/sbin/ipfw/dummynet.c Mon Apr 18 20:28:07 2011(r220801) +++ head/sbin/ipfw/dummynet.c Mon Apr 18 21:18:22 2011(r220802) @@ -418,25 +418,25 @@ ipfw_delete_pipe(int do_pipe, int i) * We can model the additional delay with an empirical curve * that represents its distribution. * - * cumulative probability - * 1.0 ^ - * | - * L +-- loss-level x - * | ** - * |* - * | * - * | * - * |** - * | * - * +---*---> - * delay + * cumulative probability + * 1.0 ^ + * | + * L +-- loss-level x + * | ** + * |* + * | * + * | * + * |** + * | * + * +---*---> + * delay * * The empirical curve may have both vertical and horizontal lines. * Vertical lines represent constant delay for a range of * probabilities; horizontal lines correspond to a discontinuty * in the delay distribution: the link will use the largest delay * for a given probability. - * + * * To pass the curve to dummynet, we must store the parameters * in a file as described below, and issue the command * @@ -449,9 +449,9 @@ ipfw_delete_pipe(int do_pipe, int i) * the number of samples used in the internal * representation (2..1024; default 100); * - * loss-level L + * loss-level L * The probability above which packets are lost. - * (0.0 <= L <= 1.0, default 1.0 i.e. no loss); + *(0.0 <= L <= 1.0, default 1.0 i.e. no loss); * * name identifier * Optional a name (listed by "ipfw pipe show") @@ -472,18 +472,18 @@ ipfw_delete_pipe(int do_pipe, int i) * the curve as needed. * * Example of a profile file: - -namebla_bla_bla -samples 100 -loss-level0.86 -probdelay -0 200# minimum overhead is 200ms -0.5 200 -0.5 300 -0.8 1000 -0.9 1300 -1 1300 - + + namebla_bla_bla + samples 100 + loss-level0.86 + probdelay + 0 200 # minimum overhead is 200ms + 0.5 200 + 0.5 300 + 0.8 1000 + 0.9 1300 + 1 1300 + * Internally, we will convert the curve to a fixed number of * samples, and when it is time to transmit a packet we will * model the extra delay as extra bits in the packet. @@ -613,7 +613,7 @@ load_extra_delays(const char *filename, if (f == NULL) err(EX_UNAVAILABLE, "fopen: %s", filename); - while (fgets(line, ED_MAX_LINE_LEN, f)) { /* read commands */ + while (fgets(line, ED_MAX_LINE_LEN, f)) {/* read commands */ char *s, *cur = line, *name = NULL, *arg = NULL; ++lineno; @@ -740,7 +740,7 @@ load_extra_delays(const char *filename, /* * configuration of pipes, schedulers, flowsets. * When we configure a new scheduler, an empty pipe is created, so: - * + * * do_
svn commit: r220803 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include
Author: kib Date: Mon Apr 18 21:24:42 2011 New Revision: 220803 URL: http://svn.freebsd.org/changeset/base/220803 Log: Make pmap_invalidate_cache_range() available for consumption on amd64. Add pmap_invalidate_cache_pages() method on x86. It flushes the CPU cache for the set of pages, which are not neccessary mapped. Since its supposed use is to prepare the move of the pages ownership to a device that does not snoop all CPU accesses to the main memory (read GPU in GMCH), do not rely on CPU self-snoop feature. amd64 implementation takes advantage of the direct map. On i386, extract the helper pmap_flush_page() from pmap_page_set_memattr(), and use it to make a temporary mapping of the flushed page. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after:3 weeks Modified: head/sys/amd64/amd64/pmap.c head/sys/amd64/include/pmap.h head/sys/i386/i386/pmap.c head/sys/i386/include/pmap.h Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Mon Apr 18 21:18:22 2011(r220802) +++ head/sys/amd64/amd64/pmap.c Mon Apr 18 21:24:42 2011(r220803) @@ -239,7 +239,6 @@ static vm_page_t pmap_enter_quick_locked vm_page_t m, vm_prot_t prot, vm_page_t mpte); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static void pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); -static void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); static boolean_t pmap_is_referenced_pvh(struct md_page *pvh); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); @@ -1105,7 +1104,9 @@ pmap_update_pde(pmap_t pmap, vm_offset_t } #endif /* !SMP */ -static void +#define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) + +void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva) { @@ -1117,7 +1118,7 @@ pmap_invalidate_cache_range(vm_offset_t if (cpu_feature & CPUID_SS) ; /* If "Self Snoop" is supported, do nothing. */ else if ((cpu_feature & CPUID_CLFSH) != 0 && -eva - sva < 2 * 1024 * 1024) { + eva - sva < PMAP_CLFLUSH_THRESHOLD) { /* * Otherwise, do per-cache line flush. Use the mfence @@ -1142,6 +1143,34 @@ pmap_invalidate_cache_range(vm_offset_t } /* + * Remove the specified set of pages from the data and instruction caches. + * + * In contrast to pmap_invalidate_cache_range(), this function does not + * rely on the CPU's self-snoop feature, because it is intended for use + * when moving pages into a different cache domain. + */ +void +pmap_invalidate_cache_pages(vm_page_t *pages, int count) +{ + vm_offset_t daddr, eva; + int i; + + if (count >= PMAP_CLFLUSH_THRESHOLD / PAGE_SIZE || + (cpu_feature & CPUID_CLFSH) == 0) + pmap_invalidate_cache(); + else { + mfence(); + for (i = 0; i < count; i++) { + daddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pages[i])); + eva = daddr + PAGE_SIZE; + for (; daddr < eva; daddr += cpu_clflush_line_size) + clflush(daddr); + } + mfence(); + } +} + +/* * Are we current address space or kernel? */ static __inline int Modified: head/sys/amd64/include/pmap.h == --- head/sys/amd64/include/pmap.h Mon Apr 18 21:18:22 2011 (r220802) +++ head/sys/amd64/include/pmap.h Mon Apr 18 21:24:42 2011 (r220803) @@ -328,6 +328,8 @@ voidpmap_invalidate_page(pmap_t, vm_off void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); void pmap_invalidate_all(pmap_t); void pmap_invalidate_cache(void); +void pmap_invalidate_cache_pages(vm_page_t *pages, int count); +void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); #endif /* _KERNEL */ Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Mon Apr 18 21:18:22 2011(r220802) +++ head/sys/i386/i386/pmap.c Mon Apr 18 21:24:42 2011(r220803) @@ -297,6 +297,7 @@ static boolean_t pmap_enter_pde(pmap_t p vm_prot_t prot); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte); +static void pmap_flush_page(vm_page_t m); static void pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); @@ -1136,6 +1137,8 @@ pmap_update_pde(pmap_t pmap, vm_offset_t } #endif /* !SMP */ +#definePMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) + void pmap_invalidate_cache_range(vm_
Re: svn commit: r220761 - head/sys/fs/nfsclient
> On Sun, Apr 17, 2011 at 11:04:04PM +, Rick Macklem wrote: > > Author: rmacklem > > Date: Sun Apr 17 23:04:03 2011 > > New Revision: 220761 > > URL: http://svn.freebsd.org/changeset/base/220761 > > > > Log: > > Add checks for MNTK_UNMOUNTF at the beginning of three > > functions, so that threads don't get stuck in them during > > a forced dismount. nfs_sync/VFS_SYNC() needs this, since it is > > called by dounmount() before VFS_UNMOUNT(). The nfscl_nget() > > case makes sure that a thread doing an VOP_OPEN() or > > VOP_ADVLOCK() call doesn't get blocked before attempting > > the RPC. Attempting RPCs don't block, since they all > > fail once a forced dismount is in progress. > > The third one at the beginning of nfsrpc_close() > > is done so threads don't get blocked while doing VOP_INACTIVE() > > as the vnodes are cleared out. > > With these three changes plus a change to the umount(1) > > command so that it doesn't do "sync()" for the forced case > > seem to make forced dismounts work for the experimental NFS > > client. > > > > MFC after: 2 weeks > > > > Modified: > > head/sys/fs/nfsclient/nfs_clrpcops.c > > head/sys/fs/nfsclient/nfs_clstate.c > > head/sys/fs/nfsclient/nfs_clvfsops.c > > > > Modified: head/sys/fs/nfsclient/nfs_clrpcops.c > > == > > --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 17 22:31:36 2011 > > (r220760) > > +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Apr 17 23:04:03 2011 > > (r220761) > > @@ -567,6 +567,11 @@ nfsrpc_close(vnode_t vp, int doclose, NF > > > > if (vnode_vtype(vp) != VREG) > > return (0); > > + > > + /* For forced unmounts, just return. */ > > + if ((vp->v_mount->mnt_kern_flag & MNTK_UNMOUNTF) != 0) > > + return (0); > > + > Is there anything that would prevent the MNTK_UNMOUNTF flag from being > set immediately after the test returned success ? > > Usually, the tests for MNTK_UNMOUNTF are bugs. I coould see how > terminating > the RPCs would be useful for forced unmounts, but do not think that > preventing entry into close would help. > I think you are correct, in that the one in nfsrpc_close() is harmless, but not needed. (I suspect I added it to fix a crash and then didn't realize that it's the one in nfscl_getcl() that matters.) Basically, ncl_inactive() would call nfsrpc_close() which calls nfscl_doclose() which calls nfscl_getcl(), so when nfscl_getcl() returns failure, that should be sufficient. As for the nfscl_getcl() one, I don't think it is currently quite right either. The problem is a race with nfscl_umount(), which gets called from nfs_unmount(). It goes like this: - for a forced dismount, nfs_unmount(): - cancels all in-progress RPCs plus all new RPC attempts will fail {newnfs_nmcancelreqs() does this } - calls nfscl_umount() --> nfscl_umount() gets the exclusive lock for open/lock state modifications. - igotlock = nfsv4_lock(&clp->nfsc_lock,...); This will delay while any refcnt (shared lock) on nfsc_lock is held. - once this exclusive lock is acquired, it zaps the state information (any RPC attempts simply fail, due to the above) - in nfscl_getcl(), it gets a refcnt (shared lock) on nfsc_lock, so once that happens, the above will block until it is released. --> My mistake was putting the test for MNTK_UNMOUNTF above that point in nfscl_getcl(), so there is a race if it is set after the test, but before acquiring the refcnt on nfsc_lock. Thanks for pointing this out so I took another look. I'll either revert the patch or add one that fixes the above. (ie. move the test in nfscl_getcl() down and probably get rid of the one in nfsrpc_close(), since the test in nfscl_getcl() should be sufficient.) rick ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220736 - head/sbin/natd
On 4/18/2011 11:13 AM, Gleb Smirnoff wrote: This looks like a hack and better place for this hack would be shell scripts rather than nat daemon. Well, I am not sure how would you apply shell script in such case. The problem with the original code is that natd just silently exits, leaving machine without a network connection. For some reason this problem started after upgrade from 7.4 to 8.2, perhaps there is some changes in the dhclient which allows it to run is parallel with other start-up activity. And I don't see any problem with natd waiting indefinitely on the interface to acquire IP address, it's no better and no worse than the current behavior when the natd simply bails out. -Maxim ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220736 - head/sbin/natd
On 4/18/2011 12:42 PM, Garrett Cooper wrote: +1 -- in particular because this will affect all cases, and not just the dhclient-acquired IP external NIC case as the above commit message notes. Well, as I already said I don't see any problem with natd waiting on interface to get IP address in all cases. This is no better or no worse than just bailing out, except it will make things working automatically once IP address has been provisioned. -Maxim ___ 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: r220804 - head/sbin/ipfw
Author: glebius Date: Mon Apr 18 22:09:03 2011 New Revision: 220804 URL: http://svn.freebsd.org/changeset/base/220804 Log: More whitespace fixes. Checked with: md5, diff -x -w Modified: head/sbin/ipfw/dummynet.c head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/dummynet.c == --- head/sbin/ipfw/dummynet.c Mon Apr 18 21:24:42 2011(r220803) +++ head/sbin/ipfw/dummynet.c Mon Apr 18 22:09:03 2011(r220804) @@ -284,7 +284,7 @@ flush_buf(char *buf) printf("%s\n", buf); buf[0] = '\0'; } - + /* * generic list routine. We expect objects in a specific order, i.e. * PIPES AND SCHEDULERS: Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Mon Apr 18 21:24:42 2011(r220803) +++ head/sbin/ipfw/ipfw2.c Mon Apr 18 22:09:03 2011(r220804) @@ -435,7 +435,7 @@ match_value(struct _s_x *p, int value) int _substrcmp(const char *str1, const char* str2) { - + if (strncmp(str1, str2, strlen(str1)) != 0) return 1; @@ -463,7 +463,7 @@ _substrcmp(const char *str1, const char* int _substrcmp2(const char *str1, const char* str2, const char* str3) { - + if (strncmp(str1, str2, strlen(str2)) != 0) return 1; @@ -1123,7 +1123,7 @@ show_ipfw(struct ip_fw *rule, int pcwidt case O_NAT: PRINT_UINT_ARG("nat ", cmd->arg1); break; - + case O_SETFIB: PRINT_UINT_ARG("setfib ", cmd->arg1); break; @@ -1131,7 +1131,7 @@ show_ipfw(struct ip_fw *rule, int pcwidt case O_REASS: printf("reass"); break; - + default: printf("** unrecognized action %d len %d ", cmd->opcode, cmd->len); @@ -1168,7 +1168,7 @@ show_ipfw(struct ip_fw *rule, int pcwidt } else if (cmd->opcode == O_IP6) { flags |= HAVE_PROTO6; break; - } + } } if (rule->_pad & 1) { /* empty rules before options */ if (!co.do_compact) { @@ -1625,7 +1625,7 @@ show_dyn_ipfw(ipfw_dyn_rule *d, int pcwi sizeof(buf)), d->id.dst_port); } else printf(" UNKNOWN <-> UNKNOWN\n"); - + printf("\n"); } @@ -2762,7 +2762,7 @@ ipfw_add(char *av[]) goto chkarg; case TOK_TEE: action->opcode = O_TEE; -chkarg: +chkarg: if (!av[0]) errx(EX_USAGE, "missing argument for %s", *(av - 1)); if (isdigit(**av)) { @@ -2848,7 +2848,7 @@ chkarg: case TOK_REASS: action->opcode = O_REASS; break; - + default: errx(EX_DATAERR, "invalid action %s\n", av[-1]); } @@ -3196,7 +3196,7 @@ read_options: fill_icmptypes((ipfw_insn_u32 *)cmd, *av); av++; break; - + case TOK_ICMP6TYPES: NEED1("icmptypes requires list of types"); fill_icmp6types((ipfw_insn_icmp6 *)cmd, *av); @@ -3432,7 +3432,7 @@ read_options: av++; } break; - + case TOK_DSTIP6: NEED1("missing destination IP6"); if (add_dstip6(cmd, *av)) { Modified: head/sbin/ipfw/ipfw2.h == --- head/sbin/ipfw/ipfw2.h Mon Apr 18 21:24:42 2011(r220803) +++ head/sbin/ipfw/ipfw2.h Mon Apr 18 22:09:03 2011(r220804) @@ -183,7 +183,7 @@ enum tokens { TOK_PROXY_ONLY, TOK_REDIR_ADDR, TOK_REDIR_PORT, - TOK_REDIR_PROTO, + TOK_REDIR_PROTO, TOK_IPV6, TOK_FLOWID, Modified: head/sbin/ipfw/nat.c == --- head/sbin/ipfw/nat.cMon Apr 18 21:24:42 2011(r220803) +++ head/sbin/ipfw/nat.cMon Apr 18 22:09:03 2011(r220804) @@ -54,7 +54,7 @@ static struct _s_x nat_params[] = { { "same_ports", TOK_SAME_PORTS }, { "unreg_only", TOK_UNREG_ONLY }, { "reset", TOK_RESET_ADDR }, - { "reverse",TOK_ALIAS_REV }, + { "reverse",TOK_ALIAS_REV }, { "proxy_only", TOK_PROXY
Re: svn commit: r220736 - head/sbin/natd
On 4/18/2011 2:46 PM, Maxim Sobolev wrote: Well, as I already said I don't see any problem with natd waiting on interface to get IP address in all cases. This is no better or no worse than just bailing out, except it will make things working automatically once IP address has been provisioned. Garrett, Gleb, One way to resolve this would be to add a new flag for the natd, which will enable the new behaviour and set that flag from the rc.d/natd, so anybody else who relies on the natd exiting on no address condition can have it as well. What do you think? -Maxim ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220736 - head/sbin/natd
On Mon, Apr 18, 2011 at 02:44:35PM -0700, Maxim Sobolev wrote: M> On 4/18/2011 11:13 AM, Gleb Smirnoff wrote: M> > This looks like a hack and better place for this hack would be shell M> > scripts rather than nat daemon. M> M> Well, I am not sure how would you apply shell script in such case. The M> problem with the original code is that natd just silently exits, leaving M> machine without a network connection. For some reason this problem M> started after upgrade from 7.4 to 8.2, perhaps there is some changes in M> the dhclient which allows it to run is parallel with other start-up M> activity. M> M> And I don't see any problem with natd waiting indefinitely on the M> interface to acquire IP address, it's no better and no worse than the M> current behavior when the natd simply bails out. Hack can be applied to /etc/rc.d/natd, and better do it locally, not in FreeBSD svn. Example for such hack that is waiting for network in rc.d script can be found here: http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/quagga/files/quagga.sh.in?rev=1.18 See how $quagga_wait_for works. -- Totus tuus, Glebius. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220736 - head/sbin/natd
2011/4/18 Maxim Sobolev : > On 4/18/2011 11:13 AM, Gleb Smirnoff wrote: >> >> This looks like a hack and better place for this hack would be shell >> scripts rather than nat daemon. > > Well, I am not sure how would you apply shell script in such case. The > problem with the original code is that natd just silently exits, leaving > machine without a network connection. For some reason this problem started > after upgrade from 7.4 to 8.2, perhaps there is some changes in the dhclient > which allows it to run is parallel with other start-up activity. I've seen the problem that you've attempted to fix here before at home, and it actually occurred between 8.1 and 8.2. I merely hacked things to work at home in the rc script because I didn't want to muck around with natd's C sources. > And I don't see any problem with natd waiting indefinitely on the interface > to acquire IP address, it's no better and no worse than the current behavior > when the natd simply bails out. If it does this when backgrounded, that seems ok. If it blocks foregrounded like this, that's not acceptable. Thanks, -Garrett ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220736 - head/sbin/natd
On Mon, Apr 18, 2011 at 02:44:35PM -0700, Maxim Sobolev wrote: > On 4/18/2011 11:13 AM, Gleb Smirnoff wrote: > >This looks like a hack and better place for this hack would be shell > >scripts rather than nat daemon. > > Well, I am not sure how would you apply shell script in such case. The > problem with the original code is that natd just silently exits, leaving > machine without a network connection. For some reason this problem > started after upgrade from 7.4 to 8.2, perhaps there is some changes in > the dhclient which allows it to run is parallel with other start-up > activity. > SYNCDHCP may restore old behavior of dhclient. > And I don't see any problem with natd waiting indefinitely on the > interface to acquire IP address, it's no better and no worse than the > current behavior when the natd simply bails out. > > -Maxim ___ 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: r220805 - head/sys/dev/acpica
Author: jkim Date: Mon Apr 18 23:12:41 2011 New Revision: 220805 URL: http://svn.freebsd.org/changeset/base/220805 Log: Do not assume PM timer GAS type is I/O or memory. It may be an unsupported type, i. e., a broken table. Also, do not hardcode ACPI timer frequency in device description. Modified: head/sys/dev/acpica/acpi_timer.c Modified: head/sys/dev/acpica/acpi_timer.c == --- head/sys/dev/acpica/acpi_timer.cMon Apr 18 22:09:03 2011 (r220804) +++ head/sys/dev/acpica/acpi_timer.cMon Apr 18 23:12:41 2011 (r220805) @@ -130,9 +130,17 @@ acpi_timer_identify(driver_t *driver, de } acpi_timer_dev = dev; +switch (AcpiGbl_FADT.XPmTimerBlock.SpaceId) { +case ACPI_ADR_SPACE_SYSTEM_MEMORY: + rtype = SYS_RES_MEMORY; + break; +case ACPI_ADR_SPACE_SYSTEM_IO: + rtype = SYS_RES_IOPORT; + break; +default: + return_VOID; +} rid = 0; -rtype = AcpiGbl_FADT.XPmTimerBlock.SpaceId ? - SYS_RES_IOPORT : SYS_RES_MEMORY; rlen = AcpiGbl_FADT.PmTimerLength; rstart = AcpiGbl_FADT.XPmTimerBlock.Address; if (bus_set_resource(dev, rtype, rid, rstart, rlen)) @@ -152,9 +160,17 @@ acpi_timer_probe(device_t dev) if (dev != acpi_timer_dev) return (ENXIO); +switch (AcpiGbl_FADT.XPmTimerBlock.SpaceId) { +case ACPI_ADR_SPACE_SYSTEM_MEMORY: + rtype = SYS_RES_MEMORY; + break; +case ACPI_ADR_SPACE_SYSTEM_IO: + rtype = SYS_RES_IOPORT; + break; +default: + return (ENXIO); +} rid = 0; -rtype = AcpiGbl_FADT.XPmTimerBlock.SpaceId ? - SYS_RES_IOPORT : SYS_RES_MEMORY; acpi_timer_reg = bus_alloc_resource_any(dev, rtype, &rid, RF_ACTIVE); if (acpi_timer_reg == NULL) { device_printf(dev, "couldn't allocate resource (%s 0x%lx)\n", @@ -195,8 +211,9 @@ acpi_timer_probe(device_t dev) } tc_init(&acpi_timer_timecounter); -sprintf(desc, "%d-bit timer at 3.579545MHz", - (AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER) ? 32 : 24); +sprintf(desc, "%d-bit timer at %u.%06uMHz", + (AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER) != 0 ? 32 : 24, + acpi_timer_frequency / 100, acpi_timer_frequency % 100); device_set_desc_copy(dev, desc); /* Release the resource, we'll allocate it again during attach. */ @@ -211,9 +228,17 @@ acpi_timer_attach(device_t dev) ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); +switch (AcpiGbl_FADT.XPmTimerBlock.SpaceId) { +case ACPI_ADR_SPACE_SYSTEM_MEMORY: + rtype = SYS_RES_MEMORY; + break; +case ACPI_ADR_SPACE_SYSTEM_IO: + rtype = SYS_RES_IOPORT; + break; +default: + return (ENXIO); +} rid = 0; -rtype = AcpiGbl_FADT.XPmTimerBlock.SpaceId ? - SYS_RES_IOPORT : SYS_RES_MEMORY; acpi_timer_reg = bus_alloc_resource_any(dev, rtype, &rid, RF_ACTIVE); if (acpi_timer_reg == NULL) return (ENXIO); ___ 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: r220806 - head/sbin/natd
Author: sobomax Date: Mon Apr 18 23:15:29 2011 New Revision: 220806 URL: http://svn.freebsd.org/changeset/base/220806 Log: Only wait for the IP to appear on the interface if natd is running in the background. Suggested by: Garrett Cooper Use EAGAIN instead of magic value of -2 to report this condition from the SetAliasAddressFromIfName routine. MFC after:2 weeks Modified: head/sbin/natd/natd.c Modified: head/sbin/natd/natd.c == --- head/sbin/natd/natd.c Mon Apr 18 23:12:41 2011(r220805) +++ head/sbin/natd/natd.c Mon Apr 18 23:15:29 2011(r220806) @@ -305,9 +305,9 @@ int main (int argc, char** argv) else { do { rval = SetAliasAddressFromIfName (mip->ifName); - if (rval == -2) + if (background != 0 && rval == EAGAIN) sleep(1); - } while (rval == -2); + } while (background != 0 && rval == EAGAIN); if (rval != 0) exit(1); } @@ -648,9 +648,9 @@ static void DoAliasing (int fd, int dire if (mip->assignAliasAddr) { do { rval = SetAliasAddressFromIfName (mip->ifName); - if (rval == -2) + if (background != 0 && rval == EAGAIN) sleep(1); - } while (rval == -2); + } while (background != 0 && rval == EAGAIN); if (rval != 0) exit(1); mip->assignAliasAddr = 0; @@ -969,7 +969,7 @@ SetAliasAddressFromIfName(const char *if if (sin == NULL) { warnx("%s: cannot get interface address", ifn); free(buf); - return -2; + return EAGAIN; } LibAliasSetAddress(mla, sin->sin_addr); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220736 - head/sbin/natd
On 4/18/2011 3:26 PM, Garrett Cooper wrote: And I don't see any problem with natd waiting indefinitely on the interface to acquire IP address, it's no better and no worse than the current behavior when the natd simply bails out. If it does this when backgrounded, that seems ok. If it blocks foregrounded like this, that's not acceptable. Makes sense. I've checked in the patch, thanks! -Maxim ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220755 - in head: . contrib/gcc/doc contrib/gcc/objc contrib/libobjc etc/mtree gnu/lib gnu/lib/libobjc gnu/usr.bin/cc gnu/usr.bin/cc/cc1obj gnu/usr.bin/cc/cc_tools gnu/usr.bin/cc/doc
On Mon, 18 Apr 2011, John Baldwin wrote: On Monday, April 18, 2011 4:02:10 pm Warner Losh wrote: The problem is that this is a technical solution that precludes me from saying "look, I know that this will be OK, so let me do it" I know nothing has changed that would cause a problem. We could easily support some sort of cpp #define to disable the automatic MODULE_DEPEND() on the kernel. Then you could use 'make DEBUG_FLAGS="-DDISABLE_KERNEL_VERSION"' or whatever the variable is called when building your kernel modules. You could even have a DISABLE_KERNEL_VERSION make variable that adds that to CFLAGS in bsd.kmod.mk and then set it to yes in your /etc/make.conf. However, for normal users I think the precaution against loading an 8.x kld on 7 is worth it. I prefer never loading an a.x kld on b and wouldn't mind if it were enforced (rm -rf /sys/modules...) :-). FreeBSD cluster machines all do this (by expletively undeleting the definition of NO_MODULES so that /boot/kernel has no modules). Modules may still be useful for debugging. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220777 - head/sys/dev/ahci
On Mon, 18 Apr 2011, Alexander Motin wrote: On 18.04.2011 20:06, John Baldwin wrote: On Monday, April 18, 2011 9:34:31 am Alexander Motin wrote: Author: mav Date: Mon Apr 18 13:34:31 2011 New Revision: 220777 URL: http://svn.freebsd.org/changeset/base/220777 Log: - Tune different wait loops to cut some more milliseconds from reset time. - Do not call ahci_start() before device signature received. It is required by the specification and caused non-fatal reset timeouts on AMD chipsets. Do you have to use DELAY() here rather than a blocking sleep via pause()? At the moment I would say yes. These paths are called from CAM while holding SIM lock. CAM may not like if I drop the lock in the middle of the call. Also during recovery those functions could be called from the callout and interrupt threads. In that case even dropping the lock won't allow thread to sleep. More than before you reduced the delays. There seems to be no interrupt for reset, and it may be impossible for a timer to interrupt after only ~10 usec like some of the reduced delays use. I will think more about possibilities to refactor the code to replace some DELAYs with callouts, but requirement to keep functionality in polled mode doesn't make the task easier. This means that callouts cannot work. Dumps should start with a reset which should run entirely in polled mode, like the entired dump. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220736 - head/sbin/natd
On 4/18/2011 3:12 PM, YongHyeon PYUN wrote: SYNCDHCP may restore old behavior of dhclient. Thanks, but I would rather not. -dynamic kinda suggests that the interface can go up and down, so if natd running in the background can handle this condition gracefully instead of silently exit this would be a better approach IMHO. -Maxim ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r220778 - head/sys/cam/ata
On Mon, 18 Apr 2011, Alexander Motin wrote: Doug Barton wrote: On 04/18/2011 06:59, Alexander Motin wrote: Remove some used variables. If they are used, perhaps they should not be removed? :) :) Unused. Nah, they were used (to initialize them), but this use of them was not used, so its only effect was to break the gcc warning about them being unused. Bruce ___ 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: r220807 - head/sys/fs/nfsclient
Author: rmacklem Date: Mon Apr 18 23:35:16 2011 New Revision: 220807 URL: http://svn.freebsd.org/changeset/base/220807 Log: Revert r220761 since, as kib@ pointed out, the case of adding the check to nfsrpc_close() isn't useful. Also, the check in nfscl_getcl() must be more involved, since it needs to check before and after the acquisition of the refcnt on nfsc_lock, while the mutex that protects the client state data is held. Modified: head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c == --- head/sys/fs/nfsclient/nfs_clrpcops.cMon Apr 18 23:15:29 2011 (r220806) +++ head/sys/fs/nfsclient/nfs_clrpcops.cMon Apr 18 23:35:16 2011 (r220807) @@ -567,11 +567,6 @@ nfsrpc_close(vnode_t vp, int doclose, NF if (vnode_vtype(vp) != VREG) return (0); - - /* For forced unmounts, just return. */ - if ((vp->v_mount->mnt_kern_flag & MNTK_UNMOUNTF) != 0) - return (0); - if (doclose) error = nfscl_doclose(vp, &clp, p); else Modified: head/sys/fs/nfsclient/nfs_clstate.c == --- head/sys/fs/nfsclient/nfs_clstate.c Mon Apr 18 23:15:29 2011 (r220806) +++ head/sys/fs/nfsclient/nfs_clstate.c Mon Apr 18 23:35:16 2011 (r220807) @@ -692,10 +692,6 @@ nfscl_getcl(vnode_t vp, struct ucred *cr int igotlock = 0, error, trystalecnt, clidinusedelay, i; u_int16_t idlen = 0; - /* For forced unmounts, just return an error. */ - if ((vnode_mount(vp)->mnt_kern_flag & MNTK_UNMOUNTF) != 0) - return (EPERM); - if (cred != NULL) { getcredhostuuid(cred, uuid, sizeof uuid); idlen = strlen(uuid); Modified: head/sys/fs/nfsclient/nfs_clvfsops.c == --- head/sys/fs/nfsclient/nfs_clvfsops.cMon Apr 18 23:15:29 2011 (r220806) +++ head/sys/fs/nfsclient/nfs_clvfsops.cMon Apr 18 23:35:16 2011 (r220807) @@ -1386,10 +1386,6 @@ nfs_sync(struct mount *mp, int waitfor) td = curthread; - /* For a forced unmount, just return EPERM. */ - if ((mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0) - return (EPERM); - /* * Force stale buffer cache information to be flushed. */ ___ 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: r220808 - head/sbin/natd
Author: sobomax Date: Mon Apr 18 23:45:50 2011 New Revision: 220808 URL: http://svn.freebsd.org/changeset/base/220808 Log: Furthermore condition IP waiting behaviour also on -dynamic flag. This should preserve POLA in all other cases (foreground || non-dynamic). MFC after:2 weeks Modified: head/sbin/natd/natd.c Modified: head/sbin/natd/natd.c == --- head/sbin/natd/natd.c Mon Apr 18 23:35:16 2011(r220807) +++ head/sbin/natd/natd.c Mon Apr 18 23:45:50 2011(r220808) @@ -305,9 +305,11 @@ int main (int argc, char** argv) else { do { rval = SetAliasAddressFromIfName (mip->ifName); - if (background != 0 && rval == EAGAIN) + if (background == 0 || dynamicMode == 0) + break; + if (rval == EAGAIN) sleep(1); - } while (background != 0 && rval == EAGAIN); + } while (rval == EAGAIN); if (rval != 0) exit(1); } @@ -648,9 +650,11 @@ static void DoAliasing (int fd, int dire if (mip->assignAliasAddr) { do { rval = SetAliasAddressFromIfName (mip->ifName); - if (background != 0 && rval == EAGAIN) + if (background == 0 || dynamicMode == 0) + break; + if (rval == EAGAIN) sleep(1); - } while (background != 0 && rval == EAGAIN); + } while (rval == EAGAIN); if (rval != 0) exit(1); mip->assignAliasAddr = 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r220809 - head/usr.sbin/nfsd
Author: rmacklem Date: Tue Apr 19 00:47:26 2011 New Revision: 220809 URL: http://svn.freebsd.org/changeset/base/220809 Log: Add stablerestart(5) to the See Also list for nfsd(8). This is a content change. Suggested by: Jeremy Chadwick MFC after:2 weeks Modified: head/usr.sbin/nfsd/nfsd.8 Modified: head/usr.sbin/nfsd/nfsd.8 == --- head/usr.sbin/nfsd/nfsd.8 Mon Apr 18 23:45:50 2011(r220808) +++ head/usr.sbin/nfsd/nfsd.8 Tue Apr 19 00:47:26 2011(r220809) @@ -201,7 +201,8 @@ just do a .Xr nfsiod 8 , .Xr nfsrevoke 8 , .Xr nfsuserd 8 , -.Xr rpcbind 8 +.Xr rpcbind 8 , +.Xr stablerestart 5 .Sh HISTORY The .Nm ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r220810 - head/sys/fs/nfsclient
Author: rmacklem Date: Tue Apr 19 01:09:51 2011 New Revision: 220810 URL: http://svn.freebsd.org/changeset/base/220810 Log: Fix up handling of the nfsmount structure in read and write within the experimental NFS client. Mostly add mutex locking and use the same rsize, wsize during the operation by keeping a local copy of it. This is another change that brings it closer to the regular NFS client. MFC after:2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c == --- head/sys/fs/nfsclient/nfs_clrpcops.cTue Apr 19 00:47:26 2011 (r220809) +++ head/sys/fs/nfsclient/nfs_clrpcops.cTue Apr 19 01:09:51 2011 (r220810) @@ -1284,16 +1284,22 @@ nfsrpc_readrpc(vnode_t vp, struct uio *u struct nfsrv_descript nfsd; struct nfsmount *nmp = VFSTONFS(vnode_mount(vp)); struct nfsrv_descript *nd = &nfsd; + int rsize; *attrflagp = 0; tsiz = uio_uio_resid(uiop); - if (uiop->uio_offset + tsiz > 0x && - !NFSHASNFSV3OR4(nmp)) + NFSLOCKMNT(nmp); + if (uiop->uio_offset + tsiz > nmp->nm_maxfilesize) { + /* XXX Needs overflow/negative check for uio_offset */ + NFSUNLOCKMNT(nmp); return (EFBIG); + } + rsize = nmp->nm_rsize; + NFSUNLOCKMNT(nmp); nd->nd_mrep = NULL; while (tsiz > 0) { *attrflagp = 0; - len = (tsiz > nmp->nm_rsize) ? nmp->nm_rsize : tsiz; + len = (tsiz > rsize) ? rsize : tsiz; NFSCL_REQSTART(nd, NFSPROC_READ, vp); if (nd->nd_flag & ND_NFSV4) nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSTATEID); @@ -1333,7 +1339,7 @@ nfsrpc_readrpc(vnode_t vp, struct uio *u NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); eof = fxdr_unsigned(int, *tl); } - NFSM_STRSIZ(retlen, nmp->nm_rsize); + NFSM_STRSIZ(retlen, rsize); error = nfsm_mbufuio(nd, uiop, retlen); if (error) goto nfsmout; @@ -1457,8 +1463,7 @@ nfsrpc_writerpc(vnode_t vp, struct uio * *attrflagp = 0; tsiz = uio_uio_resid(uiop); NFSLOCKMNT(nmp); - if (uiop->uio_offset + tsiz > 0x && - !NFSHASNFSV3OR4(nmp)) { + if (uiop->uio_offset + tsiz > nmp->nm_maxfilesize) { NFSUNLOCKMNT(nmp); return (EFBIG); } @@ -1467,11 +1472,6 @@ nfsrpc_writerpc(vnode_t vp, struct uio * nd->nd_mrep = NULL; /* NFSv2 sometimes does a write with */ nd->nd_repstat = 0; /* uio_resid == 0, so the while is not done */ while (tsiz > 0) { - nmp = VFSTONFS(vnode_mount(vp)); - if (nmp == NULL) { - error = ENXIO; - goto nfsmout; - } *attrflagp = 0; len = (tsiz > wsize) ? wsize : tsiz; NFSCL_REQSTART(nd, NFSPROC_WRITE, vp); ___ 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: r220811 - stable/8/sys/netinet/ipfw
Author: ae Date: Tue Apr 19 05:09:17 2011 New Revision: 220811 URL: http://svn.freebsd.org/changeset/base/220811 Log: MFC r220568: Restore previous behaviour - always match rule when we doing tagging, even when tag is already exists. Reported by:Vadim Goncharov Modified: stable/8/sys/netinet/ipfw/ip_fw2.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/ipfw/ip_fw2.c == --- stable/8/sys/netinet/ipfw/ip_fw2.c Tue Apr 19 01:09:51 2011 (r220810) +++ stable/8/sys/netinet/ipfw/ip_fw2.c Tue Apr 19 05:09:17 2011 (r220811) @@ -1793,10 +1793,13 @@ do { \ if (mtag != NULL) m_tag_delete(m, mtag); match = 0; - } else if (mtag == NULL) { - if ((mtag = m_tag_alloc(MTAG_IPFW, - tag, 0, M_NOWAIT)) != NULL) - m_tag_prepend(m, mtag); + } else { + if (mtag == NULL) { + mtag = m_tag_alloc( MTAG_IPFW, + tag, 0, M_NOWAIT); + if (mtag != NULL) + m_tag_prepend(m, mtag); + } match = 1; } 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: r220812 - head/sys/netinet/ipfw
Author: ae Date: Tue Apr 19 05:59:37 2011 New Revision: 220812 URL: http://svn.freebsd.org/changeset/base/220812 Log: Use M_WAITOK instead M_WAIT for malloc. Remove unneded checks. MFC after:1 week Modified: head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dummynet.c == --- head/sys/netinet/ipfw/ip_dummynet.c Tue Apr 19 05:09:17 2011 (r220811) +++ head/sys/netinet/ipfw/ip_dummynet.c Tue Apr 19 05:59:37 2011 (r220812) @@ -1836,9 +1836,7 @@ dummynet_get(struct sockopt *sopt, void #endif if (l > sizeof(r)) { /* request larger than default, allocate buffer */ - cmd = malloc(l, M_DUMMYNET, M_WAIT); - if (cmd == NULL) - return ENOMEM; //XXX + cmd = malloc(l, M_DUMMYNET, M_WAITOK); error = sooptcopyin(sopt, cmd, l, l); sopt->sopt_valsize = sopt_valsize; if (error) @@ -1894,10 +1892,6 @@ dummynet_get(struct sockopt *sopt, void have = need; start = malloc(have, M_DUMMYNET, M_WAITOK | M_ZERO); - if (start == NULL) { - error = ENOMEM; - goto done; - } } if (start == NULL) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"