From owner-svn-src-stable@FreeBSD.ORG Sun Apr 7 16:54:49 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 27379526; Sun, 7 Apr 2013 16:54:49 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from mail.droso.net (grizzly.droso.dk [IPv6:2a01:4f8:100:9424::3]) by mx1.freebsd.org (Postfix) with ESMTP id DB0473F7; Sun, 7 Apr 2013 16:54:48 +0000 (UTC) Received: from droso.net (brandmur.dk-hostmaster.dk [193.163.102.249]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.droso.net (Postfix) with ESMTPSA id 6C25547F9; Sun, 7 Apr 2013 18:54:32 +0200 (CEST) Date: Mon, 8 Apr 2013 00:54:13 +0800 From: Erwin Lansing To: Xin LI Subject: Re: svn commit: r248808 - in stable/9: contrib/bind9 lib/bind lib/bind/dns lib/bind/dns/dns Message-ID: <20130407165409.GE25336@droso.net> Mail-Followup-To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org References: <201303280539.r2S5djuq011147@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <201303280539.r2S5djuq011147@svn.freebsd.org> X-Operating-System: Darwin/x86_64 12.3.0 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on grizzly.droso.net Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 16:54:49 -0000 On Thu, Mar 28, 2013 at 05:39:45AM +0000, Xin LI wrote: > Author: delphij > Date: Thu Mar 28 05:39:45 2013 > New Revision: 248808 > URL: http://svnweb.freebsd.org/changeset/base/248808 > > Log: > MFC r248788 (erwin): > > Update BIND to 9.8.4-P2 > > Removed the check for regex.h in configure in order > to disable regex syntax checking, as it exposes > BIND to a critical flaw in libregex on some > platforms. [RT #32688] > Thanks for taking care of these while I was on a, at least in my own opinion, well deserved vacation. Erwin From owner-svn-src-stable@FreeBSD.ORG Sun Apr 7 17:05:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 62F3B743; Sun, 7 Apr 2013 17:05:18 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 54A6E610; Sun, 7 Apr 2013 17:05:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r37H5IE7022274; Sun, 7 Apr 2013 17:05:18 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r37H5GtT022262; Sun, 7 Apr 2013 17:05:16 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304071705.r37H5GtT022262@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 7 Apr 2013 17:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249236 - stable/9/sbin/hastd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 17:05:18 -0000 Author: trociny Date: Sun Apr 7 17:05:16 2013 New Revision: 249236 URL: http://svnweb.freebsd.org/changeset/base/249236 Log: MFC r246922 (pjd): - Add support for 'memsync' mode. This is the fastest replication mode that's why it will now be the default. - Bump protocol version to 2 and add backward compatibility for version 1. - Allow to specify hosts by kern.hostid as well (in addition to hostname and kern.hostuuid) in configuration file. Sponsored by: Panzura Added: stable/9/sbin/hastd/refcnt.h - copied unchanged from r246922, head/sbin/hastd/refcnt.h Modified: stable/9/sbin/hastd/hast.conf.5 stable/9/sbin/hastd/hast.h stable/9/sbin/hastd/hast_proto.c stable/9/sbin/hastd/hastd.c stable/9/sbin/hastd/parse.y stable/9/sbin/hastd/primary.c stable/9/sbin/hastd/secondary.c Directory Properties: stable/9/sbin/hastd/ (props changed) Modified: stable/9/sbin/hastd/hast.conf.5 ============================================================================== --- stable/9/sbin/hastd/hast.conf.5 Sun Apr 7 16:28:36 2013 (r249235) +++ stable/9/sbin/hastd/hast.conf.5 Sun Apr 7 17:05:16 2013 (r249236) @@ -129,9 +129,13 @@ The .Aq node argument can be replaced either by a full hostname as obtained by .Xr gethostname 3 , -only first part of the hostname, or by node's UUID as found in the +only first part of the hostname, by node's UUID as found in the .Va kern.hostuuid .Xr sysctl 8 +variable +or by node's hostid as found in the +.Va kern.hostid +.Xr sysctl 8 variable. .Pp The following statements are available: @@ -208,15 +212,12 @@ to the application was lost. The risk of such a situation is very small. The .Ic memsync -replication mode is currently not implemented. +replication mode is the default. .It Ic fullsync .Pp Mark the write operation as completed when local as well as remote write completes. This is the safest and the slowest replication mode. -The -.Ic fullsync -replication mode is the default. .It Ic async .Pp The write operation is reported as complete right after the local write Modified: stable/9/sbin/hastd/hast.h ============================================================================== --- stable/9/sbin/hastd/hast.h Sun Apr 7 16:28:36 2013 (r249235) +++ stable/9/sbin/hastd/hast.h Sun Apr 7 17:05:16 2013 (r249236) @@ -53,8 +53,9 @@ * Version history: * 0 - initial version * 1 - HIO_KEEPALIVE added + * 2 - "memsync" and "received" attributes added for memsync mode */ -#define HAST_PROTO_VERSION 1 +#define HAST_PROTO_VERSION 2 #define EHAST_OK 0 #define EHAST_NOENTRY 1 @@ -142,8 +143,10 @@ struct hastd_config { struct hast_resource { /* Resource name. */ char hr_name[NAME_MAX]; - /* Replication mode (HAST_REPLICATION_*). */ + /* Negotiated replication mode (HAST_REPLICATION_*). */ int hr_replication; + /* Configured replication mode (HAST_REPLICATION_*). */ + int hr_original_replication; /* Provider name that will appear in /dev/hast/. */ char hr_provname[NAME_MAX]; /* Synchronization extent size. */ @@ -156,6 +159,8 @@ struct hast_resource { int hr_compression; /* Checksum algorithm. */ int hr_checksum; + /* Protocol version. */ + int hr_version; /* Path to local component. */ char hr_localpath[PATH_MAX]; Modified: stable/9/sbin/hastd/hast_proto.c ============================================================================== --- stable/9/sbin/hastd/hast_proto.c Sun Apr 7 16:28:36 2013 (r249235) +++ stable/9/sbin/hastd/hast_proto.c Sun Apr 7 17:05:16 2013 (r249236) @@ -112,7 +112,7 @@ hast_proto_send(const struct hast_resour if (eb == NULL) goto end; - hdr.version = HAST_PROTO_VERSION; + hdr.version = res != NULL ? res->hr_version : HAST_PROTO_VERSION; hdr.size = htole32((uint32_t)ebuf_size(eb)); if (ebuf_add_head(eb, &hdr, sizeof(hdr)) == -1) goto end; @@ -144,7 +144,7 @@ hast_proto_recv_hdr(const struct proto_c if (proto_recv(conn, &hdr, sizeof(hdr)) == -1) goto fail; - if (hdr.version != HAST_PROTO_VERSION) { + if (hdr.version > HAST_PROTO_VERSION) { errno = ERPCMISMATCH; goto fail; } Modified: stable/9/sbin/hastd/hastd.c ============================================================================== --- stable/9/sbin/hastd/hastd.c Sun Apr 7 16:28:36 2013 (r249235) +++ stable/9/sbin/hastd/hastd.c Sun Apr 7 17:05:16 2013 (r249236) @@ -68,7 +68,7 @@ static struct hastd_config *cfg; bool sigexit_received = false; /* Path to pidfile. */ static const char *pidfile; -/* PID file handle. */ +/* Pidfile handle. */ struct pidfh *pfh; /* Do we run in foreground? */ static bool foreground; @@ -748,6 +748,7 @@ listen_accept(struct hastd_listen *lst) const char *resname; const unsigned char *token; char laddr[256], raddr[256]; + uint8_t version; size_t size; pid_t pid; int status; @@ -797,6 +798,20 @@ listen_accept(struct hastd_listen *lst) goto close; } pjdlog_debug(2, "%s: resource=%s", raddr, resname); + version = nv_get_uint8(nvin, "version"); + pjdlog_debug(2, "%s: version=%hhu", raddr, version); + if (version == 0) { + /* + * If no version is sent, it means this is protocol version 1. + */ + version = 1; + } + if (version > HAST_PROTO_VERSION) { + pjdlog_info("Remote protocol version %hhu is not supported, falling back to version %hhu.", + version, (unsigned char)HAST_PROTO_VERSION); + version = HAST_PROTO_VERSION; + } + pjdlog_debug(1, "Negotiated protocol version %hhu.", version); token = nv_get_uint8_array(nvin, &size, "token"); /* * NULL token means that this is first connection. @@ -910,8 +925,10 @@ listen_accept(struct hastd_listen *lst) */ if (token == NULL) { + res->hr_version = version; arc4random_buf(res->hr_token, sizeof(res->hr_token)); nvout = nv_alloc(); + nv_add_uint8(nvout, version, "version"); nv_add_uint8_array(nvout, res->hr_token, sizeof(res->hr_token), "token"); if (nv_error(nvout) != 0) { @@ -922,7 +939,7 @@ listen_accept(struct hastd_listen *lst) strerror(nv_error(nvout))); goto fail; } - if (hast_proto_send(NULL, conn, nvout, NULL, 0) == -1) { + if (hast_proto_send(res, conn, nvout, NULL, 0) == -1) { int error = errno; pjdlog_errno(LOG_ERR, "Unable to send response to %s", Modified: stable/9/sbin/hastd/parse.y ============================================================================== --- stable/9/sbin/hastd/parse.y Sun Apr 7 16:28:36 2013 (r249235) +++ stable/9/sbin/hastd/parse.y Sun Apr 7 17:05:16 2013 (r249236) @@ -81,6 +81,7 @@ static int isitme(const char *name) { char buf[MAXHOSTNAMELEN]; + unsigned long hostid; char *pos; size_t bufsize; @@ -95,7 +96,7 @@ isitme(const char *name) return (1); /* - * Now check if it matches first part of the host name. + * Check if it matches first part of the host name. */ pos = strchr(buf, '.'); if (pos != NULL && (size_t)(pos - buf) == strlen(name) && @@ -104,7 +105,7 @@ isitme(const char *name) } /* - * At the end check if name is equal to our host's UUID. + * Check if it matches host UUID. */ bufsize = sizeof(buf); if (sysctlbyname("kern.hostuuid", buf, &bufsize, NULL, 0) < 0) { @@ -114,6 +115,18 @@ isitme(const char *name) if (strcasecmp(buf, name) == 0) return (1); + /* + * Check if it matches hostid. + */ + bufsize = sizeof(hostid); + if (sysctlbyname("kern.hostid", &hostid, &bufsize, NULL, 0) < 0) { + pjdlog_errno(LOG_ERR, "sysctlbyname(kern.hostid) failed"); + return (-1); + } + (void)snprintf(buf, sizeof(buf), "hostid%lu", hostid); + if (strcmp(buf, name) == 0) + return (1); + /* * Looks like this isn't about us. */ @@ -138,6 +151,7 @@ node_names(char **namesp) { static char names[MAXHOSTNAMELEN * 3]; char buf[MAXHOSTNAMELEN]; + unsigned long hostid; char *pos; size_t bufsize; @@ -165,6 +179,16 @@ node_names(char **namesp) return (-1); } (void)strlcat(names, buf, sizeof(names)); + (void)strlcat(names, ", ", sizeof(names)); + + /* Host ID. */ + bufsize = sizeof(hostid); + if (sysctlbyname("kern.hostid", &hostid, &bufsize, NULL, 0) < 0) { + pjdlog_errno(LOG_ERR, "sysctlbyname(kern.hostid) failed"); + return (-1); + } + (void)snprintf(buf, sizeof(buf), "hostid%lu", hostid); + (void)strlcat(names, buf, sizeof(names)); *namesp = names; @@ -190,7 +214,7 @@ yy_config_parse(const char *config, bool lineno = 0; depth0_timeout = HAST_TIMEOUT; - depth0_replication = HAST_REPLICATION_FULLSYNC; + depth0_replication = HAST_REPLICATION_MEMSYNC; depth0_checksum = HAST_CHECKSUM_NONE; depth0_compression = HAST_COMPRESSION_HOLE; strlcpy(depth0_control, HAST_CONTROL, sizeof(depth0_control)); @@ -300,11 +324,7 @@ yy_config_parse(const char *config, bool * Use global or default setting. */ curres->hr_replication = depth0_replication; - } - if (curres->hr_replication == HAST_REPLICATION_MEMSYNC) { - pjdlog_warning("Replication mode \"%s\" is not implemented, falling back to \"%s\".", - "memsync", "fullsync"); - curres->hr_replication = HAST_REPLICATION_FULLSYNC; + curres->hr_original_replication = depth0_replication; } if (curres->hr_checksum == -1) { /* @@ -523,6 +543,7 @@ replication_statement: REPLICATION repli case 1: PJDLOG_ASSERT(curres != NULL); curres->hr_replication = $2; + curres->hr_original_replication = $2; break; default: PJDLOG_ABORT("replication at wrong depth level"); @@ -820,8 +841,10 @@ resource_start: STR curres->hr_role = HAST_ROLE_INIT; curres->hr_previous_role = HAST_ROLE_INIT; curres->hr_replication = -1; + curres->hr_original_replication = -1; curres->hr_checksum = -1; curres->hr_compression = -1; + curres->hr_version = 1; curres->hr_timeout = -1; curres->hr_exec[0] = '\0'; curres->hr_provname[0] = '\0'; Modified: stable/9/sbin/hastd/primary.c ============================================================================== --- stable/9/sbin/hastd/primary.c Sun Apr 7 16:28:36 2013 (r249235) +++ stable/9/sbin/hastd/primary.c Sun Apr 7 17:05:16 2013 (r249236) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -65,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include "metadata.h" #include "proto.h" #include "pjdlog.h" +#include "refcnt.h" #include "subr.h" #include "synch.h" @@ -545,7 +545,7 @@ primary_connect(struct hast_resource *re return (0); } - + /* * Function instructs GEOM_GATE to handle reads directly from within the kernel. */ @@ -579,6 +579,7 @@ init_remote(struct hast_resource *res, s int32_t extentsize; int64_t datasize; uint32_t mapsize; + uint8_t version; size_t size; int error; @@ -599,6 +600,7 @@ init_remote(struct hast_resource *res, s */ nvout = nv_alloc(); nv_add_string(nvout, res->hr_name, "resource"); + nv_add_uint8(nvout, HAST_PROTO_VERSION, "version"); if (nv_error(nvout) != 0) { pjdlog_common(LOG_WARNING, 0, nv_error(nvout), "Unable to allocate header for connection with %s", @@ -628,6 +630,20 @@ init_remote(struct hast_resource *res, s nv_free(nvin); goto close; } + version = nv_get_uint8(nvin, "version"); + if (version == 0) { + /* + * If no version is sent, it means this is protocol version 1. + */ + version = 1; + } + if (version > HAST_PROTO_VERSION) { + pjdlog_warning("Invalid version received (%hhu).", version); + nv_free(nvin); + goto close; + } + res->hr_version = version; + pjdlog_debug(1, "Negotiated protocol version %d.", res->hr_version); token = nv_get_uint8_array(nvin, &size, "token"); if (token == NULL) { pjdlog_warning("Handshake header from %s has no 'token' field.", @@ -778,6 +794,16 @@ init_remote(struct hast_resource *res, s pjdlog_errno(LOG_WARNING, "Unable to set connection direction"); #endif pjdlog_info("Connected to %s.", res->hr_remoteaddr); + if (res->hr_original_replication == HAST_REPLICATION_MEMSYNC && + res->hr_version < 2) { + pjdlog_warning("The 'memsync' replication mode is not supported by the remote node, falling back to 'fullsync' mode."); + res->hr_replication = HAST_REPLICATION_FULLSYNC; + } else if (res->hr_replication != res->hr_original_replication) { + /* + * This is in case hastd disconnected and was upgraded. + */ + res->hr_replication = res->hr_original_replication; + } if (inp != NULL && outp != NULL) { *inp = in; *outp = out; @@ -1011,7 +1037,8 @@ hastd_primary(struct hast_resource *res) } static void -reqlog(int loglevel, int debuglevel, struct g_gate_ctl_io *ggio, const char *fmt, ...) +reqlog(int loglevel, int debuglevel, struct g_gate_ctl_io *ggio, + const char *fmt, ...) { char msg[1024]; va_list ap; @@ -1022,21 +1049,18 @@ reqlog(int loglevel, int debuglevel, str switch (ggio->gctl_cmd) { case BIO_READ: (void)snprlcat(msg, sizeof(msg), "READ(%ju, %ju).", - (uintmax_t)ggio->gctl_offset, - (uintmax_t)ggio->gctl_length); + (uintmax_t)ggio->gctl_offset, (uintmax_t)ggio->gctl_length); break; case BIO_DELETE: (void)snprlcat(msg, sizeof(msg), "DELETE(%ju, %ju).", - (uintmax_t)ggio->gctl_offset, - (uintmax_t)ggio->gctl_length); + (uintmax_t)ggio->gctl_offset, (uintmax_t)ggio->gctl_length); break; case BIO_FLUSH: (void)snprlcat(msg, sizeof(msg), "FLUSH."); break; case BIO_WRITE: (void)snprlcat(msg, sizeof(msg), "WRITE(%ju, %ju).", - (uintmax_t)ggio->gctl_offset, - (uintmax_t)ggio->gctl_length); + (uintmax_t)ggio->gctl_offset, (uintmax_t)ggio->gctl_length); break; default: (void)snprlcat(msg, sizeof(msg), "UNKNOWN(%u).", @@ -1276,8 +1300,13 @@ ggate_recv_thread(void *arg) } pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queues.", hio); - refcount_init(&hio->hio_countdown, ncomps); - for (ii = ncomp; ii < ncomp + ncomps; ii++) + hio->hio_countdown = ncomps; + if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && + ggio->gctl_cmd == BIO_WRITE) { + /* Each remote request needs two responses in memsync. */ + hio->hio_countdown++; + } + for (ii = ncomp; ii < ncomps; ii++) QUEUE_INSERT1(hio, send, ii); } /* NOTREACHED */ @@ -1348,8 +1377,7 @@ local_send_thread(void *arg) } else { hio->hio_errors[ncomp] = 0; if (hio->hio_replication == - HAST_REPLICATION_ASYNC && - !ISSYNCREQ(hio)) { + HAST_REPLICATION_ASYNC) { ggio->gctl_error = 0; write_complete(res, hio); } @@ -1387,8 +1415,42 @@ local_send_thread(void *arg) } break; } - if (!refcount_release(&hio->hio_countdown)) - continue; + + if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || + ggio->gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { + if (refcnt_release(&hio->hio_countdown) > 0) + continue; + } else { + /* + * Depending on hio_countdown value, requests finished + * in the following order: + * 0: remote memsync, remote final, local write + * 1: remote memsync, local write, (remote final) + * 2: local write, (remote memsync), (remote final) + */ + switch (refcnt_release(&hio->hio_countdown)) { + case 0: + /* + * Local write finished as last. + */ + break; + case 1: + /* + * Local write finished after remote memsync + * reply arrvied. We can complete the write now. + */ + if (hio->hio_errors[0] == 0) + write_complete(res, hio); + continue; + case 2: + /* + * Local write finished as first. + */ + continue; + default: + PJDLOG_ABORT("Invalid hio_countdown."); + } + } if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); @@ -1510,6 +1572,10 @@ remote_send_thread(void *arg) nv_add_uint64(nv, (uint64_t)ggio->gctl_seq, "seq"); nv_add_uint64(nv, offset, "offset"); nv_add_uint64(nv, length, "length"); + if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && + ggio->gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio)) { + nv_add_uint8(nv, 1, "memsync"); + } if (nv_error(nv) != 0) { hio->hio_errors[ncomp] = nv_error(nv); pjdlog_debug(2, @@ -1570,7 +1636,7 @@ remote_send_thread(void *arg) done_queue: nv_free(nv); if (ISSYNCREQ(hio)) { - if (!refcount_release(&hio->hio_countdown)) + if (refcnt_release(&hio->hio_countdown) > 0) continue; mtx_lock(&sync_lock); SYNCREQDONE(hio); @@ -1585,8 +1651,10 @@ done_queue: (void)hast_activemap_flush(res); } mtx_unlock(&res->hr_amp_lock); + if (hio->hio_replication == HAST_REPLICATION_MEMSYNC) + (void)refcnt_release(&hio->hio_countdown); } - if (!refcount_release(&hio->hio_countdown)) + if (refcnt_release(&hio->hio_countdown) > 0) continue; pjdlog_debug(2, "remote_send: (%p) Moving request to the done queue.", @@ -1610,6 +1678,7 @@ remote_recv_thread(void *arg) struct nv *nv; unsigned int ncomp; uint64_t seq; + bool memsyncack; int error; /* Remote component is 1 for now. */ @@ -1625,6 +1694,8 @@ remote_recv_thread(void *arg) } mtx_unlock(&hio_recv_list_lock[ncomp]); + memsyncack = false; + rw_rlock(&hio_remote_lock[ncomp]); if (!ISCONNECTED(res, ncomp)) { rw_unlock(&hio_remote_lock[ncomp]); @@ -1654,6 +1725,7 @@ remote_recv_thread(void *arg) nv_free(nv); continue; } + memsyncack = nv_exists(nv, "received"); mtx_lock(&hio_recv_list_lock[ncomp]); TAILQ_FOREACH(hio, &hio_recv_list[ncomp], hio_next[ncomp]) { if (hio->hio_ggio.gctl_seq == seq) { @@ -1709,8 +1781,80 @@ remote_recv_thread(void *arg) hio->hio_errors[ncomp] = 0; nv_free(nv); done_queue: - if (!refcount_release(&hio->hio_countdown)) - continue; + if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || + hio->hio_ggio.gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { + if (refcnt_release(&hio->hio_countdown) > 0) + continue; + } else { + /* + * Depending on hio_countdown value, requests finished + * in the following order: + * + * 0: local write, remote memsync, remote final + * or + * 0: remote memsync, local write, remote final + * + * 1: local write, remote memsync, (remote final) + * or + * 1: remote memsync, remote final, (local write) + * + * 2: remote memsync, (local write), (remote final) + * or + * 2: remote memsync, (remote final), (local write) + */ + switch (refcnt_release(&hio->hio_countdown)) { + case 0: + /* + * Remote final reply arrived. + */ + PJDLOG_ASSERT(!memsyncack); + break; + case 1: + if (memsyncack) { + /* + * Local request already finished, so we + * can complete the write. + */ + if (hio->hio_errors[0] == 0) + write_complete(res, hio); + /* + * We still need to wait for final + * remote reply. + */ + pjdlog_debug(2, + "remote_recv: (%p) Moving request back to the recv queue.", + hio); + mtx_lock(&hio_recv_list_lock[ncomp]); + TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], + hio, hio_next[ncomp]); + mtx_unlock(&hio_recv_list_lock[ncomp]); + } else { + /* + * Remote final reply arrived before + * local write finished. + * Nothing to do in such case. + */ + } + continue; + case 2: + /* + * We received remote memsync reply even before + * local write finished. + */ + PJDLOG_ASSERT(memsyncack); + + pjdlog_debug(2, + "remote_recv: (%p) Moving request back to the recv queue.", + hio); + mtx_lock(&hio_recv_list_lock[ncomp]); + TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, + hio_next[ncomp]); + mtx_unlock(&hio_recv_list_lock[ncomp]); + continue; + default: + PJDLOG_ABORT("Invalid hio_countdown."); + } + } if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); @@ -1995,7 +2139,7 @@ sync_thread(void *arg __unused) ncomp = 1; } mtx_unlock(&metadata_lock); - refcount_init(&hio->hio_countdown, 1); + hio->hio_countdown = 1; QUEUE_INSERT1(hio, send, ncomp); /* @@ -2045,7 +2189,7 @@ sync_thread(void *arg __unused) pjdlog_debug(2, "sync: (%p) Moving request to the send queue.", hio); - refcount_init(&hio->hio_countdown, 1); + hio->hio_countdown = 1; QUEUE_INSERT1(hio, send, ncomp); /* Copied: stable/9/sbin/hastd/refcnt.h (from r246922, head/sbin/hastd/refcnt.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sbin/hastd/refcnt.h Sun Apr 7 17:05:16 2013 (r249236, copy of r246922, head/sbin/hastd/refcnt.h) @@ -0,0 +1,57 @@ +/*- + * Copyright (c) 2005 John Baldwin + * 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. + * 3. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __REFCNT_H__ +#define __REFCNT_H__ + +#include + +#include "pjdlog.h" + +static __inline void +refcnt_acquire(volatile unsigned int *count) +{ + + atomic_add_acq_int(count, 1); +} + +static __inline unsigned int +refcnt_release(volatile unsigned int *count) +{ + unsigned int old; + + /* XXX: Should this have a rel membar? */ + old = atomic_fetchadd_int(count, -1); + PJDLOG_ASSERT(old > 0); + return (old - 1); +} + +#endif /* ! __REFCNT_H__ */ Modified: stable/9/sbin/hastd/secondary.c ============================================================================== --- stable/9/sbin/hastd/secondary.c Sun Apr 7 16:28:36 2013 (r249235) +++ stable/9/sbin/hastd/secondary.c Sun Apr 7 17:05:16 2013 (r249236) @@ -71,6 +71,7 @@ struct hio { uint8_t hio_cmd; uint64_t hio_offset; uint64_t hio_length; + bool hio_memsync; TAILQ_ENTRY(hio) hio_next; }; @@ -135,6 +136,22 @@ hio_clear(struct hio *hio) hio->hio_cmd = HIO_UNDEF; hio->hio_offset = 0; hio->hio_length = 0; + hio->hio_memsync = false; +} + +static void +hio_copy(const struct hio *srchio, struct hio *dsthio) +{ + + /* + * We don't copy hio_error, hio_data and hio_next fields. + */ + + dsthio->hio_seq = srchio->hio_seq; + dsthio->hio_cmd = srchio->hio_cmd; + dsthio->hio_offset = srchio->hio_offset; + dsthio->hio_length = srchio->hio_length; + dsthio->hio_memsync = srchio->hio_memsync; } static void @@ -543,8 +560,10 @@ requnpack(struct hast_resource *res, str case HIO_FLUSH: case HIO_KEEPALIVE: break; - case HIO_READ: case HIO_WRITE: + hio->hio_memsync = nv_exists(nv, "memsync"); + /* FALLTHROUGH */ + case HIO_READ: case HIO_DELETE: hio->hio_offset = nv_get_uint64(nv, "offset"); if (nv_error(nv) != 0) { @@ -621,7 +640,7 @@ static void * recv_thread(void *arg) { struct hast_resource *res = arg; - struct hio *hio; + struct hio *hio, *mshio; struct nv *nv; for (;;) { @@ -675,6 +694,27 @@ recv_thread(void *arg) secondary_exit(EX_TEMPFAIL, "Unable to receive request data"); } + if (hio->hio_memsync) { + /* + * For memsync requests we expect two replies. + * Clone the hio so we can handle both of them. + */ + pjdlog_debug(2, "recv: Taking free request."); + QUEUE_TAKE(free, mshio); + pjdlog_debug(2, "recv: (%p) Got request.", + mshio); + hio_copy(hio, mshio); + mshio->hio_error = 0; + /* + * We want to keep 'memsync' tag only on the + * request going onto send queue (mshio). + */ + hio->hio_memsync = false; + pjdlog_debug(2, + "recv: (%p) Moving memsync request to the send queue.", + mshio); + QUEUE_INSERT(send, mshio); + } } nv_free(nv); pjdlog_debug(2, "recv: (%p) Moving request to the disk queue.", @@ -819,6 +859,10 @@ send_thread(void *arg) nvout = nv_alloc(); /* Copy sequence number. */ nv_add_uint64(nvout, hio->hio_seq, "seq"); + if (hio->hio_memsync) { + PJDLOG_ASSERT(hio->hio_cmd == HIO_WRITE); + nv_add_int8(nvout, 1, "received"); + } switch (hio->hio_cmd) { case HIO_READ: if (hio->hio_error == 0) { From owner-svn-src-stable@FreeBSD.ORG Sun Apr 7 17:06:28 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A1EE28C8; Sun, 7 Apr 2013 17:06:28 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8CCE761C; Sun, 7 Apr 2013 17:06:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r37H6Si9022607; Sun, 7 Apr 2013 17:06:28 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r37H6Rga022595; Sun, 7 Apr 2013 17:06:27 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304071706.r37H6Rga022595@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 7 Apr 2013 17:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249237 - stable/8/sbin/hastd X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 17:06:28 -0000 Author: trociny Date: Sun Apr 7 17:06:26 2013 New Revision: 249237 URL: http://svnweb.freebsd.org/changeset/base/249237 Log: MFC r246922 (pjd): - Add support for 'memsync' mode. This is the fastest replication mode that's why it will now be the default. - Bump protocol version to 2 and add backward compatibility for version 1. - Allow to specify hosts by kern.hostid as well (in addition to hostname and kern.hostuuid) in configuration file. Sponsored by: Panzura Added: stable/8/sbin/hastd/refcnt.h - copied unchanged from r246922, head/sbin/hastd/refcnt.h Modified: stable/8/sbin/hastd/hast.conf.5 stable/8/sbin/hastd/hast.h stable/8/sbin/hastd/hast_proto.c stable/8/sbin/hastd/hastd.c stable/8/sbin/hastd/parse.y stable/8/sbin/hastd/primary.c stable/8/sbin/hastd/secondary.c Directory Properties: stable/8/sbin/hastd/ (props changed) Modified: stable/8/sbin/hastd/hast.conf.5 ============================================================================== --- stable/8/sbin/hastd/hast.conf.5 Sun Apr 7 17:05:16 2013 (r249236) +++ stable/8/sbin/hastd/hast.conf.5 Sun Apr 7 17:06:26 2013 (r249237) @@ -129,9 +129,13 @@ The .Aq node argument can be replaced either by a full hostname as obtained by .Xr gethostname 3 , -only first part of the hostname, or by node's UUID as found in the +only first part of the hostname, by node's UUID as found in the .Va kern.hostuuid .Xr sysctl 8 +variable +or by node's hostid as found in the +.Va kern.hostid +.Xr sysctl 8 variable. .Pp The following statements are available: @@ -208,15 +212,12 @@ to the application was lost. The risk of such a situation is very small. The .Ic memsync -replication mode is currently not implemented. +replication mode is the default. .It Ic fullsync .Pp Mark the write operation as completed when local as well as remote write completes. This is the safest and the slowest replication mode. -The -.Ic fullsync -replication mode is the default. .It Ic async .Pp The write operation is reported as complete right after the local write Modified: stable/8/sbin/hastd/hast.h ============================================================================== --- stable/8/sbin/hastd/hast.h Sun Apr 7 17:05:16 2013 (r249236) +++ stable/8/sbin/hastd/hast.h Sun Apr 7 17:06:26 2013 (r249237) @@ -53,8 +53,9 @@ * Version history: * 0 - initial version * 1 - HIO_KEEPALIVE added + * 2 - "memsync" and "received" attributes added for memsync mode */ -#define HAST_PROTO_VERSION 1 +#define HAST_PROTO_VERSION 2 #define EHAST_OK 0 #define EHAST_NOENTRY 1 @@ -142,8 +143,10 @@ struct hastd_config { struct hast_resource { /* Resource name. */ char hr_name[NAME_MAX]; - /* Replication mode (HAST_REPLICATION_*). */ + /* Negotiated replication mode (HAST_REPLICATION_*). */ int hr_replication; + /* Configured replication mode (HAST_REPLICATION_*). */ + int hr_original_replication; /* Provider name that will appear in /dev/hast/. */ char hr_provname[NAME_MAX]; /* Synchronization extent size. */ @@ -156,6 +159,8 @@ struct hast_resource { int hr_compression; /* Checksum algorithm. */ int hr_checksum; + /* Protocol version. */ + int hr_version; /* Path to local component. */ char hr_localpath[PATH_MAX]; Modified: stable/8/sbin/hastd/hast_proto.c ============================================================================== --- stable/8/sbin/hastd/hast_proto.c Sun Apr 7 17:05:16 2013 (r249236) +++ stable/8/sbin/hastd/hast_proto.c Sun Apr 7 17:06:26 2013 (r249237) @@ -112,7 +112,7 @@ hast_proto_send(const struct hast_resour if (eb == NULL) goto end; - hdr.version = HAST_PROTO_VERSION; + hdr.version = res != NULL ? res->hr_version : HAST_PROTO_VERSION; hdr.size = htole32((uint32_t)ebuf_size(eb)); if (ebuf_add_head(eb, &hdr, sizeof(hdr)) == -1) goto end; @@ -144,7 +144,7 @@ hast_proto_recv_hdr(const struct proto_c if (proto_recv(conn, &hdr, sizeof(hdr)) == -1) goto fail; - if (hdr.version != HAST_PROTO_VERSION) { + if (hdr.version > HAST_PROTO_VERSION) { errno = ERPCMISMATCH; goto fail; } Modified: stable/8/sbin/hastd/hastd.c ============================================================================== --- stable/8/sbin/hastd/hastd.c Sun Apr 7 17:05:16 2013 (r249236) +++ stable/8/sbin/hastd/hastd.c Sun Apr 7 17:06:26 2013 (r249237) @@ -68,7 +68,7 @@ static struct hastd_config *cfg; bool sigexit_received = false; /* Path to pidfile. */ static const char *pidfile; -/* PID file handle. */ +/* Pidfile handle. */ struct pidfh *pfh; /* Do we run in foreground? */ static bool foreground; @@ -748,6 +748,7 @@ listen_accept(struct hastd_listen *lst) const char *resname; const unsigned char *token; char laddr[256], raddr[256]; + uint8_t version; size_t size; pid_t pid; int status; @@ -797,6 +798,20 @@ listen_accept(struct hastd_listen *lst) goto close; } pjdlog_debug(2, "%s: resource=%s", raddr, resname); + version = nv_get_uint8(nvin, "version"); + pjdlog_debug(2, "%s: version=%hhu", raddr, version); + if (version == 0) { + /* + * If no version is sent, it means this is protocol version 1. + */ + version = 1; + } + if (version > HAST_PROTO_VERSION) { + pjdlog_info("Remote protocol version %hhu is not supported, falling back to version %hhu.", + version, (unsigned char)HAST_PROTO_VERSION); + version = HAST_PROTO_VERSION; + } + pjdlog_debug(1, "Negotiated protocol version %hhu.", version); token = nv_get_uint8_array(nvin, &size, "token"); /* * NULL token means that this is first connection. @@ -910,8 +925,10 @@ listen_accept(struct hastd_listen *lst) */ if (token == NULL) { + res->hr_version = version; arc4random_buf(res->hr_token, sizeof(res->hr_token)); nvout = nv_alloc(); + nv_add_uint8(nvout, version, "version"); nv_add_uint8_array(nvout, res->hr_token, sizeof(res->hr_token), "token"); if (nv_error(nvout) != 0) { @@ -922,7 +939,7 @@ listen_accept(struct hastd_listen *lst) strerror(nv_error(nvout))); goto fail; } - if (hast_proto_send(NULL, conn, nvout, NULL, 0) == -1) { + if (hast_proto_send(res, conn, nvout, NULL, 0) == -1) { int error = errno; pjdlog_errno(LOG_ERR, "Unable to send response to %s", Modified: stable/8/sbin/hastd/parse.y ============================================================================== --- stable/8/sbin/hastd/parse.y Sun Apr 7 17:05:16 2013 (r249236) +++ stable/8/sbin/hastd/parse.y Sun Apr 7 17:06:26 2013 (r249237) @@ -81,6 +81,7 @@ static int isitme(const char *name) { char buf[MAXHOSTNAMELEN]; + unsigned long hostid; char *pos; size_t bufsize; @@ -95,7 +96,7 @@ isitme(const char *name) return (1); /* - * Now check if it matches first part of the host name. + * Check if it matches first part of the host name. */ pos = strchr(buf, '.'); if (pos != NULL && (size_t)(pos - buf) == strlen(name) && @@ -104,7 +105,7 @@ isitme(const char *name) } /* - * At the end check if name is equal to our host's UUID. + * Check if it matches host UUID. */ bufsize = sizeof(buf); if (sysctlbyname("kern.hostuuid", buf, &bufsize, NULL, 0) < 0) { @@ -114,6 +115,18 @@ isitme(const char *name) if (strcasecmp(buf, name) == 0) return (1); + /* + * Check if it matches hostid. + */ + bufsize = sizeof(hostid); + if (sysctlbyname("kern.hostid", &hostid, &bufsize, NULL, 0) < 0) { + pjdlog_errno(LOG_ERR, "sysctlbyname(kern.hostid) failed"); + return (-1); + } + (void)snprintf(buf, sizeof(buf), "hostid%lu", hostid); + if (strcmp(buf, name) == 0) + return (1); + /* * Looks like this isn't about us. */ @@ -138,6 +151,7 @@ node_names(char **namesp) { static char names[MAXHOSTNAMELEN * 3]; char buf[MAXHOSTNAMELEN]; + unsigned long hostid; char *pos; size_t bufsize; @@ -165,6 +179,16 @@ node_names(char **namesp) return (-1); } (void)strlcat(names, buf, sizeof(names)); + (void)strlcat(names, ", ", sizeof(names)); + + /* Host ID. */ + bufsize = sizeof(hostid); + if (sysctlbyname("kern.hostid", &hostid, &bufsize, NULL, 0) < 0) { + pjdlog_errno(LOG_ERR, "sysctlbyname(kern.hostid) failed"); + return (-1); + } + (void)snprintf(buf, sizeof(buf), "hostid%lu", hostid); + (void)strlcat(names, buf, sizeof(names)); *namesp = names; @@ -190,7 +214,7 @@ yy_config_parse(const char *config, bool lineno = 0; depth0_timeout = HAST_TIMEOUT; - depth0_replication = HAST_REPLICATION_FULLSYNC; + depth0_replication = HAST_REPLICATION_MEMSYNC; depth0_checksum = HAST_CHECKSUM_NONE; depth0_compression = HAST_COMPRESSION_HOLE; strlcpy(depth0_control, HAST_CONTROL, sizeof(depth0_control)); @@ -300,11 +324,7 @@ yy_config_parse(const char *config, bool * Use global or default setting. */ curres->hr_replication = depth0_replication; - } - if (curres->hr_replication == HAST_REPLICATION_MEMSYNC) { - pjdlog_warning("Replication mode \"%s\" is not implemented, falling back to \"%s\".", - "memsync", "fullsync"); - curres->hr_replication = HAST_REPLICATION_FULLSYNC; + curres->hr_original_replication = depth0_replication; } if (curres->hr_checksum == -1) { /* @@ -523,6 +543,7 @@ replication_statement: REPLICATION repli case 1: PJDLOG_ASSERT(curres != NULL); curres->hr_replication = $2; + curres->hr_original_replication = $2; break; default: PJDLOG_ABORT("replication at wrong depth level"); @@ -820,8 +841,10 @@ resource_start: STR curres->hr_role = HAST_ROLE_INIT; curres->hr_previous_role = HAST_ROLE_INIT; curres->hr_replication = -1; + curres->hr_original_replication = -1; curres->hr_checksum = -1; curres->hr_compression = -1; + curres->hr_version = 1; curres->hr_timeout = -1; curres->hr_exec[0] = '\0'; curres->hr_provname[0] = '\0'; Modified: stable/8/sbin/hastd/primary.c ============================================================================== --- stable/8/sbin/hastd/primary.c Sun Apr 7 17:05:16 2013 (r249236) +++ stable/8/sbin/hastd/primary.c Sun Apr 7 17:06:26 2013 (r249237) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -65,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include "metadata.h" #include "proto.h" #include "pjdlog.h" +#include "refcnt.h" #include "subr.h" #include "synch.h" @@ -545,7 +545,7 @@ primary_connect(struct hast_resource *re return (0); } - + /* * Function instructs GEOM_GATE to handle reads directly from within the kernel. */ @@ -579,6 +579,7 @@ init_remote(struct hast_resource *res, s int32_t extentsize; int64_t datasize; uint32_t mapsize; + uint8_t version; size_t size; int error; @@ -599,6 +600,7 @@ init_remote(struct hast_resource *res, s */ nvout = nv_alloc(); nv_add_string(nvout, res->hr_name, "resource"); + nv_add_uint8(nvout, HAST_PROTO_VERSION, "version"); if (nv_error(nvout) != 0) { pjdlog_common(LOG_WARNING, 0, nv_error(nvout), "Unable to allocate header for connection with %s", @@ -628,6 +630,20 @@ init_remote(struct hast_resource *res, s nv_free(nvin); goto close; } + version = nv_get_uint8(nvin, "version"); + if (version == 0) { + /* + * If no version is sent, it means this is protocol version 1. + */ + version = 1; + } + if (version > HAST_PROTO_VERSION) { + pjdlog_warning("Invalid version received (%hhu).", version); + nv_free(nvin); + goto close; + } + res->hr_version = version; + pjdlog_debug(1, "Negotiated protocol version %d.", res->hr_version); token = nv_get_uint8_array(nvin, &size, "token"); if (token == NULL) { pjdlog_warning("Handshake header from %s has no 'token' field.", @@ -778,6 +794,16 @@ init_remote(struct hast_resource *res, s pjdlog_errno(LOG_WARNING, "Unable to set connection direction"); #endif pjdlog_info("Connected to %s.", res->hr_remoteaddr); + if (res->hr_original_replication == HAST_REPLICATION_MEMSYNC && + res->hr_version < 2) { + pjdlog_warning("The 'memsync' replication mode is not supported by the remote node, falling back to 'fullsync' mode."); + res->hr_replication = HAST_REPLICATION_FULLSYNC; + } else if (res->hr_replication != res->hr_original_replication) { + /* + * This is in case hastd disconnected and was upgraded. + */ + res->hr_replication = res->hr_original_replication; + } if (inp != NULL && outp != NULL) { *inp = in; *outp = out; @@ -1011,7 +1037,8 @@ hastd_primary(struct hast_resource *res) } static void -reqlog(int loglevel, int debuglevel, struct g_gate_ctl_io *ggio, const char *fmt, ...) +reqlog(int loglevel, int debuglevel, struct g_gate_ctl_io *ggio, + const char *fmt, ...) { char msg[1024]; va_list ap; @@ -1022,21 +1049,18 @@ reqlog(int loglevel, int debuglevel, str switch (ggio->gctl_cmd) { case BIO_READ: (void)snprlcat(msg, sizeof(msg), "READ(%ju, %ju).", - (uintmax_t)ggio->gctl_offset, - (uintmax_t)ggio->gctl_length); + (uintmax_t)ggio->gctl_offset, (uintmax_t)ggio->gctl_length); break; case BIO_DELETE: (void)snprlcat(msg, sizeof(msg), "DELETE(%ju, %ju).", - (uintmax_t)ggio->gctl_offset, - (uintmax_t)ggio->gctl_length); + (uintmax_t)ggio->gctl_offset, (uintmax_t)ggio->gctl_length); break; case BIO_FLUSH: (void)snprlcat(msg, sizeof(msg), "FLUSH."); break; case BIO_WRITE: (void)snprlcat(msg, sizeof(msg), "WRITE(%ju, %ju).", - (uintmax_t)ggio->gctl_offset, - (uintmax_t)ggio->gctl_length); + (uintmax_t)ggio->gctl_offset, (uintmax_t)ggio->gctl_length); break; default: (void)snprlcat(msg, sizeof(msg), "UNKNOWN(%u).", @@ -1276,8 +1300,13 @@ ggate_recv_thread(void *arg) } pjdlog_debug(2, "ggate_recv: (%p) Moving request to the send queues.", hio); - refcount_init(&hio->hio_countdown, ncomps); - for (ii = ncomp; ii < ncomp + ncomps; ii++) + hio->hio_countdown = ncomps; + if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && + ggio->gctl_cmd == BIO_WRITE) { + /* Each remote request needs two responses in memsync. */ + hio->hio_countdown++; + } + for (ii = ncomp; ii < ncomps; ii++) QUEUE_INSERT1(hio, send, ii); } /* NOTREACHED */ @@ -1348,8 +1377,7 @@ local_send_thread(void *arg) } else { hio->hio_errors[ncomp] = 0; if (hio->hio_replication == - HAST_REPLICATION_ASYNC && - !ISSYNCREQ(hio)) { + HAST_REPLICATION_ASYNC) { ggio->gctl_error = 0; write_complete(res, hio); } @@ -1387,8 +1415,42 @@ local_send_thread(void *arg) } break; } - if (!refcount_release(&hio->hio_countdown)) - continue; + + if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || + ggio->gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { + if (refcnt_release(&hio->hio_countdown) > 0) + continue; + } else { + /* + * Depending on hio_countdown value, requests finished + * in the following order: + * 0: remote memsync, remote final, local write + * 1: remote memsync, local write, (remote final) + * 2: local write, (remote memsync), (remote final) + */ + switch (refcnt_release(&hio->hio_countdown)) { + case 0: + /* + * Local write finished as last. + */ + break; + case 1: + /* + * Local write finished after remote memsync + * reply arrvied. We can complete the write now. + */ + if (hio->hio_errors[0] == 0) + write_complete(res, hio); + continue; + case 2: + /* + * Local write finished as first. + */ + continue; + default: + PJDLOG_ABORT("Invalid hio_countdown."); + } + } if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); @@ -1510,6 +1572,10 @@ remote_send_thread(void *arg) nv_add_uint64(nv, (uint64_t)ggio->gctl_seq, "seq"); nv_add_uint64(nv, offset, "offset"); nv_add_uint64(nv, length, "length"); + if (hio->hio_replication == HAST_REPLICATION_MEMSYNC && + ggio->gctl_cmd == BIO_WRITE && !ISSYNCREQ(hio)) { + nv_add_uint8(nv, 1, "memsync"); + } if (nv_error(nv) != 0) { hio->hio_errors[ncomp] = nv_error(nv); pjdlog_debug(2, @@ -1570,7 +1636,7 @@ remote_send_thread(void *arg) done_queue: nv_free(nv); if (ISSYNCREQ(hio)) { - if (!refcount_release(&hio->hio_countdown)) + if (refcnt_release(&hio->hio_countdown) > 0) continue; mtx_lock(&sync_lock); SYNCREQDONE(hio); @@ -1585,8 +1651,10 @@ done_queue: (void)hast_activemap_flush(res); } mtx_unlock(&res->hr_amp_lock); + if (hio->hio_replication == HAST_REPLICATION_MEMSYNC) + (void)refcnt_release(&hio->hio_countdown); } - if (!refcount_release(&hio->hio_countdown)) + if (refcnt_release(&hio->hio_countdown) > 0) continue; pjdlog_debug(2, "remote_send: (%p) Moving request to the done queue.", @@ -1610,6 +1678,7 @@ remote_recv_thread(void *arg) struct nv *nv; unsigned int ncomp; uint64_t seq; + bool memsyncack; int error; /* Remote component is 1 for now. */ @@ -1625,6 +1694,8 @@ remote_recv_thread(void *arg) } mtx_unlock(&hio_recv_list_lock[ncomp]); + memsyncack = false; + rw_rlock(&hio_remote_lock[ncomp]); if (!ISCONNECTED(res, ncomp)) { rw_unlock(&hio_remote_lock[ncomp]); @@ -1654,6 +1725,7 @@ remote_recv_thread(void *arg) nv_free(nv); continue; } + memsyncack = nv_exists(nv, "received"); mtx_lock(&hio_recv_list_lock[ncomp]); TAILQ_FOREACH(hio, &hio_recv_list[ncomp], hio_next[ncomp]) { if (hio->hio_ggio.gctl_seq == seq) { @@ -1709,8 +1781,80 @@ remote_recv_thread(void *arg) hio->hio_errors[ncomp] = 0; nv_free(nv); done_queue: - if (!refcount_release(&hio->hio_countdown)) - continue; + if (hio->hio_replication != HAST_REPLICATION_MEMSYNC || + hio->hio_ggio.gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) { + if (refcnt_release(&hio->hio_countdown) > 0) + continue; + } else { + /* + * Depending on hio_countdown value, requests finished + * in the following order: + * + * 0: local write, remote memsync, remote final + * or + * 0: remote memsync, local write, remote final + * + * 1: local write, remote memsync, (remote final) + * or + * 1: remote memsync, remote final, (local write) + * + * 2: remote memsync, (local write), (remote final) + * or + * 2: remote memsync, (remote final), (local write) + */ + switch (refcnt_release(&hio->hio_countdown)) { + case 0: + /* + * Remote final reply arrived. + */ + PJDLOG_ASSERT(!memsyncack); + break; + case 1: + if (memsyncack) { + /* + * Local request already finished, so we + * can complete the write. + */ + if (hio->hio_errors[0] == 0) + write_complete(res, hio); + /* + * We still need to wait for final + * remote reply. + */ + pjdlog_debug(2, + "remote_recv: (%p) Moving request back to the recv queue.", + hio); + mtx_lock(&hio_recv_list_lock[ncomp]); + TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], + hio, hio_next[ncomp]); + mtx_unlock(&hio_recv_list_lock[ncomp]); + } else { + /* + * Remote final reply arrived before + * local write finished. + * Nothing to do in such case. + */ + } + continue; + case 2: + /* + * We received remote memsync reply even before + * local write finished. + */ + PJDLOG_ASSERT(memsyncack); + + pjdlog_debug(2, + "remote_recv: (%p) Moving request back to the recv queue.", + hio); + mtx_lock(&hio_recv_list_lock[ncomp]); + TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, + hio_next[ncomp]); + mtx_unlock(&hio_recv_list_lock[ncomp]); + continue; + default: + PJDLOG_ABORT("Invalid hio_countdown."); + } + } if (ISSYNCREQ(hio)) { mtx_lock(&sync_lock); SYNCREQDONE(hio); @@ -1995,7 +2139,7 @@ sync_thread(void *arg __unused) ncomp = 1; } mtx_unlock(&metadata_lock); - refcount_init(&hio->hio_countdown, 1); + hio->hio_countdown = 1; QUEUE_INSERT1(hio, send, ncomp); /* @@ -2045,7 +2189,7 @@ sync_thread(void *arg __unused) pjdlog_debug(2, "sync: (%p) Moving request to the send queue.", hio); - refcount_init(&hio->hio_countdown, 1); + hio->hio_countdown = 1; QUEUE_INSERT1(hio, send, ncomp); /* Copied: stable/8/sbin/hastd/refcnt.h (from r246922, head/sbin/hastd/refcnt.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sbin/hastd/refcnt.h Sun Apr 7 17:06:26 2013 (r249237, copy of r246922, head/sbin/hastd/refcnt.h) @@ -0,0 +1,57 @@ +/*- + * Copyright (c) 2005 John Baldwin + * 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. + * 3. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __REFCNT_H__ +#define __REFCNT_H__ + +#include + +#include "pjdlog.h" + +static __inline void +refcnt_acquire(volatile unsigned int *count) +{ + + atomic_add_acq_int(count, 1); +} + +static __inline unsigned int +refcnt_release(volatile unsigned int *count) +{ + unsigned int old; + + /* XXX: Should this have a rel membar? */ + old = atomic_fetchadd_int(count, -1); + PJDLOG_ASSERT(old > 0); + return (old - 1); +} + +#endif /* ! __REFCNT_H__ */ Modified: stable/8/sbin/hastd/secondary.c ============================================================================== --- stable/8/sbin/hastd/secondary.c Sun Apr 7 17:05:16 2013 (r249236) +++ stable/8/sbin/hastd/secondary.c Sun Apr 7 17:06:26 2013 (r249237) @@ -71,6 +71,7 @@ struct hio { uint8_t hio_cmd; uint64_t hio_offset; uint64_t hio_length; + bool hio_memsync; TAILQ_ENTRY(hio) hio_next; }; @@ -135,6 +136,22 @@ hio_clear(struct hio *hio) hio->hio_cmd = HIO_UNDEF; hio->hio_offset = 0; hio->hio_length = 0; + hio->hio_memsync = false; +} + +static void +hio_copy(const struct hio *srchio, struct hio *dsthio) +{ + + /* + * We don't copy hio_error, hio_data and hio_next fields. + */ + + dsthio->hio_seq = srchio->hio_seq; + dsthio->hio_cmd = srchio->hio_cmd; + dsthio->hio_offset = srchio->hio_offset; + dsthio->hio_length = srchio->hio_length; + dsthio->hio_memsync = srchio->hio_memsync; } static void @@ -543,8 +560,10 @@ requnpack(struct hast_resource *res, str case HIO_FLUSH: case HIO_KEEPALIVE: break; - case HIO_READ: case HIO_WRITE: + hio->hio_memsync = nv_exists(nv, "memsync"); + /* FALLTHROUGH */ + case HIO_READ: case HIO_DELETE: hio->hio_offset = nv_get_uint64(nv, "offset"); if (nv_error(nv) != 0) { @@ -621,7 +640,7 @@ static void * recv_thread(void *arg) { struct hast_resource *res = arg; - struct hio *hio; + struct hio *hio, *mshio; struct nv *nv; for (;;) { @@ -675,6 +694,27 @@ recv_thread(void *arg) secondary_exit(EX_TEMPFAIL, "Unable to receive request data"); } + if (hio->hio_memsync) { + /* + * For memsync requests we expect two replies. + * Clone the hio so we can handle both of them. + */ + pjdlog_debug(2, "recv: Taking free request."); + QUEUE_TAKE(free, mshio); + pjdlog_debug(2, "recv: (%p) Got request.", + mshio); + hio_copy(hio, mshio); + mshio->hio_error = 0; + /* + * We want to keep 'memsync' tag only on the + * request going onto send queue (mshio). + */ + hio->hio_memsync = false; + pjdlog_debug(2, + "recv: (%p) Moving memsync request to the send queue.", + mshio); + QUEUE_INSERT(send, mshio); + } } nv_free(nv); pjdlog_debug(2, "recv: (%p) Moving request to the disk queue.", @@ -819,6 +859,10 @@ send_thread(void *arg) nvout = nv_alloc(); /* Copy sequence number. */ nv_add_uint64(nvout, hio->hio_seq, "seq"); + if (hio->hio_memsync) { + PJDLOG_ASSERT(hio->hio_cmd == HIO_WRITE); + nv_add_int8(nvout, 1, "received"); + } switch (hio->hio_cmd) { case HIO_READ: if (hio->hio_error == 0) { From owner-svn-src-stable@FreeBSD.ORG Sun Apr 7 21:25:15 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7D86329D; Sun, 7 Apr 2013 21:25:15 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 609C7B5; Sun, 7 Apr 2013 21:25:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r37LPFeZ099179; Sun, 7 Apr 2013 21:25:15 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r37LPEbX099174; Sun, 7 Apr 2013 21:25:14 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304072125.r37LPEbX099174@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 7 Apr 2013 21:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249242 - stable/9/bin/sh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Apr 2013 21:25:15 -0000 Author: jilles Date: Sun Apr 7 21:25:14 2013 New Revision: 249242 URL: http://svnweb.freebsd.org/changeset/base/249242 Log: MFC r230998,r233792: sh: Use vfork in a few common cases. This uses vfork() for simple commands and command substitutions containing a single simple command, invoking an external program under certain conditions (no redirections or variable assignments, non-interactive shell, no job control). These restrictions limit the amount of code executed in a vforked child. Various incarnations of this patch have been shown to bring performance improvements: http://lists.freebsd.org/pipermail/freebsd-hackers/2012-January/037581.html The use of vfork() can be disabled by setting a variable named SH_DISABLE_VFORK. Modified: stable/9/bin/sh/eval.c stable/9/bin/sh/jobs.c stable/9/bin/sh/jobs.h stable/9/bin/sh/var.c stable/9/bin/sh/var.h Directory Properties: stable/9/bin/sh/ (props changed) Modified: stable/9/bin/sh/eval.c ============================================================================== --- stable/9/bin/sh/eval.c Sun Apr 7 17:54:38 2013 (r249241) +++ stable/9/bin/sh/eval.c Sun Apr 7 21:25:14 2013 (r249242) @@ -906,6 +906,15 @@ evalcommand(union node *cmd, int flags, if (pipe(pip) < 0) error("Pipe call failed: %s", strerror(errno)); } + if (cmdentry.cmdtype == CMDNORMAL && + cmd->ncmd.redirect == NULL && + varlist.list == NULL && + (mode == FORK_FG || mode == FORK_NOJOB) && + !disvforkset() && !iflag && !mflag) { + vforkexecshell(jp, argv, environment(), path, + cmdentry.u.index, flags & EV_BACKCMD ? pip : NULL); + goto parent; + } if (forkshell(jp, cmd, mode) != 0) goto parent; /* at end of routine */ if (flags & EV_BACKCMD) { Modified: stable/9/bin/sh/jobs.c ============================================================================== --- stable/9/bin/sh/jobs.c Sun Apr 7 17:54:38 2013 (r249241) +++ stable/9/bin/sh/jobs.c Sun Apr 7 21:25:14 2013 (r249242) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #undef CEOF /* syntax.h redefines this */ #endif #include "redir.h" +#include "exec.h" #include "show.h" #include "main.h" #include "parser.h" @@ -884,6 +885,54 @@ forkshell(struct job *jp, union node *n, } +pid_t +vforkexecshell(struct job *jp, char **argv, char **envp, const char *path, int idx, int pip[2]) +{ + pid_t pid; + struct jmploc jmploc; + struct jmploc *savehandler; + + TRACE(("vforkexecshell(%%%td, %s, %p) called\n", jp - jobtab, argv[0], + (void *)pip)); + INTOFF; + flushall(); + savehandler = handler; + pid = vfork(); + if (pid == -1) { + TRACE(("Vfork failed, errno=%d\n", errno)); + INTON; + error("Cannot fork: %s", strerror(errno)); + } + if (pid == 0) { + TRACE(("Child shell %d\n", (int)getpid())); + if (setjmp(jmploc.loc)) + _exit(exception == EXEXEC ? exerrno : 2); + if (pip != NULL) { + close(pip[0]); + if (pip[1] != 1) { + dup2(pip[1], 1); + close(pip[1]); + } + } + handler = &jmploc; + shellexec(argv, envp, path, idx); + } + handler = savehandler; + if (jp) { + struct procstat *ps = &jp->ps[jp->nprocs++]; + ps->pid = pid; + ps->status = -1; + ps->cmd = nullstr; + jp->foreground = 1; +#if JOBS + setcurjob(jp); +#endif + } + INTON; + TRACE(("In parent shell: child = %d\n", (int)pid)); + return pid; +} + /* * Wait for job to finish. Modified: stable/9/bin/sh/jobs.h ============================================================================== --- stable/9/bin/sh/jobs.h Sun Apr 7 17:54:38 2013 (r249241) +++ stable/9/bin/sh/jobs.h Sun Apr 7 21:25:14 2013 (r249242) @@ -91,6 +91,7 @@ void setjobctl(int); void showjobs(int, int); struct job *makejob(union node *, int); pid_t forkshell(struct job *, union node *, int); +pid_t vforkexecshell(struct job *, char **, char **, const char *, int, int []); int waitforjob(struct job *, int *); int stoppedjobs(void); int backgndpidset(void); Modified: stable/9/bin/sh/var.c ============================================================================== --- stable/9/bin/sh/var.c Sun Apr 7 17:54:38 2013 (r249241) +++ stable/9/bin/sh/var.c Sun Apr 7 21:25:14 2013 (r249242) @@ -94,6 +94,7 @@ struct var vps2; struct var vps4; struct var vvers; static struct var voptind; +struct var vdisvfork; int forcelocal; @@ -125,6 +126,8 @@ static const struct varinit varinit[] = #endif { &voptind, 0, "OPTIND=1", getoptsreset }, + { &vdisvfork, VUNSET, "SH_DISABLE_VFORK=", + NULL }, { NULL, 0, NULL, NULL } }; Modified: stable/9/bin/sh/var.h ============================================================================== --- stable/9/bin/sh/var.h Sun Apr 7 17:54:38 2013 (r249241) +++ stable/9/bin/sh/var.h Sun Apr 7 21:25:14 2013 (r249242) @@ -79,6 +79,7 @@ extern struct var vppid; extern struct var vps1; extern struct var vps2; extern struct var vps4; +extern struct var vdisvfork; #ifndef NO_HISTORY extern struct var vhistsize; extern struct var vterm; @@ -109,6 +110,7 @@ extern int initial_localeisutf8; #endif #define mpathset() ((vmpath.flags & VUNSET) == 0) +#define disvforkset() ((vdisvfork.flags & VUNSET) == 0) void initvar(void); void setvar(const char *, const char *, int); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 07:08:30 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3EB85D9D; Mon, 8 Apr 2013 07:08:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3028261D; Mon, 8 Apr 2013 07:08:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3878Ubv070715; Mon, 8 Apr 2013 07:08:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3878UHj070714; Mon, 8 Apr 2013 07:08:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201304080708.r3878UHj070714@svn.freebsd.org> From: Dimitry Andric Date: Mon, 8 Apr 2013 07:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249243 - stable/9/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 07:08:30 -0000 Author: dim Date: Mon Apr 8 07:08:29 2013 New Revision: 249243 URL: http://svnweb.freebsd.org/changeset/base/249243 Log: MFC r248991: Follow up to r247960 and rr247960 by also amending ctfmerge. For the only other case where STT_FILE symbols are used, in symit_next() in cddl/contrib/opensolaris/tools/ctf/cvt/input.c, save the basename of the symbol, instead of the full pathname. Reported by: avg Tested by: avg, jimharris Modified: stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/input.c Directory Properties: stable/9/cddl/ (props changed) stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/input.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/input.c Sun Apr 7 21:25:14 2013 (r249242) +++ stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/input.c Mon Apr 8 07:08:29 2013 (r249243) @@ -387,6 +387,7 @@ GElf_Sym * symit_next(symit_data_t *si, int type) { GElf_Sym sym; + char *bname; int check_sym = (type == STT_OBJECT || type == STT_FUNC); for (; si->si_next < si->si_nument; si->si_next++) { @@ -394,8 +395,10 @@ symit_next(symit_data_t *si, int type) gelf_getsym(si->si_symd, si->si_next, &sym); si->si_curname = (caddr_t)si->si_strd->d_buf + sym.st_name; - if (GELF_ST_TYPE(sym.st_info) == STT_FILE) - si->si_curfile = si->si_curname; + if (GELF_ST_TYPE(sym.st_info) == STT_FILE) { + bname = strrchr(si->si_curname, '/'); + si->si_curfile = bname == NULL ? si->si_curname : bname + 1; + } if (GELF_ST_TYPE(sym.st_info) != type || sym.st_shndx == SHN_UNDEF) From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 08:29:53 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 15324726; Mon, 8 Apr 2013 08:29:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 072A5A46; Mon, 8 Apr 2013 08:29:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r388TqmP094441; Mon, 8 Apr 2013 08:29:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r388Tq0q094440; Mon, 8 Apr 2013 08:29:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304080829.r388Tq0q094440@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 8 Apr 2013 08:29:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249246 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 08:29:53 -0000 Author: kib Date: Mon Apr 8 08:29:52 2013 New Revision: 249246 URL: http://svnweb.freebsd.org/changeset/base/249246 Log: MFC r248969: Do not call the VOP_LOOKUP() for the doomed directory vnode. Modified: stable/9/sys/kern/vfs_lookup.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_lookup.c ============================================================================== --- stable/9/sys/kern/vfs_lookup.c Mon Apr 8 08:05:15 2013 (r249245) +++ stable/9/sys/kern/vfs_lookup.c Mon Apr 8 08:29:52 2013 (r249246) @@ -714,6 +714,10 @@ unionlookup: VOP_ISLOCKED(dp) == LK_SHARED && (cnp->cn_flags & ISLASTCN) && (cnp->cn_flags & LOCKPARENT)) vn_lock(dp, LK_UPGRADE|LK_RETRY); + if ((dp->v_iflag & VI_DOOMED) != 0) { + error = ENOENT; + goto bad; + } /* * If we're looking up the last component and we need an exclusive * lock, adjust our lkflags. From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 08:33:32 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2C2BA9F8; Mon, 8 Apr 2013 08:33:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1F8B9A7E; Mon, 8 Apr 2013 08:33:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r388XWZA096636; Mon, 8 Apr 2013 08:33:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r388XVfB096635; Mon, 8 Apr 2013 08:33:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304080833.r388XVfB096635@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 8 Apr 2013 08:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249247 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 08:33:32 -0000 Author: kib Date: Mon Apr 8 08:33:31 2013 New Revision: 249247 URL: http://svnweb.freebsd.org/changeset/base/249247 Log: MFC r248969: Do not call the VOP_LOOKUP() for the doomed directory vnode. Modified: stable/8/sys/kern/vfs_lookup.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/vfs_lookup.c ============================================================================== --- stable/8/sys/kern/vfs_lookup.c Mon Apr 8 08:29:52 2013 (r249246) +++ stable/8/sys/kern/vfs_lookup.c Mon Apr 8 08:33:31 2013 (r249247) @@ -679,6 +679,10 @@ unionlookup: VOP_ISLOCKED(dp) == LK_SHARED && (cnp->cn_flags & ISLASTCN) && (cnp->cn_flags & LOCKPARENT)) vn_lock(dp, LK_UPGRADE|LK_RETRY); + if ((dp->v_iflag & VI_DOOMED) != 0) { + error = ENOENT; + goto bad; + } /* * If we're looking up the last component and we need an exclusive * lock, adjust our lkflags. From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 12:09:54 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9503F7C8; Mon, 8 Apr 2013 12:09:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 856B2A28; Mon, 8 Apr 2013 12:09:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38C9sbC059552; Mon, 8 Apr 2013 12:09:54 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38C9s3E059551; Mon, 8 Apr 2013 12:09:54 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304081209.r38C9s3E059551@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 8 Apr 2013 12:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249254 - stable/9/bin/setfacl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 12:09:54 -0000 Author: trasz Date: Mon Apr 8 12:09:53 2013 New Revision: 249254 URL: http://svnweb.freebsd.org/changeset/base/249254 Log: MFC r248972: Mention that read_attributes, write_attributes, read_acl and write_acl are always permitted for the file owner. PR: kern/174948 Modified: stable/9/bin/setfacl/setfacl.1 Directory Properties: stable/9/bin/setfacl/ (props changed) Modified: stable/9/bin/setfacl/setfacl.1 ============================================================================== --- stable/9/bin/setfacl/setfacl.1 Mon Apr 8 10:53:22 2013 (r249253) +++ stable/9/bin/setfacl/setfacl.1 Mon Apr 8 12:09:53 2013 (r249254) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2013 +.Dd April 1, 2013 .Dt SETFACL 1 .Os .Sh NAME @@ -401,6 +401,10 @@ NFSv4 ACL entries are evaluated in their .Pp Multiple ACL entries specified on the command line are separated by commas. +.Pp +Note that the file owner is always granted the read_acl, write_acl, +read_attributes, and write_attributes permissions, even if the ACL +would deny it. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 19:48:40 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BCCB4EE3; Mon, 8 Apr 2013 19:48:40 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 959F76F1; Mon, 8 Apr 2013 19:48:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38Jme15097887; Mon, 8 Apr 2013 19:48:40 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38JmeuU097886; Mon, 8 Apr 2013 19:48:40 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304081948.r38JmeuU097886@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 8 Apr 2013 19:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249271 - stable/9/usr.sbin/bsnmpd/modules/snmp_hostres X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 19:48:40 -0000 Author: trociny Date: Mon Apr 8 19:48:40 2013 New Revision: 249271 URL: http://svnweb.freebsd.org/changeset/base/249271 Log: MFC r248707: hrStorageSize and hrStorageUsed are 32 bit integers, reporting a fs size and usage in hrStorageAllocationUnits. If the file system has more than 2^31 allocations it can not be shown correctly and the meters are useless. In such cases follow net-snmp behaviour and increase hrStorageAllocationUnits so the values fit under INT_MAX. PR: bin/177183 Submitted by: Eugene Grosbein egrosbein rdtc.ru Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c Directory Properties: stable/9/usr.sbin/bsnmpd/ (props changed) stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/ (props changed) Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c ============================================================================== --- stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c Mon Apr 8 19:44:57 2013 (r249270) +++ stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c Mon Apr 8 19:48:40 2013 (r249271) @@ -442,10 +442,9 @@ static void storage_OS_get_fs(void) { struct storage_entry *entry; - uint64_t used_blocks_count = 0; + uint64_t size, used; + int i, mounted_fs_count, units; char fs_string[SE_DESC_MLEN]; - int mounted_fs_count; - int i = 0; if ((mounted_fs_count = getfsstat(NULL, 0, MNT_NOWAIT)) < 0) { syslog(LOG_ERR, "hrStorageTable: getfsstat() failed: %m"); @@ -488,22 +487,17 @@ storage_OS_get_fs(void) entry->flags |= HR_STORAGE_FOUND; entry->type = fs_get_type(&fs_buf[i]); /*XXX - This is wrong*/ - if (fs_buf[i].f_bsize > INT_MAX) - entry->allocationUnits = INT_MAX; - else - entry->allocationUnits = fs_buf[i].f_bsize; - - if (fs_buf[i].f_blocks > INT_MAX) - entry->size = INT_MAX; - else - entry->size = fs_buf[i].f_blocks; - - used_blocks_count = fs_buf[i].f_blocks - fs_buf[i].f_bfree; - - if (used_blocks_count > INT_MAX) - entry->used = INT_MAX; - else - entry->used = used_blocks_count; + units = fs_buf[i].f_bsize; + size = fs_buf[i].f_blocks; + used = fs_buf[i].f_blocks - fs_buf[i].f_bfree; + while (size > INT_MAX) { + units <<= 1; + size >>= 1; + used >>= 1; + } + entry->allocationUnits = units; + entry->size = size; + entry->used = used; entry->allocationFailures = 0; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 19:50:16 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 827C6133; Mon, 8 Apr 2013 19:50:16 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5B559763; Mon, 8 Apr 2013 19:50:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38JoGl4098208; Mon, 8 Apr 2013 19:50:16 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38JoGGv098207; Mon, 8 Apr 2013 19:50:16 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304081950.r38JoGGv098207@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 8 Apr 2013 19:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249272 - stable/8/usr.sbin/bsnmpd/modules/snmp_hostres X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 19:50:16 -0000 Author: trociny Date: Mon Apr 8 19:50:15 2013 New Revision: 249272 URL: http://svnweb.freebsd.org/changeset/base/249272 Log: MFC r248707: hrStorageSize and hrStorageUsed are 32 bit integers, reporting a fs size and usage in hrStorageAllocationUnits. If the file system has more than 2^31 allocations it can not be shown correctly and the meters are useless. In such cases follow net-snmp behaviour and increase hrStorageAllocationUnits so the values fit under INT_MAX. PR: bin/177183 Submitted by: Eugene Grosbein egrosbein rdtc.ru Modified: stable/8/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c Directory Properties: stable/8/usr.sbin/bsnmpd/ (props changed) Modified: stable/8/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c ============================================================================== --- stable/8/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c Mon Apr 8 19:48:40 2013 (r249271) +++ stable/8/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c Mon Apr 8 19:50:15 2013 (r249272) @@ -442,10 +442,9 @@ static void storage_OS_get_fs(void) { struct storage_entry *entry; - uint64_t used_blocks_count = 0; + uint64_t size, used; + int i, mounted_fs_count, units; char fs_string[SE_DESC_MLEN]; - int mounted_fs_count; - int i = 0; if ((mounted_fs_count = getfsstat(NULL, 0, MNT_NOWAIT)) < 0) { syslog(LOG_ERR, "hrStorageTable: getfsstat() failed: %m"); @@ -488,22 +487,17 @@ storage_OS_get_fs(void) entry->flags |= HR_STORAGE_FOUND; entry->type = fs_get_type(&fs_buf[i]); /*XXX - This is wrong*/ - if (fs_buf[i].f_bsize > INT_MAX) - entry->allocationUnits = INT_MAX; - else - entry->allocationUnits = fs_buf[i].f_bsize; - - if (fs_buf[i].f_blocks > INT_MAX) - entry->size = INT_MAX; - else - entry->size = fs_buf[i].f_blocks; - - used_blocks_count = fs_buf[i].f_blocks - fs_buf[i].f_bfree; - - if (used_blocks_count > INT_MAX) - entry->used = INT_MAX; - else - entry->used = used_blocks_count; + units = fs_buf[i].f_bsize; + size = fs_buf[i].f_blocks; + used = fs_buf[i].f_blocks - fs_buf[i].f_bfree; + while (size > INT_MAX) { + units <<= 1; + size >>= 1; + used >>= 1; + } + entry->allocationUnits = units; + entry->size = size; + entry->used = used; entry->allocationFailures = 0; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 20:43:54 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0F5B6A29; Mon, 8 Apr 2013 20:43:54 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DC74BA86; Mon, 8 Apr 2013 20:43:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38KhrfT015820; Mon, 8 Apr 2013 20:43:53 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38Khrfm015819; Mon, 8 Apr 2013 20:43:53 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304082043.r38Khrfm015819@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 8 Apr 2013 20:43:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249282 - stable/9/sys/dev/fb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 20:43:54 -0000 Author: jkim Date: Mon Apr 8 20:43:53 2013 New Revision: 249282 URL: http://svnweb.freebsd.org/changeset/base/249282 Log: MFC: r248799 Limit the amount of video memory we map for the driver to the maximum value. Modified: stable/9/sys/dev/fb/vesa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/fb/vesa.c ============================================================================== --- stable/9/sys/dev/fb/vesa.c Mon Apr 8 20:33:51 2013 (r249281) +++ stable/9/sys/dev/fb/vesa.c Mon Apr 8 20:43:53 2013 (r249282) @@ -89,6 +89,7 @@ static u_char *vesa_palette; static uint32_t vesa_palette_offs; static void *vesa_vmem_buf; +static size_t vesa_vmem_max; static void *vesa_bios; static uint32_t vesa_bios_offs; @@ -927,6 +928,8 @@ vesa_bios_init(void) #endif continue; } + if (bsize > vesa_vmem_max) + vesa_vmem_max = bsize; /* expand the array if necessary */ if (modes >= vesa_vmode_max) { @@ -1297,8 +1300,7 @@ vesa_set_mode(video_adapter_t *adp, int } int10_set_mode(adp->va_initial_bios_mode); if (adp->va_info.vi_flags & V_INFO_LINEAR) - pmap_unmapdev(adp->va_buffer, - vesa_adp_info->v_memsize * 64 * 1024); + pmap_unmapdev(adp->va_buffer, vesa_vmem_max); /* * Once (*prevvidsw->get_info)() succeeded, * (*prevvidsw->set_mode)() below won't fail... @@ -1336,8 +1338,7 @@ vesa_set_mode(video_adapter_t *adp, int adp->va_flags |= V_ADP_DAC8; if (adp->va_info.vi_flags & V_INFO_LINEAR) - pmap_unmapdev(adp->va_buffer, - vesa_adp_info->v_memsize * 64 * 1024); + pmap_unmapdev(adp->va_buffer, vesa_vmem_max); #if VESA_DEBUG > 0 printf("VESA: mode set!\n"); @@ -1372,7 +1373,7 @@ vesa_set_mode(video_adapter_t *adp, int #endif vesa_adp->va_buffer = (vm_offset_t)pmap_mapdev_attr(info.vi_buffer, - vesa_adp_info->v_memsize * 64 * 1024, PAT_WRITE_COMBINING); + vesa_vmem_max, PAT_WRITE_COMBINING); vesa_adp->va_window = vesa_adp->va_buffer; vesa_adp->va_window_size = info.vi_buffer_size / info.vi_planes; vesa_adp->va_window_gran = info.vi_buffer_size / info.vi_planes; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 20:45:12 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 09DDABC0; Mon, 8 Apr 2013 20:45:12 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D63E8A9E; Mon, 8 Apr 2013 20:45:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38KjBdZ016109; Mon, 8 Apr 2013 20:45:11 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38KjBV6016108; Mon, 8 Apr 2013 20:45:11 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304082045.r38KjBV6016108@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 8 Apr 2013 20:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249283 - stable/8/sys/dev/fb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 20:45:12 -0000 Author: jkim Date: Mon Apr 8 20:45:11 2013 New Revision: 249283 URL: http://svnweb.freebsd.org/changeset/base/249283 Log: MFC: r248799 Limit the amount of video memory we map for the driver to the maximum value. Modified: stable/8/sys/dev/fb/vesa.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/fb/vesa.c ============================================================================== --- stable/8/sys/dev/fb/vesa.c Mon Apr 8 20:43:53 2013 (r249282) +++ stable/8/sys/dev/fb/vesa.c Mon Apr 8 20:45:11 2013 (r249283) @@ -73,6 +73,8 @@ struct adp_state { }; typedef struct adp_state adp_state_t; +static size_t vesa_vmem_max; + /* VESA video adapter */ static video_adapter_t *vesa_adp = NULL; static ssize_t vesa_state_buf_size = -1; @@ -914,6 +916,8 @@ vesa_bios_init(void) #endif continue; } + if (bsize > vesa_vmem_max) + vesa_vmem_max = bsize; /* expand the array if necessary */ if (modes >= vesa_vmode_max) { @@ -1250,8 +1254,7 @@ vesa_set_mode(video_adapter_t *adp, int } int10_set_mode(adp->va_initial_bios_mode); if (adp->va_info.vi_flags & V_INFO_LINEAR) - pmap_unmapdev(adp->va_buffer, - vesa_adp_info->v_memsize * 64 * 1024); + pmap_unmapdev(adp->va_buffer, vesa_vmem_max); /* * Once (*prevvidsw->get_info)() succeeded, * (*prevvidsw->set_mode)() below won't fail... @@ -1287,8 +1290,7 @@ vesa_set_mode(video_adapter_t *adp, int adp->va_flags |= V_ADP_DAC8; if (adp->va_info.vi_flags & V_INFO_LINEAR) - pmap_unmapdev(adp->va_buffer, - vesa_adp_info->v_memsize * 64 * 1024); + pmap_unmapdev(adp->va_buffer, vesa_vmem_max); #if VESA_DEBUG > 0 printf("VESA: mode set!\n"); @@ -1323,7 +1325,7 @@ vesa_set_mode(video_adapter_t *adp, int #endif vesa_adp->va_buffer = (vm_offset_t)pmap_mapdev_attr(info.vi_buffer, - vesa_adp_info->v_memsize * 64 * 1024, PAT_WRITE_COMBINING); + vesa_vmem_max, PAT_WRITE_COMBINING); vesa_adp->va_window = vesa_adp->va_buffer; vesa_adp->va_window_size = info.vi_buffer_size / info.vi_planes; vesa_adp->va_window_gran = info.vi_buffer_size / info.vi_planes; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 22:31:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 01B4ECD; Mon, 8 Apr 2013 22:31:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E742DFE8; Mon, 8 Apr 2013 22:31:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38MVZM9048033; Mon, 8 Apr 2013 22:31:35 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38MVZsc048032; Mon, 8 Apr 2013 22:31:35 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304082231.r38MVZsc048032@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 8 Apr 2013 22:31:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249286 - stable/9/sbin/mount_cd9660 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 22:31:36 -0000 Author: jkim Date: Mon Apr 8 22:31:35 2013 New Revision: 249286 URL: http://svnweb.freebsd.org/changeset/base/249286 Log: MFC: r247859 Update the manual page to reflect reality. With r138509 and r152355, "nostrictjoliet" option for mount_cd9660(8) was completely replaced with "brokenjoliet" somehow. Modified: stable/9/sbin/mount_cd9660/mount_cd9660.8 Directory Properties: stable/9/sbin/mount_cd9660/ (props changed) Modified: stable/9/sbin/mount_cd9660/mount_cd9660.8 ============================================================================== --- stable/9/sbin/mount_cd9660/mount_cd9660.8 Mon Apr 8 21:51:30 2013 (r249285) +++ stable/9/sbin/mount_cd9660/mount_cd9660.8 Mon Apr 8 22:31:35 2013 (r249286) @@ -32,7 +32,7 @@ .\" @(#)mount_cd9660.8 8.3 (Berkeley) 3/27/94 .\" $FreeBSD$ .\" -.Dd October 3, 2005 +.Dd March 5, 2013 .Dt MOUNT_CD9660 8 .Os .Sh NAME @@ -80,7 +80,7 @@ See the man page for possible options and their meanings. The following cd9660 specific options are available: .Pp -.Bl -tag -width "nostrictjoliet" -compact +.Bl -tag -width "brokenjoliet" -compact .It Cm extatt Same as .Fl e . @@ -93,7 +93,7 @@ Same as .It Cm norrip Same as .Fl r . -.It Cm nostrictjoliet +.It Cm brokenjoliet Same as .Fl b . .El From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 22:32:38 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3B72924E; Mon, 8 Apr 2013 22:32:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2D127FFA; Mon, 8 Apr 2013 22:32:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38MWcxi048220; Mon, 8 Apr 2013 22:32:38 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38MWcmH048219; Mon, 8 Apr 2013 22:32:38 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304082232.r38MWcmH048219@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 8 Apr 2013 22:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249287 - stable/8/sbin/mount_cd9660 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 22:32:38 -0000 Author: jkim Date: Mon Apr 8 22:32:37 2013 New Revision: 249287 URL: http://svnweb.freebsd.org/changeset/base/249287 Log: MFC: r247859 Update the manual page to reflect reality. With r138509 and r152355, "nostrictjoliet" option for mount_cd9660(8) was completely replaced with "brokenjoliet" somehow. Modified: stable/8/sbin/mount_cd9660/mount_cd9660.8 Directory Properties: stable/8/sbin/mount_cd9660/ (props changed) Modified: stable/8/sbin/mount_cd9660/mount_cd9660.8 ============================================================================== --- stable/8/sbin/mount_cd9660/mount_cd9660.8 Mon Apr 8 22:31:35 2013 (r249286) +++ stable/8/sbin/mount_cd9660/mount_cd9660.8 Mon Apr 8 22:32:37 2013 (r249287) @@ -32,7 +32,7 @@ .\" @(#)mount_cd9660.8 8.3 (Berkeley) 3/27/94 .\" $FreeBSD$ .\" -.Dd October 3, 2005 +.Dd March 5, 2013 .Dt MOUNT_CD9660 8 .Os .Sh NAME @@ -80,7 +80,7 @@ See the man page for possible options and their meanings. The following cd9660 specific options are available: .Pp -.Bl -tag -width "nostrictjoliet" -compact +.Bl -tag -width "brokenjoliet" -compact .It Cm extatt Same as .Fl e . @@ -93,7 +93,7 @@ Same as .It Cm norrip Same as .Fl r . -.It Cm nostrictjoliet +.It Cm brokenjoliet Same as .Fl b . .El From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 22:56:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 760DE76C; Mon, 8 Apr 2013 22:56:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 676A2196; Mon, 8 Apr 2013 22:56:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38Muf2R054588; Mon, 8 Apr 2013 22:56:41 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38MufHv054587; Mon, 8 Apr 2013 22:56:41 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304082256.r38MufHv054587@svn.freebsd.org> From: Xin LI Date: Mon, 8 Apr 2013 22:56:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249288 - in stable: 8/sys/compat/ndis 9/sys/compat/ndis X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 22:56:41 -0000 Author: delphij Date: Mon Apr 8 22:56:40 2013 New Revision: 249288 URL: http://svnweb.freebsd.org/changeset/base/249288 Log: MFC r247595: Fix wrong assignment. Submitted by: Sascha Wildner Obtained from: DragonFly rev 9568dd07a22a136e380e6c19a8ea188eb92976d5 Modified: stable/9/sys/compat/ndis/kern_ndis.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/8/sys/compat/ndis/kern_ndis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/compat/ (props changed) Modified: stable/9/sys/compat/ndis/kern_ndis.c ============================================================================== --- stable/9/sys/compat/ndis/kern_ndis.c Mon Apr 8 22:32:37 2013 (r249287) +++ stable/9/sys/compat/ndis/kern_ndis.c Mon Apr 8 22:56:40 2013 (r249288) @@ -566,7 +566,7 @@ ndis_convert_res(arg) return (ENOMEM); rl->cprl_version = 5; - rl->cprl_version = 1; + rl->cprl_revision = 1; rl->cprl_count = sc->ndis_rescnt; prd = rl->cprl_partial_descs; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 22:56:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C57AC76D; Mon, 8 Apr 2013 22:56:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B7136197; Mon, 8 Apr 2013 22:56:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38MufSv054594; Mon, 8 Apr 2013 22:56:41 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38MufHI054593; Mon, 8 Apr 2013 22:56:41 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304082256.r38MufHI054593@svn.freebsd.org> From: Xin LI Date: Mon, 8 Apr 2013 22:56:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249288 - in stable: 8/sys/compat/ndis 9/sys/compat/ndis X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 22:56:41 -0000 Author: delphij Date: Mon Apr 8 22:56:40 2013 New Revision: 249288 URL: http://svnweb.freebsd.org/changeset/base/249288 Log: MFC r247595: Fix wrong assignment. Submitted by: Sascha Wildner Obtained from: DragonFly rev 9568dd07a22a136e380e6c19a8ea188eb92976d5 Modified: stable/8/sys/compat/ndis/kern_ndis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/compat/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/compat/ndis/kern_ndis.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/8/sys/compat/ndis/kern_ndis.c ============================================================================== --- stable/8/sys/compat/ndis/kern_ndis.c Mon Apr 8 22:32:37 2013 (r249287) +++ stable/8/sys/compat/ndis/kern_ndis.c Mon Apr 8 22:56:40 2013 (r249288) @@ -566,7 +566,7 @@ ndis_convert_res(arg) return (ENOMEM); rl->cprl_version = 5; - rl->cprl_version = 1; + rl->cprl_revision = 1; rl->cprl_count = sc->ndis_rescnt; prd = rl->cprl_partial_descs; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 23:01:33 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B1876AF4; Mon, 8 Apr 2013 23:01:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A35A71E2; Mon, 8 Apr 2013 23:01:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38N1XAd056987; Mon, 8 Apr 2013 23:01:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38N1XWx056986; Mon, 8 Apr 2013 23:01:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304082301.r38N1XWx056986@svn.freebsd.org> From: Xin LI Date: Mon, 8 Apr 2013 23:01:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249289 - in stable: 8/lib/libc/regex 9/lib/libc/regex X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 23:01:33 -0000 Author: delphij Date: Mon Apr 8 23:01:33 2013 New Revision: 249289 URL: http://svnweb.freebsd.org/changeset/base/249289 Log: MFC r247596: Fix assignment of maximum bounadary. Submitted by: Sascha Wildner Obtained from: DragonFly rev fd39c81ba220f7ad6e4dc9b30d45e828cf58a1ad Modified: stable/9/lib/libc/regex/regcomp.c Directory Properties: stable/9/lib/libc/ (props changed) Changes in other areas also in this revision: Modified: stable/8/lib/libc/regex/regcomp.c Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/9/lib/libc/regex/regcomp.c ============================================================================== --- stable/9/lib/libc/regex/regcomp.c Mon Apr 8 22:56:40 2013 (r249288) +++ stable/9/lib/libc/regex/regcomp.c Mon Apr 8 23:01:33 2013 (r249289) @@ -1212,7 +1212,7 @@ CHaddrange(struct parse *p, cset *cs, wi } cs->ranges = newranges; cs->ranges[cs->nranges].min = min; - cs->ranges[cs->nranges].min = max; + cs->ranges[cs->nranges].max = max; cs->nranges++; } From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 23:01:34 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 11E66AF5; Mon, 8 Apr 2013 23:01:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 03B661E3; Mon, 8 Apr 2013 23:01:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38N1XXJ056993; Mon, 8 Apr 2013 23:01:33 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38N1XcB056992; Mon, 8 Apr 2013 23:01:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304082301.r38N1XcB056992@svn.freebsd.org> From: Xin LI Date: Mon, 8 Apr 2013 23:01:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249289 - in stable: 8/lib/libc/regex 9/lib/libc/regex X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 23:01:34 -0000 Author: delphij Date: Mon Apr 8 23:01:33 2013 New Revision: 249289 URL: http://svnweb.freebsd.org/changeset/base/249289 Log: MFC r247596: Fix assignment of maximum bounadary. Submitted by: Sascha Wildner Obtained from: DragonFly rev fd39c81ba220f7ad6e4dc9b30d45e828cf58a1ad Modified: stable/8/lib/libc/regex/regcomp.c Directory Properties: stable/8/lib/libc/ (props changed) Changes in other areas also in this revision: Modified: stable/9/lib/libc/regex/regcomp.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/8/lib/libc/regex/regcomp.c ============================================================================== --- stable/8/lib/libc/regex/regcomp.c Mon Apr 8 22:56:40 2013 (r249288) +++ stable/8/lib/libc/regex/regcomp.c Mon Apr 8 23:01:33 2013 (r249289) @@ -1205,7 +1205,7 @@ CHaddrange(struct parse *p, cset *cs, wi } cs->ranges = newranges; cs->ranges[cs->nranges].min = min; - cs->ranges[cs->nranges].min = max; + cs->ranges[cs->nranges].max = max; cs->nranges++; } From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 23:06:26 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1496CE65; Mon, 8 Apr 2013 23:06:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 05CEB23C; Mon, 8 Apr 2013 23:06:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38N6PVu057711; Mon, 8 Apr 2013 23:06:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38N6P7P057710; Mon, 8 Apr 2013 23:06:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304082306.r38N6P7P057710@svn.freebsd.org> From: Xin LI Date: Mon, 8 Apr 2013 23:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249290 - in stable: 8/sys/dev/mfi 9/sys/dev/mfi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 23:06:26 -0000 Author: delphij Date: Mon Apr 8 23:06:25 2013 New Revision: 249290 URL: http://svnweb.freebsd.org/changeset/base/249290 Log: MFC r248627: Don't attempt to reference sc before testing whether it's NULL. Submitted by: Sascha Wildner Obtained from: DragonFly Modified: stable/9/sys/dev/mfi/mfi_disk.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/8/sys/dev/mfi/mfi_disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/mfi/ (props changed) Modified: stable/9/sys/dev/mfi/mfi_disk.c ============================================================================== --- stable/9/sys/dev/mfi/mfi_disk.c Mon Apr 8 23:01:33 2013 (r249289) +++ stable/9/sys/dev/mfi/mfi_disk.c Mon Apr 8 23:06:25 2013 (r249290) @@ -261,7 +261,6 @@ mfi_disk_strategy(struct bio *bio) struct mfi_softc *controller; sc = bio->bio_disk->d_drv1; - controller = sc->ld_controller; if (sc == NULL) { bio->bio_error = EINVAL; @@ -271,6 +270,7 @@ mfi_disk_strategy(struct bio *bio) return; } + controller = sc->ld_controller; if (controller->adpreset) { bio->bio_error = EBUSY; return; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 8 23:06:26 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D44C2E66; Mon, 8 Apr 2013 23:06:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5B53523D; Mon, 8 Apr 2013 23:06:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r38N6QaI057718; Mon, 8 Apr 2013 23:06:26 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r38N6QOt057717; Mon, 8 Apr 2013 23:06:26 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304082306.r38N6QOt057717@svn.freebsd.org> From: Xin LI Date: Mon, 8 Apr 2013 23:06:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249290 - in stable: 8/sys/dev/mfi 9/sys/dev/mfi X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 23:06:26 -0000 Author: delphij Date: Mon Apr 8 23:06:25 2013 New Revision: 249290 URL: http://svnweb.freebsd.org/changeset/base/249290 Log: MFC r248627: Don't attempt to reference sc before testing whether it's NULL. Submitted by: Sascha Wildner Obtained from: DragonFly Modified: stable/8/sys/dev/mfi/mfi_disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/mfi/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/mfi/mfi_disk.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/8/sys/dev/mfi/mfi_disk.c ============================================================================== --- stable/8/sys/dev/mfi/mfi_disk.c Mon Apr 8 23:01:33 2013 (r249289) +++ stable/8/sys/dev/mfi/mfi_disk.c Mon Apr 8 23:06:25 2013 (r249290) @@ -261,7 +261,6 @@ mfi_disk_strategy(struct bio *bio) struct mfi_softc *controller; sc = bio->bio_disk->d_drv1; - controller = sc->ld_controller; if (sc == NULL) { bio->bio_error = EINVAL; @@ -271,6 +270,7 @@ mfi_disk_strategy(struct bio *bio) return; } + controller = sc->ld_controller; if (controller->adpreset) { bio->bio_error = EBUSY; return; From owner-svn-src-stable@FreeBSD.ORG Tue Apr 9 15:35:28 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 27D9E142; Tue, 9 Apr 2013 15:35:28 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1A22B21C; Tue, 9 Apr 2013 15:35:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r39FZRUR049744; Tue, 9 Apr 2013 15:35:27 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r39FZRgI049739; Tue, 9 Apr 2013 15:35:27 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201304091535.r39FZRgI049739@svn.freebsd.org> From: Steven Hartland Date: Tue, 9 Apr 2013 15:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249310 - in stable/8/sys: kern sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 15:35:28 -0000 Author: smh Date: Tue Apr 9 15:35:26 2013 New Revision: 249310 URL: http://svnweb.freebsd.org/changeset/base/249310 Log: MFC r241556: Add a KPI to allow to reserve some amount of space in the numvnodes counter, without actually allocating the vnodes. For KBI stability, the td_vp_reserv was moved to the end of struct thread. Reviewed by: avg Approved by: avg (co-mentor) Modified: stable/8/sys/kern/kern_thread.c stable/8/sys/kern/subr_trap.c stable/8/sys/kern/vfs_subr.c stable/8/sys/sys/proc.h stable/8/sys/sys/vnode.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/8/sys/kern/kern_thread.c ============================================================================== --- stable/8/sys/kern/kern_thread.c Tue Apr 9 15:15:52 2013 (r249309) +++ stable/8/sys/kern/kern_thread.c Tue Apr 9 15:35:26 2013 (r249310) @@ -159,6 +159,7 @@ thread_init(void *mem, int size, int fla td->td_sleepqueue = sleepq_alloc(); td->td_turnstile = turnstile_alloc(); + td->td_vp_reserv = 0; EVENTHANDLER_INVOKE(thread_init, td); td->td_sched = (struct td_sched *)&td[1]; umtx_thread_init(td); Modified: stable/8/sys/kern/subr_trap.c ============================================================================== --- stable/8/sys/kern/subr_trap.c Tue Apr 9 15:15:52 2013 (r249309) +++ stable/8/sys/kern/subr_trap.c Tue Apr 9 15:35:26 2013 (r249310) @@ -132,6 +132,8 @@ userret(struct thread *td, struct trapfr sched_userret(td); KASSERT(td->td_locks == 0, ("userret: Returning with %d locks held.", td->td_locks)); + KASSERT(td->td_vp_reserv == 0, + ("userret: Returning while holding vnode reservation")); #ifdef VIMAGE /* Unfortunately td_vnet_lpush needs VNET_DEBUG. */ VNET_ASSERT(curvnet == NULL, Modified: stable/8/sys/kern/vfs_subr.c ============================================================================== --- stable/8/sys/kern/vfs_subr.c Tue Apr 9 15:15:52 2013 (r249309) +++ stable/8/sys/kern/vfs_subr.c Tue Apr 9 15:35:26 2013 (r249310) @@ -977,34 +977,22 @@ vtryrecycle(struct vnode *vp) } /* - * Return the next vnode from the free list. + * Wait for available vnodes. */ -int -getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops, - struct vnode **vpp) +static int +getnewvnode_wait(int suspended) { - struct vnode *vp = NULL; - struct bufobj *bo; - CTR3(KTR_VFS, "%s: mp %p with tag %s", __func__, mp, tag); - mtx_lock(&vnode_free_list_mtx); - /* - * Lend our context to reclaim vnodes if they've exceeded the max. - */ - if (freevnodes > wantfreevnodes) - vnlru_free(1); - /* - * Wait for available vnodes. - */ + mtx_assert(&vnode_free_list_mtx, MA_OWNED); if (numvnodes > desiredvnodes) { - if (mp != NULL && (mp->mnt_kern_flag & MNTK_SUSPEND)) { + if (suspended) { /* * File system is beeing suspended, we cannot risk a * deadlock here, so allocate new vnode anyway. */ if (freevnodes > wantfreevnodes) vnlru_free(freevnodes - wantfreevnodes); - goto alloc; + return (0); } if (vnlruproc_sig == 0) { vnlruproc_sig = 1; /* avoid unnecessary wakeups */ @@ -1012,16 +1000,76 @@ getnewvnode(const char *tag, struct moun } msleep(&vnlruproc_sig, &vnode_free_list_mtx, PVFS, "vlruwk", hz); -#if 0 /* XXX Not all VFS_VGET/ffs_vget callers check returns. */ - if (numvnodes > desiredvnodes) { - mtx_unlock(&vnode_free_list_mtx); - return (ENFILE); + } + return (numvnodes > desiredvnodes ? ENFILE : 0); +} + +void +getnewvnode_reserve(u_int count) +{ + struct thread *td; + + td = curthread; + mtx_lock(&vnode_free_list_mtx); + while (count > 0) { + if (getnewvnode_wait(0) == 0) { + count--; + td->td_vp_reserv++; + numvnodes++; } -#endif } -alloc: + mtx_unlock(&vnode_free_list_mtx); +} + +void +getnewvnode_drop_reserve(void) +{ + struct thread *td; + + td = curthread; + mtx_lock(&vnode_free_list_mtx); + KASSERT(numvnodes >= td->td_vp_reserv, ("reserve too large")); + numvnodes -= td->td_vp_reserv; + mtx_unlock(&vnode_free_list_mtx); + td->td_vp_reserv = 0; +} + +/* + * Return the next vnode from the free list. + */ +int +getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops, + struct vnode **vpp) +{ + struct vnode *vp; + struct bufobj *bo; + struct thread *td; + int error; + + CTR3(KTR_VFS, "%s: mp %p with tag %s", __func__, mp, tag); + vp = NULL; + td = curthread; + if (td->td_vp_reserv > 0) { + td->td_vp_reserv -= 1; + goto alloc; + } + mtx_lock(&vnode_free_list_mtx); + /* + * Lend our context to reclaim vnodes if they've exceeded the max. + */ + if (freevnodes > wantfreevnodes) + vnlru_free(1); + error = getnewvnode_wait(mp != NULL && (mp->mnt_kern_flag & + MNTK_SUSPEND)); +#if 0 /* XXX Not all VFS_VGET/ffs_vget callers check returns. */ + if (error != 0) { + mtx_unlock(&vnode_free_list_mtx); + return (error); + } +#endif numvnodes++; mtx_unlock(&vnode_free_list_mtx); +alloc: vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK|M_ZERO); /* * Setup locks. Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Tue Apr 9 15:15:52 2013 (r249309) +++ stable/8/sys/sys/proc.h Tue Apr 9 15:35:26 2013 (r249310) @@ -308,6 +308,7 @@ struct thread { struct rusage_ext td_rux; /* (t) Internal rusage information. */ struct vm_map_entry *td_map_def_user; /* (k) Deferred entries. */ pid_t td_dbg_forked; /* (c) Child pid for debugger. */ + u_int td_vp_reserv; /* (k) Count of reserved vnodes. */ }; struct mtx *thread_lock_block(struct thread *); Modified: stable/8/sys/sys/vnode.h ============================================================================== --- stable/8/sys/sys/vnode.h Tue Apr 9 15:15:52 2013 (r249309) +++ stable/8/sys/sys/vnode.h Tue Apr 9 15:35:26 2013 (r249310) @@ -604,6 +604,8 @@ void cvtstat(struct stat *st, struct ost void cvtnstat(struct stat *sb, struct nstat *nsb); int getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops, struct vnode **vpp); +void getnewvnode_reserve(u_int count); +void getnewvnode_drop_reserve(void); int insmntque1(struct vnode *vp, struct mount *mp, void (*dtr)(struct vnode *, void *), void *dtr_arg); int insmntque(struct vnode *vp, struct mount *mp); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 10 08:49:38 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AD836E27; Wed, 10 Apr 2013 08:49:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9F5B5E30; Wed, 10 Apr 2013 08:49:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3A8nckU054183; Wed, 10 Apr 2013 08:49:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3A8ncOk054180; Wed, 10 Apr 2013 08:49:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304100849.r3A8ncOk054180@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 10 Apr 2013 08:49:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249329 - in stable/9/sys: kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 08:49:38 -0000 Author: kib Date: Wed Apr 10 08:49:37 2013 New Revision: 249329 URL: http://svnweb.freebsd.org/changeset/base/249329 Log: MFC r248792: Add dev_strategy_csw() function. Use it from physio(), to avoid two extra dev_mtx lock and unlock. Do some style cleanup in physio(). Modified: stable/9/sys/kern/kern_physio.c stable/9/sys/kern/vfs_bio.c stable/9/sys/sys/conf.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/kern/kern_physio.c ============================================================================== --- stable/9/sys/kern/kern_physio.c Wed Apr 10 08:48:10 2013 (r249328) +++ stable/9/sys/kern/kern_physio.c Wed Apr 10 08:49:37 2013 (r249329) @@ -34,11 +34,11 @@ __FBSDID("$FreeBSD$"); int physio(struct cdev *dev, struct uio *uio, int ioflag) { - int i; - int error; + struct buf *bp; + struct cdevsw *csw; caddr_t sa; u_int iolen; - struct buf *bp; + int error, i; /* Keep the process UPAGES from being swapped. XXX: why ? */ PHOLD(curproc); @@ -90,14 +90,14 @@ physio(struct cdev *dev, struct uio *uio bp->b_bufsize = bp->b_bcount; bp->b_blkno = btodb(bp->b_offset); - - if (uio->uio_segflg == UIO_USERSPACE) + csw = dev->si_devsw; + if (uio->uio_segflg == UIO_USERSPACE) { if (vmapbuf(bp) < 0) { error = EFAULT; goto doerror; } - - dev_strategy(dev, bp); + } + dev_strategy_csw(dev, csw, bp); if (uio->uio_rw == UIO_READ) bwait(bp, PRIBIO, "physrd"); else Modified: stable/9/sys/kern/vfs_bio.c ============================================================================== --- stable/9/sys/kern/vfs_bio.c Wed Apr 10 08:48:10 2013 (r249328) +++ stable/9/sys/kern/vfs_bio.c Wed Apr 10 08:49:37 2013 (r249329) @@ -3317,11 +3317,34 @@ void dev_strategy(struct cdev *dev, struct buf *bp) { struct cdevsw *csw; - struct bio *bip; int ref; - if ((!bp->b_iocmd) || (bp->b_iocmd & (bp->b_iocmd - 1))) - panic("b_iocmd botch"); + KASSERT(dev->si_refcount > 0, + ("dev_strategy on un-referenced struct cdev *(%s) %p", + devtoname(dev), dev)); + + csw = dev_refthread(dev, &ref); + dev_strategy_csw(dev, csw, bp); + dev_relthread(dev, ref); +} + +void +dev_strategy_csw(struct cdev *dev, struct cdevsw *csw, struct buf *bp) +{ + struct bio *bip; + + KASSERT(bp->b_iocmd == BIO_READ || bp->b_iocmd == BIO_WRITE, + ("b_iocmd botch")); + KASSERT(((dev->si_flags & SI_ETERNAL) != 0 && csw != NULL) || + dev->si_threadcount > 0, + ("dev_strategy_csw threadcount cdev *(%s) %p", devtoname(dev), + dev)); + if (csw == NULL) { + bp->b_error = ENXIO; + bp->b_ioflags = BIO_ERROR; + bufdone(bp); + return; + } for (;;) { bip = g_new_bio(); if (bip != NULL) @@ -3337,19 +3360,7 @@ dev_strategy(struct cdev *dev, struct bu bip->bio_done = bufdonebio; bip->bio_caller2 = bp; bip->bio_dev = dev; - KASSERT(dev->si_refcount > 0, - ("dev_strategy on un-referenced struct cdev *(%s)", - devtoname(dev))); - csw = dev_refthread(dev, &ref); - if (csw == NULL) { - g_destroy_bio(bip); - bp->b_error = ENXIO; - bp->b_ioflags = BIO_ERROR; - bufdone(bp); - return; - } (*csw->d_strategy)(bip); - dev_relthread(dev, ref); } /* Modified: stable/9/sys/sys/conf.h ============================================================================== --- stable/9/sys/sys/conf.h Wed Apr 10 08:48:10 2013 (r249328) +++ stable/9/sys/sys/conf.h Wed Apr 10 08:49:37 2013 (r249329) @@ -258,6 +258,7 @@ void dev_ref(struct cdev *dev); void dev_refl(struct cdev *dev); void dev_rel(struct cdev *dev); void dev_strategy(struct cdev *dev, struct buf *bp); +void dev_strategy_csw(struct cdev *dev, struct cdevsw *csw, struct buf *bp); struct cdev *make_dev(struct cdevsw *_devsw, int _unit, uid_t _uid, gid_t _gid, int _perms, const char *_fmt, ...) __printflike(6, 7); struct cdev *make_dev_cred(struct cdevsw *_devsw, int _unit, From owner-svn-src-stable@FreeBSD.ORG Wed Apr 10 08:59:51 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 325B01CB; Wed, 10 Apr 2013 08:59:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2471FEC0; Wed, 10 Apr 2013 08:59:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3A8xpXp057217; Wed, 10 Apr 2013 08:59:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3A8xpjh057216; Wed, 10 Apr 2013 08:59:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304100859.r3A8xpjh057216@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 10 Apr 2013 08:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249330 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 08:59:51 -0000 Author: kib Date: Wed Apr 10 08:59:50 2013 New Revision: 249330 URL: http://svnweb.freebsd.org/changeset/base/249330 Log: MFC r248794: Fix a race with the vnode reclamation in the aio_qphysio(). Modified: stable/9/sys/kern/vfs_aio.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_aio.c ============================================================================== --- stable/9/sys/kern/vfs_aio.c Wed Apr 10 08:49:37 2013 (r249329) +++ stable/9/sys/kern/vfs_aio.c Wed Apr 10 08:59:50 2013 (r249330) @@ -1254,9 +1254,11 @@ aio_qphysio(struct proc *p, struct aiocb struct file *fp; struct buf *bp; struct vnode *vp; + struct cdevsw *csw; + struct cdev *dev; struct kaioinfo *ki; struct aioliojob *lj; - int error; + int error, ref; cb = &aiocbe->uaiocb; fp = aiocbe->fd_file; @@ -1284,9 +1286,6 @@ aio_qphysio(struct proc *p, struct aiocb if (cb->aio_nbytes % vp->v_bufobj.bo_bsize) return (-1); - if (cb->aio_nbytes > vp->v_rdev->si_iosize_max) - return (-1); - if (cb->aio_nbytes > MAXPHYS - (((vm_offset_t) cb->aio_buf) & PAGE_MASK)) return (-1); @@ -1295,6 +1294,15 @@ aio_qphysio(struct proc *p, struct aiocb if (ki->kaio_buffer_count >= ki->kaio_ballowed_count) return (-1); + ref = 0; + csw = devvn_refthread(vp, &dev, &ref); + if (csw == NULL) + return (ENXIO); + if (cb->aio_nbytes > dev->si_iosize_max) { + error = -1; + goto unref; + } + /* Create and build a buffer header for a transfer. */ bp = (struct buf *)getpbuf(NULL); BUF_KERNPROC(bp); @@ -1347,7 +1355,8 @@ aio_qphysio(struct proc *p, struct aiocb TASK_INIT(&aiocbe->biotask, 0, biohelper, aiocbe); /* Perform transfer. */ - dev_strategy(vp->v_rdev, bp); + dev_strategy_csw(dev, csw, bp); + dev_relthread(dev, ref); return (0); doerror: @@ -1359,6 +1368,8 @@ doerror: aiocbe->bp = NULL; AIO_UNLOCK(ki); relpbuf(bp, NULL); +unref: + dev_relthread(dev, ref); return (error); } From owner-svn-src-stable@FreeBSD.ORG Wed Apr 10 10:22:46 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 94136F45; Wed, 10 Apr 2013 10:22:46 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 863F62D9; Wed, 10 Apr 2013 10:22:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AAMkXG082765; Wed, 10 Apr 2013 10:22:46 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AAMkg1082764; Wed, 10 Apr 2013 10:22:46 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201304101022.r3AAMkg1082764@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 10 Apr 2013 10:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r249331 - stable/7/gnu/usr.bin/groff/tmac X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 10:22:46 -0000 Author: pluknet Date: Wed Apr 10 10:22:45 2013 New Revision: 249331 URL: http://svnweb.freebsd.org/changeset/base/249331 Log: MFC r222854: Added FreeBSD 8.3. Several manual pages reference it in stable/7. Modified: stable/7/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/7/gnu/usr.bin/groff/ (props changed) Modified: stable/7/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/7/gnu/usr.bin/groff/tmac/mdoc.local Wed Apr 10 08:59:50 2013 (r249330) +++ stable/7/gnu/usr.bin/groff/tmac/mdoc.local Wed Apr 10 10:22:45 2013 (r249331) @@ -69,6 +69,7 @@ .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-7.4 7.4 .ds doc-operating-system-FreeBSD-8.2 8.2 +.ds doc-operating-system-FreeBSD-8.3 8.3 .ds doc-operating-system-FreeBSD-9.0 9.0 . .ec From owner-svn-src-stable@FreeBSD.ORG Wed Apr 10 17:49:26 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 763D7CF0; Wed, 10 Apr 2013 17:49:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 67C84DED; Wed, 10 Apr 2013 17:49:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AHnQdb015133; Wed, 10 Apr 2013 17:49:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AHnQjs015131; Wed, 10 Apr 2013 17:49:26 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304101749.r3AHnQjs015131@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Apr 2013 17:49:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249337 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 17:49:26 -0000 Author: mav Date: Wed Apr 10 17:49:25 2013 New Revision: 249337 URL: http://svnweb.freebsd.org/changeset/base/249337 Log: MFC r248800: On SIM destruction free associated CCBs, preallocated inside xpt_get_ccb(). Before this change they were just leaked. Fortunately USB sticks now use only one CCB, and so leak was only 2KB per detach, while other bigger SIMs with much more allocated CCBs are rarely detached. Modified: stable/9/sys/cam/cam_sim.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_sim.c ============================================================================== --- stable/9/sys/cam/cam_sim.c Wed Apr 10 17:43:20 2013 (r249336) +++ stable/9/sys/cam/cam_sim.c Wed Apr 10 17:49:25 2013 (r249337) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define CAM_PATH_ANY (u_int32_t)-1 @@ -105,6 +106,7 @@ cam_sim_alloc(sim_action_func sim_action void cam_sim_free(struct cam_sim *sim, int free_devq) { + union ccb *ccb; int error; sim->refcount--; @@ -115,6 +117,10 @@ cam_sim_free(struct cam_sim *sim, int fr KASSERT(sim->refcount == 0, ("sim->refcount == 0")); + while ((ccb = (union ccb *)SLIST_FIRST(&sim->ccb_freeq)) != NULL) { + SLIST_REMOVE_HEAD(&sim->ccb_freeq, xpt_links.sle); + xpt_free_ccb(ccb); + } if (free_devq) cam_simq_free(sim->devq); free(sim, M_CAMSIM); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 10 17:51:15 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 98AC8FB0; Wed, 10 Apr 2013 17:51:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8B62DE3F; Wed, 10 Apr 2013 17:51:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AHpFH7017042; Wed, 10 Apr 2013 17:51:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AHpFVg017041; Wed, 10 Apr 2013 17:51:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304101751.r3AHpFVg017041@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Apr 2013 17:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249338 - stable/8/sys/cam X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 17:51:15 -0000 Author: mav Date: Wed Apr 10 17:51:15 2013 New Revision: 249338 URL: http://svnweb.freebsd.org/changeset/base/249338 Log: MFC r248800: On SIM destruction free associated CCBs, preallocated inside xpt_get_ccb(). Before this change they were just leaked. Fortunately USB sticks now use only one CCB, and so leak was only 2KB per detach, while other bigger SIMs with much more allocated CCBs are rarely detached. Modified: stable/8/sys/cam/cam_sim.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cam/ (props changed) Modified: stable/8/sys/cam/cam_sim.c ============================================================================== --- stable/8/sys/cam/cam_sim.c Wed Apr 10 17:49:25 2013 (r249337) +++ stable/8/sys/cam/cam_sim.c Wed Apr 10 17:51:15 2013 (r249338) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define CAM_PATH_ANY (u_int32_t)-1 @@ -105,6 +106,7 @@ cam_sim_alloc(sim_action_func sim_action void cam_sim_free(struct cam_sim *sim, int free_devq) { + union ccb *ccb; int error; sim->refcount--; @@ -115,6 +117,10 @@ cam_sim_free(struct cam_sim *sim, int fr KASSERT(sim->refcount == 0, ("sim->refcount == 0")); + while ((ccb = (union ccb *)SLIST_FIRST(&sim->ccb_freeq)) != NULL) { + SLIST_REMOVE_HEAD(&sim->ccb_freeq, xpt_links.sle); + xpt_free_ccb(ccb); + } if (free_devq) cam_simq_free(sim->devq); free(sim, M_CAMSIM); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 10 18:07:26 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D79C6760; Wed, 10 Apr 2013 18:07:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CA9FFF07; Wed, 10 Apr 2013 18:07:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AI7QKk021398; Wed, 10 Apr 2013 18:07:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AI7QqB021394; Wed, 10 Apr 2013 18:07:26 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304101807.r3AI7QqB021394@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Apr 2013 18:07:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249340 - stable/9/sys/dev/ata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 18:07:26 -0000 Author: mav Date: Wed Apr 10 18:07:25 2013 New Revision: 249340 URL: http://svnweb.freebsd.org/changeset/base/249340 Log: MFC r249052: Add some more ATA_CAM ifdefs. Modified: stable/9/sys/dev/ata/ata-all.c stable/9/sys/dev/ata/ata-all.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ata/ata-all.c ============================================================================== --- stable/9/sys/dev/ata/ata-all.c Wed Apr 10 17:51:39 2013 (r249339) +++ stable/9/sys/dev/ata/ata-all.c Wed Apr 10 18:07:25 2013 (r249340) @@ -166,9 +166,11 @@ ata_attach(device_t dev) ch->state = ATA_IDLE; bzero(&ch->state_mtx, sizeof(struct mtx)); mtx_init(&ch->state_mtx, "ATA state lock", NULL, MTX_DEF); +#ifndef ATA_CAM bzero(&ch->queue_mtx, sizeof(struct mtx)); mtx_init(&ch->queue_mtx, "ATA queue lock", NULL, MTX_DEF); TAILQ_INIT(&ch->ata_queue); +#endif TASK_INIT(&ch->conntask, 0, ata_conn_event, dev); #ifdef ATA_CAM for (i = 0; i < 16; i++) { @@ -340,7 +342,9 @@ ata_detach(device_t dev) ch->dma.free(dev); mtx_destroy(&ch->state_mtx); +#ifndef ATA_CAM mtx_destroy(&ch->queue_mtx); +#endif return 0; } @@ -1107,6 +1111,7 @@ ata_default_registers(device_t dev) ch->r_io[ATA_ALTSTAT].offset = ch->r_io[ATA_CONTROL].offset; } +#ifndef ATA_CAM void ata_modify_if_48bit(struct ata_request *request) { @@ -1208,6 +1213,7 @@ ata_modify_if_48bit(struct ata_request * request->flags |= ATA_R_48BIT; } } +#endif void ata_udelay(int interval) @@ -1453,7 +1459,7 @@ bpack(int8_t *src, int8_t *dst, int len) #endif #ifdef ATA_CAM -void +static void ata_cam_begin_transaction(device_t dev, union ccb *ccb) { struct ata_channel *ch = device_get_softc(dev); Modified: stable/9/sys/dev/ata/ata-all.h ============================================================================== --- stable/9/sys/dev/ata/ata-all.h Wed Apr 10 17:51:39 2013 (r249339) +++ stable/9/sys/dev/ata/ata-all.h Wed Apr 10 18:07:25 2013 (r249340) @@ -579,9 +579,11 @@ struct ata_channel { #define ATA_ACTIVE 0x0001 #define ATA_STALL_QUEUE 0x0002 +#ifndef ATA_CAM struct mtx queue_mtx; /* queue lock */ TAILQ_HEAD(, ata_request) ata_queue; /* head of ATA queue */ struct ata_request *freezepoint; /* composite freezepoint */ +#endif struct ata_request *running; /* currently running request */ struct task conntask; /* PHY events handling task */ #ifdef ATA_CAM @@ -620,24 +622,24 @@ int ata_resume(device_t dev); void ata_interrupt(void *data); int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data); int ata_getparam(struct ata_device *atadev, int init); -int ata_identify(device_t dev); void ata_default_registers(device_t dev); -void ata_modify_if_48bit(struct ata_request *request); void ata_udelay(int interval); const char *ata_unit2str(struct ata_device *atadev); const char *ata_mode2str(int mode); +void ata_setmode(device_t dev); +void ata_print_cable(device_t dev, u_int8_t *who); int ata_str2mode(const char *str); const char *ata_satarev2str(int rev); int ata_atapi(device_t dev, int target); +#ifndef ATA_CAM +int ata_identify(device_t dev); +void ata_modify_if_48bit(struct ata_request *request); int ata_pmode(struct ata_params *ap); int ata_wmode(struct ata_params *ap); int ata_umode(struct ata_params *ap); int ata_limit_mode(device_t dev, int mode, int maxmode); -void ata_setmode(device_t dev); -void ata_print_cable(device_t dev, u_int8_t *who); int ata_check_80pin(device_t dev, int mode); -#ifdef ATA_CAM -void ata_cam_begin_transaction(device_t dev, union ccb *ccb); +#else void ata_cam_end_transaction(device_t dev, struct ata_request *request); #endif From owner-svn-src-stable@FreeBSD.ORG Wed Apr 10 18:13:34 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 47DFAA6D; Wed, 10 Apr 2013 18:13:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 38DC1F5C; Wed, 10 Apr 2013 18:13:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3AIDYdE024097; Wed, 10 Apr 2013 18:13:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3AIDXtW024095; Wed, 10 Apr 2013 18:13:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304101813.r3AIDXtW024095@svn.freebsd.org> From: Alexander Motin Date: Wed, 10 Apr 2013 18:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249341 - in stable/9/sys/dev/ata: . chipsets X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 18:13:34 -0000 Author: mav Date: Wed Apr 10 18:13:33 2013 New Revision: 249341 URL: http://svnweb.freebsd.org/changeset/base/249341 Log: MFC r249062: Since ATA_CAM mode has no implemented support for serializing access to the different ATA channels, required for acard and pc98 ATA controllers, block access to second channels of both, hoping that one working channel is better then none. I have an idea how that support could be implemented, but I have no hardware to work on that. Modified: stable/9/sys/dev/ata/ata-cbus.c stable/9/sys/dev/ata/chipsets/ata-acard.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ata/ata-cbus.c ============================================================================== --- stable/9/sys/dev/ata/ata-cbus.c Wed Apr 10 18:07:25 2013 (r249340) +++ stable/9/sys/dev/ata/ata-cbus.c Wed Apr 10 18:13:33 2013 (r249341) @@ -53,10 +53,13 @@ struct ata_cbus_controller { struct resource *bankio; struct resource *irq; void *ih; +#ifndef ATA_CAM struct mtx bank_mtx; int locked_bank; int restart_bank; int hardware_bank; +#endif + int channels; struct { void (*function)(void *); void *argument; @@ -65,7 +68,9 @@ struct ata_cbus_controller { /* local prototypes */ static void ata_cbus_intr(void *); +#ifndef ATA_CAM static int ata_cbuschannel_banking(device_t dev, int flags); +#endif static int ata_cbus_probe(device_t dev) @@ -155,12 +160,19 @@ ata_cbus_attach(device_t dev) return ENXIO; } +#ifndef ATA_CAM + ctlr->channels = 2; mtx_init(&ctlr->bank_mtx, "ATA cbus bank lock", NULL, MTX_DEF); ctlr->hardware_bank = -1; ctlr->locked_bank = -1; ctlr->restart_bank = -1; +#else + /* Work around the lack of channel serialization in ATA_CAM. */ + ctlr->channels = 1; + device_printf(dev, "second channel ignored\n"); +#endif - for (unit = 0; unit < 2; unit++) { + for (unit = 0; unit < ctlr->channels; unit++) { child = device_add_child(dev, "ata", unit); if (child == NULL) device_printf(dev, "failed to add ata child device\n"); @@ -229,10 +241,12 @@ ata_cbus_intr(void *data) struct ata_channel *ch; int unit; - for (unit = 0; unit < 2; unit++) { + for (unit = 0; unit < ctlr->channels; unit++) { if (!(ch = ctlr->interrupt[unit].argument)) continue; +#ifndef ATA_CAM if (ata_cbuschannel_banking(ch->dev, ATA_LF_WHICH) == unit) +#endif ctlr->interrupt[unit].function(ch); } } @@ -335,18 +349,16 @@ ata_cbuschannel_resume(device_t dev) return ata_resume(dev); } +#ifndef ATA_CAM static int ata_cbuschannel_banking(device_t dev, int flags) { struct ata_cbus_controller *ctlr = device_get_softc(device_get_parent(dev)); -#ifndef ATA_CAM struct ata_channel *ch = device_get_softc(dev); -#endif int res; mtx_lock(&ctlr->bank_mtx); switch (flags) { -#ifndef ATA_CAM case ATA_LF_LOCK: if (ctlr->locked_bank == -1) ctlr->locked_bank = ch->unit; @@ -371,7 +383,6 @@ ata_cbuschannel_banking(device_t dev, in } } break; -#endif case ATA_LF_WHICH: break; @@ -380,6 +391,7 @@ ata_cbuschannel_banking(device_t dev, in mtx_unlock(&ctlr->bank_mtx); return res; } +#endif static device_method_t ata_cbuschannel_methods[] = { /* device interface */ Modified: stable/9/sys/dev/ata/chipsets/ata-acard.c ============================================================================== --- stable/9/sys/dev/ata/chipsets/ata-acard.c Wed Apr 10 18:07:25 2013 (r249340) +++ stable/9/sys/dev/ata/chipsets/ata-acard.c Wed Apr 10 18:13:33 2013 (r249341) @@ -124,6 +124,10 @@ ata_acard_chipinit(device_t dev) M_ATAPCI, M_WAITOK | M_ZERO); ata_serialize_init(serial); ctlr->chipset_data = serial; +#else + /* Work around the lack of channel serialization in ATA_CAM. */ + ctlr->channels = 1; + device_printf(dev, "second channel ignored\n"); #endif } else From owner-svn-src-stable@FreeBSD.ORG Thu Apr 11 18:47:16 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EEED883F; Thu, 11 Apr 2013 18:47:16 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E1AE912BE; Thu, 11 Apr 2013 18:47:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BIlGnq071907; Thu, 11 Apr 2013 18:47:16 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BIlGBE071906; Thu, 11 Apr 2013 18:47:16 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201304111847.r3BIlGBE071906@svn.freebsd.org> From: Andreas Tobler Date: Thu, 11 Apr 2013 18:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249374 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 18:47:17 -0000 Author: andreast Date: Thu Apr 11 18:47:16 2013 New Revision: 249374 URL: http://svnweb.freebsd.org/changeset/base/249374 Log: MFC r239046: Fix typo. PR: kern/177495 Modified: stable/9/sys/sys/bus.h Modified: stable/9/sys/sys/bus.h ============================================================================== --- stable/9/sys/sys/bus.h Thu Apr 11 18:46:41 2013 (r249373) +++ stable/9/sys/sys/bus.h Thu Apr 11 18:47:16 2013 (r249374) @@ -538,7 +538,7 @@ void bus_data_generation_update(void); * is for drivers that wish to have a generic form and a specialized form, * like is done with the pci bus and the acpi pci bus. BUS_PROBE_HOOVER is * for those busses that implement a generic device place-holder for devices on - * the bus that have no more specific river for them (aka ugen). + * the bus that have no more specific driver for them (aka ugen). * BUS_PROBE_NOWILDCARD or lower means that the device isn't really bidding * for a device node, but accepts only devices that its parent has told it * use this driver. From owner-svn-src-stable@FreeBSD.ORG Thu Apr 11 20:12:29 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5F2B145B; Thu, 11 Apr 2013 20:12:29 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 518471782; Thu, 11 Apr 2013 20:12:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BKCTXp099226; Thu, 11 Apr 2013 20:12:29 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BKCTN3099225; Thu, 11 Apr 2013 20:12:29 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201304112012.r3BKCTN3099225@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 11 Apr 2013 20:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249380 - stable/9/share/man/man9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 20:12:29 -0000 Author: trociny Date: Thu Apr 11 20:12:28 2013 New Revision: 249380 URL: http://svnweb.freebsd.org/changeset/base/249380 Log: MFC r249241: Fix synopsis for sbuf_len. Modified: stable/9/share/man/man9/sbuf.9 Directory Properties: stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/sbuf.9 ============================================================================== --- stable/9/share/man/man9/sbuf.9 Thu Apr 11 19:51:53 2013 (r249379) +++ stable/9/share/man/man9/sbuf.9 Thu Apr 11 20:12:28 2013 (r249380) @@ -94,7 +94,7 @@ .Fn sbuf_finish "struct sbuf *s" .Ft char * .Fn sbuf_data "struct sbuf *s" -.Ft int +.Ft ssize_t .Fn sbuf_len "struct sbuf *s" .Ft int .Fn sbuf_done "struct sbuf *s" From owner-svn-src-stable@FreeBSD.ORG Thu Apr 11 22:04:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B0DDCFDE; Thu, 11 Apr 2013 22:04:19 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A32821E24; Thu, 11 Apr 2013 22:04:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BM4J7k032866; Thu, 11 Apr 2013 22:04:19 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BM4JQG032864; Thu, 11 Apr 2013 22:04:19 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201304112204.r3BM4JQG032864@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 11 Apr 2013 22:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249387 - stable/9/etc/rc.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 22:04:19 -0000 Author: bz Date: Thu Apr 11 22:04:19 2013 New Revision: 249387 URL: http://svnweb.freebsd.org/changeset/base/249387 Log: MFC r245525: Add a conditional sleep 1 in case we add any IPv6 addresses to interfaces. Do this per jail started, not per address. This will allow DAD to complete and services to properly start. Before we have seen problems with services trying to start before the IPv6 address was available to use and thus erroring and failing to start. Modified: stable/9/etc/rc.d/jail Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/rc.d/jail ============================================================================== --- stable/9/etc/rc.d/jail Thu Apr 11 22:02:35 2013 (r249386) +++ stable/9/etc/rc.d/jail Thu Apr 11 22:04:19 2013 (r249387) @@ -509,7 +509,7 @@ jail_handle_ips_option() esac case "${_type}" in inet) ;; - inet6) ;; + inet6) ipv6_address_count=$((ipv6_address_count + 1)) ;; *) warn "Could not determine address family. Not going" \ "to ${_action} address '${_addr}' for ${_jail}." continue @@ -546,6 +546,7 @@ jail_ips() esac # Handle addresses. + ipv6_address_count=0 jail_handle_ips_option ${_action} "${_ip}" # Handle jail_xxx_ip_multi alias=0 @@ -558,6 +559,12 @@ jail_ips() ;; esac done + case ${ipv6_address_count} in + 0) ;; + *) # Sleep 1 second to let DAD complete before starting services. + sleep 1 + ;; + esac } jail_prestart() From owner-svn-src-stable@FreeBSD.ORG Thu Apr 11 22:09:00 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5725128A; Thu, 11 Apr 2013 22:09:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 498D61E69; Thu, 11 Apr 2013 22:09:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3BM90RQ033764; Thu, 11 Apr 2013 22:09:00 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3BM90qo033763; Thu, 11 Apr 2013 22:09:00 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201304112209.r3BM90qo033763@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 11 Apr 2013 22:09:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249388 - stable/8/etc/rc.d X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2013 22:09:00 -0000 Author: bz Date: Thu Apr 11 22:08:59 2013 New Revision: 249388 URL: http://svnweb.freebsd.org/changeset/base/249388 Log: MFC r245525: Add a conditional sleep 1 in case we add any IPv6 addresses to interfaces. Do this per jail started, not per address. This will allow DAD to complete and services to properly start. Before we have seen problems with services trying to start before the IPv6 address was available to use and thus erroring and failing to start. Modified: stable/8/etc/rc.d/jail Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.d/jail ============================================================================== --- stable/8/etc/rc.d/jail Thu Apr 11 22:04:19 2013 (r249387) +++ stable/8/etc/rc.d/jail Thu Apr 11 22:08:59 2013 (r249388) @@ -507,7 +507,7 @@ jail_handle_ips_option() esac case "${_type}" in inet) ;; - inet6) ;; + inet6) ipv6_address_count=$((ipv6_address_count + 1)) ;; *) warn "Could not determine address family. Not going" \ "to ${_action} address '${_addr}' for ${_jail}." continue @@ -544,6 +544,7 @@ jail_ips() esac # Handle addresses. + ipv6_address_count=0 jail_handle_ips_option ${_action} "${_ip}" # Handle jail_xxx_ip_multi alias=0 @@ -556,6 +557,12 @@ jail_ips() ;; esac done + case ${ipv6_address_count} in + 0) ;; + *) # Sleep 1 second to let DAD complete before starting services. + sleep 1 + ;; + esac } jail_start() From owner-svn-src-stable@FreeBSD.ORG Fri Apr 12 11:37:25 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 208AC6D3; Fri, 12 Apr 2013 11:37:25 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EBB16103; Fri, 12 Apr 2013 11:37:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CBbOQ1080339; Fri, 12 Apr 2013 11:37:24 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CBbOKf080338; Fri, 12 Apr 2013 11:37:24 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304121137.r3CBbOKf080338@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 12 Apr 2013 11:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249401 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 11:37:25 -0000 Author: jilles Date: Fri Apr 12 11:37:24 2013 New Revision: 249401 URL: http://svnweb.freebsd.org/changeset/base/249401 Log: MFC r232385 by ru: Remove 3 syscalls from opendir(). Finally removed the stat() and fstat() calls from the opendir() code. They were made excessive in r205424 by opening with O_DIRECTORY. Also eliminated the fcntl() call used to set FD_CLOEXEC by opening with O_CLOEXEC. (fdopendir() still checks that the passed descriptor is a directory, and sets FD_CLOEXEC on it.) The necessary kernel support for O_DIRECTORY and O_CLOEXEC was already in 9.0-RELEASE. Discussed with: ru Modified: stable/9/lib/libc/gen/opendir.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/opendir.c ============================================================================== --- stable/9/lib/libc/gen/opendir.c Fri Apr 12 08:52:19 2013 (r249400) +++ stable/9/lib/libc/gen/opendir.c Fri Apr 12 11:37:24 2013 (r249401) @@ -66,7 +66,17 @@ opendir(const char *name) DIR * fdopendir(int fd) { + struct stat statb; + /* Check that fd is associated with a directory. */ + if (_fstat(fd, &statb) != 0) + return (NULL); + if (!S_ISDIR(statb.st_mode)) { + errno = ENOTDIR; + return (NULL); + } + if (_fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) + return (NULL); return (__opendir_common(fd, NULL, DTF_HIDEW|DTF_NODUP)); } @@ -74,19 +84,9 @@ DIR * __opendir2(const char *name, int flags) { int fd; - struct stat statb; - /* - * stat() before _open() because opening of special files may be - * harmful. - */ - if (stat(name, &statb) != 0) - return (NULL); - if (!S_ISDIR(statb.st_mode)) { - errno = ENOTDIR; - return (NULL); - } - if ((fd = _open(name, O_RDONLY | O_NONBLOCK | O_DIRECTORY)) == -1) + if ((fd = _open(name, + O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC)) == -1) return (NULL); return __opendir_common(fd, name, flags); @@ -110,19 +110,9 @@ __opendir_common(int fd, const char *nam int incr; int saved_errno; int unionstack; - struct stat statb; - dirp = NULL; - /* _fstat() the open handler because the file may have changed. */ - if (_fstat(fd, &statb) != 0) - goto fail; - if (!S_ISDIR(statb.st_mode)) { - errno = ENOTDIR; - goto fail; - } - if (_fcntl(fd, F_SETFD, FD_CLOEXEC) == -1 || - (dirp = malloc(sizeof(DIR) + sizeof(struct _telldir))) == NULL) - goto fail; + if ((dirp = malloc(sizeof(DIR) + sizeof(struct _telldir))) == NULL) + return (NULL); dirp->dd_td = (struct _telldir *)((char *)dirp + sizeof(DIR)); LIST_INIT(&dirp->dd_td->td_locq); From owner-svn-src-stable@FreeBSD.ORG Fri Apr 12 13:04:24 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 323B8801; Fri, 12 Apr 2013 13:04:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 23D086AE; Fri, 12 Apr 2013 13:04:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CD4NQm007166; Fri, 12 Apr 2013 13:04:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CD4NP1007165; Fri, 12 Apr 2013 13:04:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304121304.r3CD4NP1007165@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 12 Apr 2013 13:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249402 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 13:04:24 -0000 Author: kib Date: Fri Apr 12 13:04:23 2013 New Revision: 249402 URL: http://svnweb.freebsd.org/changeset/base/249402 Log: MFC r249163: If filter of the interrupt event is not null, print it, in addition to the handler address. Add a mark to distinguish between filter and handler. Modified: stable/9/sys/kern/kern_intr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_intr.c ============================================================================== --- stable/9/sys/kern/kern_intr.c Fri Apr 12 11:37:24 2013 (r249401) +++ stable/9/sys/kern/kern_intr.c Fri Apr 12 13:04:23 2013 (r249402) @@ -1748,7 +1748,16 @@ db_dump_intrhand(struct intr_handler *ih break; } db_printf(" "); - db_printsym((uintptr_t)ih->ih_handler, DB_STGY_PROC); + if (ih->ih_filter != NULL) { + db_printf("[F]"); + db_printsym((uintptr_t)ih->ih_filter, DB_STGY_PROC); + } + if (ih->ih_handler != NULL) { + if (ih->ih_filter != NULL) + db_printf(","); + db_printf("[H]"); + db_printsym((uintptr_t)ih->ih_handler, DB_STGY_PROC); + } db_printf("(%p)", ih->ih_argument); if (ih->ih_need || (ih->ih_flags & (IH_EXCLUSIVE | IH_ENTROPY | IH_DEAD | From owner-svn-src-stable@FreeBSD.ORG Fri Apr 12 14:23:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C6B45DF8; Fri, 12 Apr 2013 14:23:21 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9E004A59; Fri, 12 Apr 2013 14:23:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CENLZL031636; Fri, 12 Apr 2013 14:23:21 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CENLsr031635; Fri, 12 Apr 2013 14:23:21 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201304121423.r3CENLsr031635@svn.freebsd.org> From: Steven Hartland Date: Fri, 12 Apr 2013 14:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249405 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 14:23:21 -0000 Author: smh Date: Fri Apr 12 14:23:21 2013 New Revision: 249405 URL: http://svnweb.freebsd.org/changeset/base/249405 Log: MFC r241628: zfs: make use of getnewvnode_reserve in zfs_mknode and zfs_zget Reviewed by: avg Approved by: avg (co-mentor) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Apr 12 14:19:44 2013 (r249404) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Apr 12 14:23:21 2013 (r249405) @@ -855,6 +855,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, d } } + getnewvnode_reserve(1); ZFS_OBJ_HOLD_ENTER(zfsvfs, obj); VERIFY(0 == sa_buf_hold(zfsvfs->z_os, obj, NULL, &db)); @@ -1041,6 +1042,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, d KASSERT(err == 0, ("insmntque() failed: error %d", err)); } ZFS_OBJ_HOLD_EXIT(zfsvfs, obj); + getnewvnode_drop_reserve(); } /* @@ -1151,12 +1153,14 @@ zfs_zget(zfsvfs_t *zfsvfs, uint64_t obj_ *zpp = NULL; + getnewvnode_reserve(1); again: ZFS_OBJ_HOLD_ENTER(zfsvfs, obj_num); err = sa_buf_hold(zfsvfs->z_os, obj_num, NULL, &db); if (err) { ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); + getnewvnode_drop_reserve(); return (err); } @@ -1167,6 +1171,7 @@ again: doi.doi_bonus_size < sizeof (znode_phys_t)))) { sa_buf_rele(db, NULL); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); + getnewvnode_drop_reserve(); return (EINVAL); } @@ -1230,6 +1235,7 @@ again: sa_buf_rele(db, NULL); mutex_exit(&zp->z_lock); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); + getnewvnode_drop_reserve(); return (err); } @@ -1265,6 +1271,7 @@ again: } } ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); + getnewvnode_drop_reserve(); return (err); } From owner-svn-src-stable@FreeBSD.ORG Fri Apr 12 14:32:29 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 360B863A; Fri, 12 Apr 2013 14:32:29 +0000 (UTC) Date: Fri, 12 Apr 2013 14:32:29 +0000 From: Alexey Dokuchaev To: Alexander Motin Subject: Re: svn commit: r236750 - in stable/8: share/man/man4 sys/conf sys/dev/sound/pci/hda sys/modules/sound/driver/hda Message-ID: <20130412143229.GA13594@FreeBSD.org> References: <201206081235.q58CZiiK059149@svn.freebsd.org> <20130321162521.GA82532@FreeBSD.org> <20130401085049.GA84064@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20130401085049.GA84064@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 14:32:29 -0000 On Mon, Apr 01, 2013 at 08:50:49AM +0000, Alexey Dokuchaev wrote: > On Thu, Mar 21, 2013 at 04:25:21PM +0000, Alexey Dokuchaev wrote: > > On Fri, Jun 08, 2012 at 12:35:44PM +0000, Alexander Motin wrote: > > > New Revision: 236750 > > > URL: http://svn.freebsd.org/changeset/base/236750 > > > > > > Log: > > > MFC r230130: > > > Major snd_hda driver rewrite: > > > - Huge old hdac driver was split into three independent pieces: HDA > > > controller driver (hdac), HDA CODEC driver (hdacc) and HDA sudio > > > function driver (hdaa). [...] > > > > Unfortunately, this commit apparently had broken the sound for me on my > > laptop. [...] > > While trying to debug this problem, I've noticed that though I can recompile > snd_hda(4), I cannot load it: > > # kldload ./snd_hda.ko > kldload: can't load ./snd_hda.ko: No such file or directory > > The message is clearly bogus, but in /var/log/messages I see this line: > > link_elf: symbol snd_verbose undefined Please ignore this: it's the fault of ld(1) from binutils-2.23.1 I happened to have in my $PATH before system ld(1), not yours; sorry. The question about nid overrides still remains unanswered, though. Anything I can do to expedite the investigation? ./danfe From owner-svn-src-stable@FreeBSD.ORG Fri Apr 12 17:15:47 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BEF0F327; Fri, 12 Apr 2013 17:15:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B162D1315; Fri, 12 Apr 2013 17:15:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CHFlA2083808; Fri, 12 Apr 2013 17:15:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CHFlTw083807; Fri, 12 Apr 2013 17:15:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304121715.r3CHFlTw083807@svn.freebsd.org> From: Alexander Motin Date: Fri, 12 Apr 2013 17:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249414 - stable/9/sys/geom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 17:15:47 -0000 Author: mav Date: Fri Apr 12 17:15:47 2013 New Revision: 249414 URL: http://svnweb.freebsd.org/changeset/base/249414 Log: MFC r249161: Following r241022, replace iteration over the provider list on media events by taking first one and asserting that there is no others. Modified: stable/9/sys/geom/geom_disk.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Fri Apr 12 17:01:07 2013 (r249413) +++ stable/9/sys/geom/geom_disk.c Fri Apr 12 17:15:47 2013 (r249414) @@ -657,8 +657,12 @@ disk_media_changed(struct disk *dp, int gp = dp->d_geom; if (gp != NULL) { - LIST_FOREACH(pp, &gp->provider, provider) + pp = LIST_FIRST(&gp->provider); + if (pp != NULL) { + KASSERT(LIST_NEXT(pp, provider) == NULL, + ("geom %p has more than one provider", gp)); g_media_changed(pp, flag); + } } } @@ -670,8 +674,12 @@ disk_media_gone(struct disk *dp, int fla gp = dp->d_geom; if (gp != NULL) { - LIST_FOREACH(pp, &gp->provider, provider) + pp = LIST_FIRST(&gp->provider); + if (pp != NULL) { + KASSERT(LIST_NEXT(pp, provider) == NULL, + ("geom %p has more than one provider", gp)); g_media_gone(pp, flag); + } } } From owner-svn-src-stable@FreeBSD.ORG Fri Apr 12 19:36:55 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 85C53D61; Fri, 12 Apr 2013 19:36:55 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6860B191E; Fri, 12 Apr 2013 19:36:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3CJasI4026562; Fri, 12 Apr 2013 19:36:54 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3CJasp8026553; Fri, 12 Apr 2013 19:36:54 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201304121936.r3CJasp8026553@svn.freebsd.org> From: Steven Hartland Date: Fri, 12 Apr 2013 19:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249424 - in stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Apr 2013 19:36:55 -0000 Author: smh Date: Fri Apr 12 19:36:53 2013 New Revision: 249424 URL: http://svnweb.freebsd.org/changeset/base/249424 Log: MFC r243520, r243521: zfs: overhaul zfs-vfs glue for vnode life-cycle management Reviewed by: avg Approved by: avg (co-mentor) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Fri Apr 12 17:57:40 2013 (r249423) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Fri Apr 12 19:36:53 2013 (r249424) @@ -207,8 +207,6 @@ typedef struct znode { list_node_t z_link_node; /* all znodes in fs link */ sa_handle_t *z_sa_hdl; /* handle to sa data */ boolean_t z_is_sa; /* are we native sa? */ - /* FreeBSD-specific field. */ - struct task z_task; } znode_t; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Apr 12 17:57:40 2013 (r249423) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Apr 12 19:36:53 2013 (r249424) @@ -1844,18 +1844,6 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolea zfsvfs->z_unmounted = B_TRUE; rrw_exit(&zfsvfs->z_teardown_lock, FTAG); rw_exit(&zfsvfs->z_teardown_inactive_lock); - -#ifdef __FreeBSD__ - /* - * Some znodes might not be fully reclaimed, wait for them. - */ - mutex_enter(&zfsvfs->z_znodes_lock); - while (list_head(&zfsvfs->z_all_znodes) != NULL) { - msleep(zfsvfs, &zfsvfs->z_znodes_lock, 0, - "zteardown", 0); - } - mutex_exit(&zfsvfs->z_znodes_lock); -#endif } /* Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Apr 12 17:57:40 2013 (r249423) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Apr 12 19:36:53 2013 (r249424) @@ -4637,14 +4637,22 @@ zfs_inactive(vnode_t *vp, cred_t *cr, ca * The fs has been unmounted, or we did a * suspend/resume and this file no longer exists. */ - VI_LOCK(vp); - ASSERT(vp->v_count <= 1); - vp->v_count = 0; - VI_UNLOCK(vp); + rw_exit(&zfsvfs->z_teardown_inactive_lock); vrecycle(vp, curthread); + return; + } + + mutex_enter(&zp->z_lock); + if (zp->z_unlinked) { + /* + * Fast path to recycle a vnode of a removed file. + */ + mutex_exit(&zp->z_lock); rw_exit(&zfsvfs->z_teardown_inactive_lock); + vrecycle(vp, curthread); return; } + mutex_exit(&zp->z_lock); if (zp->z_atime_dirty && zp->z_unlinked == 0) { dmu_tx_t *tx = dmu_tx_create(zfsvfs->z_os); @@ -4663,8 +4671,6 @@ zfs_inactive(vnode_t *vp, cred_t *cr, ca dmu_tx_commit(tx); } } - - zfs_zinactive(zp); rw_exit(&zfsvfs->z_teardown_inactive_lock); } @@ -6174,28 +6180,6 @@ zfs_freebsd_inactive(ap) return (0); } -static void -zfs_reclaim_complete(void *arg, int pending) -{ - znode_t *zp = arg; - zfsvfs_t *zfsvfs = zp->z_zfsvfs; - - rw_enter(&zfsvfs->z_teardown_inactive_lock, RW_READER); - if (zp->z_sa_hdl != NULL) { - ZFS_OBJ_HOLD_ENTER(zfsvfs, zp->z_id); - zfs_znode_dmu_fini(zp); - ZFS_OBJ_HOLD_EXIT(zfsvfs, zp->z_id); - } - zfs_znode_free(zp); - rw_exit(&zfsvfs->z_teardown_inactive_lock); - /* - * If the file system is being unmounted, there is a process waiting - * for us, wake it up. - */ - if (zfsvfs->z_unmounted) - wakeup_one(zfsvfs); -} - static int zfs_freebsd_reclaim(ap) struct vop_reclaim_args /* { @@ -6206,53 +6190,25 @@ zfs_freebsd_reclaim(ap) vnode_t *vp = ap->a_vp; znode_t *zp = VTOZ(vp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; - boolean_t rlocked; - - rlocked = rw_tryenter(&zfsvfs->z_teardown_inactive_lock, RW_READER); ASSERT(zp != NULL); - /* - * Destroy the vm object and flush associated pages. - */ + /* Destroy the vm object and flush associated pages. */ vnode_destroy_vobject(vp); - mutex_enter(&zp->z_lock); - zp->z_vnode = NULL; - mutex_exit(&zp->z_lock); - - if (zp->z_unlinked) { - ; /* Do nothing. */ - } else if (!rlocked) { - TASK_INIT(&zp->z_task, 0, zfs_reclaim_complete, zp); - taskqueue_enqueue(taskqueue_thread, &zp->z_task); - } else if (zp->z_sa_hdl == NULL) { + /* + * z_teardown_inactive_lock protects from a race with + * zfs_znode_dmu_fini in zfsvfs_teardown during + * force unmount. + */ + rw_enter(&zfsvfs->z_teardown_inactive_lock, RW_READER); + if (zp->z_sa_hdl == NULL) zfs_znode_free(zp); - } else /* if (!zp->z_unlinked && zp->z_dbuf != NULL) */ { - int locked; + else + zfs_zinactive(zp); + rw_exit(&zfsvfs->z_teardown_inactive_lock); - locked = MUTEX_HELD(ZFS_OBJ_MUTEX(zfsvfs, zp->z_id)) ? 2 : - ZFS_OBJ_HOLD_TRYENTER(zfsvfs, zp->z_id); - if (locked == 0) { - /* - * Lock can't be obtained due to deadlock possibility, - * so defer znode destruction. - */ - TASK_INIT(&zp->z_task, 0, zfs_reclaim_complete, zp); - taskqueue_enqueue(taskqueue_thread, &zp->z_task); - } else { - zfs_znode_dmu_fini(zp); - if (locked == 1) - ZFS_OBJ_HOLD_EXIT(zfsvfs, zp->z_id); - zfs_znode_free(zp); - } - } - VI_LOCK(vp); vp->v_data = NULL; - ASSERT(vp->v_holdcnt >= 1); - VI_UNLOCK(vp); - if (rlocked) - rw_exit(&zfsvfs->z_teardown_inactive_lock); return (0); } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Apr 12 17:57:40 2013 (r249423) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Apr 12 19:36:53 2013 (r249424) @@ -1147,14 +1147,16 @@ zfs_zget(zfsvfs_t *zfsvfs, uint64_t obj_ dmu_object_info_t doi; dmu_buf_t *db; znode_t *zp; - int err; + vnode_t *vp; sa_handle_t *hdl; - int first = 1; - - *zpp = NULL; + struct thread *td; + int locked; + int err; + td = curthread; getnewvnode_reserve(1); again: + *zpp = NULL; ZFS_OBJ_HOLD_ENTER(zfsvfs, obj_num); err = sa_buf_hold(zfsvfs->z_os, obj_num, NULL, &db); @@ -1193,48 +1195,38 @@ again: if (zp->z_unlinked) { err = ENOENT; } else { - vnode_t *vp; - int dying = 0; - vp = ZTOV(zp); - if (vp == NULL) - dying = 1; - else { - VN_HOLD(vp); - if ((vp->v_iflag & VI_DOOMED) != 0) { - dying = 1; - /* - * Don't VN_RELE() vnode here, because - * it can call vn_lock() which creates - * LOR between vnode lock and znode - * lock. We will VN_RELE() the vnode - * after droping znode lock. - */ - } - } - if (dying) { - if (first) { - ZFS_LOG(1, "dying znode detected (zp=%p)", zp); - first = 0; - } - /* - * znode is dying so we can't reuse it, we must - * wait until destruction is completed. - */ - sa_buf_rele(db, NULL); - mutex_exit(&zp->z_lock); - ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); - if (vp != NULL) - VN_RELE(vp); - tsleep(zp, 0, "zcollide", 1); - goto again; - } *zpp = zp; err = 0; } sa_buf_rele(db, NULL); + + /* Don't let the vnode disappear after ZFS_OBJ_HOLD_EXIT. */ + if (err == 0) + VN_HOLD(vp); + mutex_exit(&zp->z_lock); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); + + if (err == 0) { + locked = VOP_ISLOCKED(vp); + VI_LOCK(vp); + if ((vp->v_iflag & VI_DOOMED) != 0 && + locked != LK_EXCLUSIVE) { + /* + * The vnode is doomed and this thread doesn't + * hold the exclusive lock on it, so the vnode + * must be being reclaimed by another thread. + * Otherwise the doomed vnode is being reclaimed + * by this thread and zfs_zget is called from + * ZIL internals. + */ + VI_UNLOCK(vp); + VN_RELE(vp); + goto again; + } + VI_UNLOCK(vp); + } getnewvnode_drop_reserve(); return (err); } @@ -1400,10 +1392,8 @@ zfs_znode_delete(znode_t *zp, dmu_tx_t * void zfs_zinactive(znode_t *zp) { - vnode_t *vp = ZTOV(zp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; uint64_t z_id = zp->z_id; - int vfslocked; ASSERT(zp->z_sa_hdl); @@ -1413,19 +1403,6 @@ zfs_zinactive(znode_t *zp) ZFS_OBJ_HOLD_ENTER(zfsvfs, z_id); mutex_enter(&zp->z_lock); - VI_LOCK(vp); - if (vp->v_count > 0) { - /* - * If the hold count is greater than zero, somebody has - * obtained a new reference on this znode while we were - * processing it here, so we are done. - */ - VI_UNLOCK(vp); - mutex_exit(&zp->z_lock); - ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); - return; - } - VI_UNLOCK(vp); /* * If this was the last reference to a file with no links, @@ -1434,16 +1411,14 @@ zfs_zinactive(znode_t *zp) if (zp->z_unlinked) { mutex_exit(&zp->z_lock); ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); - ASSERT(vp->v_count == 0); - vrecycle(vp, curthread); - vfslocked = VFS_LOCK_GIANT(zfsvfs->z_vfs); zfs_rmnode(zp); - VFS_UNLOCK_GIANT(vfslocked); return; } mutex_exit(&zp->z_lock); + zfs_znode_dmu_fini(zp); ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); + zfs_znode_free(zp); } void @@ -1451,8 +1426,8 @@ zfs_znode_free(znode_t *zp) { zfsvfs_t *zfsvfs = zp->z_zfsvfs; - ASSERT(ZTOV(zp) == NULL); ASSERT(zp->z_sa_hdl == NULL); + zp->z_vnode = NULL; mutex_enter(&zfsvfs->z_znodes_lock); POINTER_INVALIDATE(&zp->z_zfsvfs); list_remove(&zfsvfs->z_all_znodes, zp); From owner-svn-src-stable@FreeBSD.ORG Sat Apr 13 21:04:08 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D4EE02D3; Sat, 13 Apr 2013 21:04:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C5E9C1393; Sat, 13 Apr 2013 21:04:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DL4819089925; Sat, 13 Apr 2013 21:04:08 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DL464A089910; Sat, 13 Apr 2013 21:04:06 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304132104.r3DL464A089910@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 13 Apr 2013 21:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249444 - in stable/9/sys: kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 21:04:08 -0000 Author: trasz Date: Sat Apr 13 21:04:06 2013 New Revision: 249444 URL: http://svnweb.freebsd.org/changeset/base/249444 Log: MFC r242139: Add CPU percentage limit enforcement to RCTL. The resouce name is "pcpu". It was implemented by Rudolf Tomori during Google Summer of Code 2012. MFC r242957: Don't divide by zero. MFC r243070: Fix kassert that's not really valid for %CPU accounting. The problem here is race between decaying the resource usage in containers, and updating per-process usage; basically, the former may cause per-container usage to get smaller than per-process usage. MFC r243088: Improve KASSERT messages in racct, to make it clear which resource caused the problem. MFC r248298: Accessing td_state requires thread lock to be held. MFC r248300: When throttling a process to enforce RACCT limits, do not use neither PBDRY (which simply doesn't make any sense) nor PCATCH (which could be used by a malicious process to work around the PCPU limit). Modified: stable/9/sys/kern/kern_racct.c stable/9/sys/kern/kern_rctl.c stable/9/sys/kern/sched_4bsd.c stable/9/sys/kern/subr_trap.c stable/9/sys/sys/proc.h stable/9/sys/sys/racct.h stable/9/sys/sys/rctl.h stable/9/sys/sys/sched.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/kern/kern_racct.c ============================================================================== --- stable/9/sys/kern/kern_racct.c Sat Apr 13 20:01:07 2013 (r249443) +++ stable/9/sys/kern/kern_racct.c Sat Apr 13 21:04:06 2013 (r249444) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_kdtrace.h" +#include "opt_sched.h" #include #include @@ -50,10 +51,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include +#include #ifdef RCTL #include @@ -63,6 +67,23 @@ __FBSDID("$FreeBSD$"); FEATURE(racct, "Resource Accounting"); +/* + * Do not block processes that have their %cpu usage <= pcpu_threshold. + */ +static int pcpu_threshold = 1; + +SYSCTL_NODE(_kern, OID_AUTO, racct, CTLFLAG_RW, 0, "Resource Accounting"); +SYSCTL_UINT(_kern_racct, OID_AUTO, pcpu_threshold, CTLFLAG_RW, &pcpu_threshold, + 0, "Processes with higher %cpu usage than this value can be throttled."); + +/* + * How many seconds it takes to use the scheduler %cpu calculations. When a + * process starts, we compute its %cpu usage by dividing its runtime by the + * process wall clock time. After RACCT_PCPU_SECS pass, we use the value + * provided by the scheduler. + */ +#define RACCT_PCPU_SECS 3 + static struct mtx racct_lock; MTX_SYSINIT(racct_lock, &racct_lock, "racct lock", MTX_DEF); @@ -140,7 +161,217 @@ int racct_types[] = { [RACCT_SHMSIZE] = RACCT_RECLAIMABLE | RACCT_DENIABLE | RACCT_SLOPPY, [RACCT_WALLCLOCK] = - RACCT_IN_MILLIONS }; + RACCT_IN_MILLIONS, + [RACCT_PCTCPU] = + RACCT_DECAYING | RACCT_DENIABLE | RACCT_IN_MILLIONS }; + +static const fixpt_t RACCT_DECAY_FACTOR = 0.3 * FSCALE; + +#ifdef SCHED_4BSD +/* + * Contains intermediate values for %cpu calculations to avoid using floating + * point in the kernel. + * ccpu_exp[k] = FSCALE * (ccpu/FSCALE)^k = FSCALE * exp(-k/20) + * It is needed only for the 4BSD scheduler, because in ULE, the ccpu equals to + * zero so the calculations are more straightforward. + */ +fixpt_t ccpu_exp[] = { + [0] = FSCALE * 1, + [1] = FSCALE * 0.95122942450071400909, + [2] = FSCALE * 0.90483741803595957316, + [3] = FSCALE * 0.86070797642505780722, + [4] = FSCALE * 0.81873075307798185866, + [5] = FSCALE * 0.77880078307140486824, + [6] = FSCALE * 0.74081822068171786606, + [7] = FSCALE * 0.70468808971871343435, + [8] = FSCALE * 0.67032004603563930074, + [9] = FSCALE * 0.63762815162177329314, + [10] = FSCALE * 0.60653065971263342360, + [11] = FSCALE * 0.57694981038048669531, + [12] = FSCALE * 0.54881163609402643262, + [13] = FSCALE * 0.52204577676101604789, + [14] = FSCALE * 0.49658530379140951470, + [15] = FSCALE * 0.47236655274101470713, + [16] = FSCALE * 0.44932896411722159143, + [17] = FSCALE * 0.42741493194872666992, + [18] = FSCALE * 0.40656965974059911188, + [19] = FSCALE * 0.38674102345450120691, + [20] = FSCALE * 0.36787944117144232159, + [21] = FSCALE * 0.34993774911115535467, + [22] = FSCALE * 0.33287108369807955328, + [23] = FSCALE * 0.31663676937905321821, + [24] = FSCALE * 0.30119421191220209664, + [25] = FSCALE * 0.28650479686019010032, + [26] = FSCALE * 0.27253179303401260312, + [27] = FSCALE * 0.25924026064589150757, + [28] = FSCALE * 0.24659696394160647693, + [29] = FSCALE * 0.23457028809379765313, + [30] = FSCALE * 0.22313016014842982893, + [31] = FSCALE * 0.21224797382674305771, + [32] = FSCALE * 0.20189651799465540848, + [33] = FSCALE * 0.19204990862075411423, + [34] = FSCALE * 0.18268352405273465022, + [35] = FSCALE * 0.17377394345044512668, + [36] = FSCALE * 0.16529888822158653829, + [37] = FSCALE * 0.15723716631362761621, + [38] = FSCALE * 0.14956861922263505264, + [39] = FSCALE * 0.14227407158651357185, + [40] = FSCALE * 0.13533528323661269189, + [41] = FSCALE * 0.12873490358780421886, + [42] = FSCALE * 0.12245642825298191021, + [43] = FSCALE * 0.11648415777349695786, + [44] = FSCALE * 0.11080315836233388333, + [45] = FSCALE * 0.10539922456186433678, + [46] = FSCALE * 0.10025884372280373372, + [47] = FSCALE * 0.09536916221554961888, + [48] = FSCALE * 0.09071795328941250337, + [49] = FSCALE * 0.08629358649937051097, + [50] = FSCALE * 0.08208499862389879516, + [51] = FSCALE * 0.07808166600115315231, + [52] = FSCALE * 0.07427357821433388042, + [53] = FSCALE * 0.07065121306042958674, + [54] = FSCALE * 0.06720551273974976512, + [55] = FSCALE * 0.06392786120670757270, + [56] = FSCALE * 0.06081006262521796499, + [57] = FSCALE * 0.05784432087483846296, + [58] = FSCALE * 0.05502322005640722902, + [59] = FSCALE * 0.05233970594843239308, + [60] = FSCALE * 0.04978706836786394297, + [61] = FSCALE * 0.04735892439114092119, + [62] = FSCALE * 0.04504920239355780606, + [63] = FSCALE * 0.04285212686704017991, + [64] = FSCALE * 0.04076220397836621516, + [65] = FSCALE * 0.03877420783172200988, + [66] = FSCALE * 0.03688316740124000544, + [67] = FSCALE * 0.03508435410084502588, + [68] = FSCALE * 0.03337326996032607948, + [69] = FSCALE * 0.03174563637806794323, + [70] = FSCALE * 0.03019738342231850073, + [71] = FSCALE * 0.02872463965423942912, + [72] = FSCALE * 0.02732372244729256080, + [73] = FSCALE * 0.02599112877875534358, + [74] = FSCALE * 0.02472352647033939120, + [75] = FSCALE * 0.02351774585600910823, + [76] = FSCALE * 0.02237077185616559577, + [77] = FSCALE * 0.02127973643837716938, + [78] = FSCALE * 0.02024191144580438847, + [79] = FSCALE * 0.01925470177538692429, + [80] = FSCALE * 0.01831563888873418029, + [81] = FSCALE * 0.01742237463949351138, + [82] = FSCALE * 0.01657267540176124754, + [83] = FSCALE * 0.01576441648485449082, + [84] = FSCALE * 0.01499557682047770621, + [85] = FSCALE * 0.01426423390899925527, + [86] = FSCALE * 0.01356855901220093175, + [87] = FSCALE * 0.01290681258047986886, + [88] = FSCALE * 0.01227733990306844117, + [89] = FSCALE * 0.01167856697039544521, + [90] = FSCALE * 0.01110899653824230649, + [91] = FSCALE * 0.01056720438385265337, + [92] = FSCALE * 0.01005183574463358164, + [93] = FSCALE * 0.00956160193054350793, + [94] = FSCALE * 0.00909527710169581709, + [95] = FSCALE * 0.00865169520312063417, + [96] = FSCALE * 0.00822974704902002884, + [97] = FSCALE * 0.00782837754922577143, + [98] = FSCALE * 0.00744658307092434051, + [99] = FSCALE * 0.00708340892905212004, + [100] = FSCALE * 0.00673794699908546709, + [101] = FSCALE * 0.00640933344625638184, + [102] = FSCALE * 0.00609674656551563610, + [103] = FSCALE * 0.00579940472684214321, + [104] = FSCALE * 0.00551656442076077241, + [105] = FSCALE * 0.00524751839918138427, + [106] = FSCALE * 0.00499159390691021621, + [107] = FSCALE * 0.00474815099941147558, + [108] = FSCALE * 0.00451658094261266798, + [109] = FSCALE * 0.00429630469075234057, + [110] = FSCALE * 0.00408677143846406699, +}; +#endif + +#define CCPU_EXP_MAX 110 + +/* + * This function is analogical to the getpcpu() function in the ps(1) command. + * They should both calculate in the same way so that the racct %cpu + * calculations are consistent with the values showed by the ps(1) tool. + * The calculations are more complex in the 4BSD scheduler because of the value + * of the ccpu variable. In ULE it is defined to be zero which saves us some + * work. + */ +static uint64_t +racct_getpcpu(struct proc *p, u_int pcpu) +{ + u_int swtime; +#ifdef SCHED_4BSD + fixpt_t pctcpu, pctcpu_next; +#endif +#ifdef SMP + struct pcpu *pc; + int found; +#endif + fixpt_t p_pctcpu; + struct thread *td; + + /* + * If the process is swapped out, we count its %cpu usage as zero. + * This behaviour is consistent with the userland ps(1) tool. + */ + if ((p->p_flag & P_INMEM) == 0) + return (0); + swtime = (ticks - p->p_swtick) / hz; + + /* + * For short-lived processes, the sched_pctcpu() returns small + * values even for cpu intensive processes. Therefore we use + * our own estimate in this case. + */ + if (swtime < RACCT_PCPU_SECS) + return (pcpu); + + p_pctcpu = 0; + FOREACH_THREAD_IN_PROC(p, td) { + if (td == PCPU_GET(idlethread)) + continue; +#ifdef SMP + found = 0; + STAILQ_FOREACH(pc, &cpuhead, pc_allcpu) { + if (td == pc->pc_idlethread) { + found = 1; + break; + } + } + if (found) + continue; +#endif + thread_lock(td); +#ifdef SCHED_4BSD + pctcpu = sched_pctcpu(td); + /* Count also the yet unfinished second. */ + pctcpu_next = (pctcpu * ccpu_exp[1]) >> FSHIFT; + pctcpu_next += sched_pctcpu_delta(td); + p_pctcpu += max(pctcpu, pctcpu_next); +#else + /* + * In ULE the %cpu statistics are updated on every + * sched_pctcpu() call. So special calculations to + * account for the latest (unfinished) second are + * not needed. + */ + p_pctcpu += sched_pctcpu(td); +#endif + thread_unlock(td); + } + +#ifdef SCHED_4BSD + if (swtime <= CCPU_EXP_MAX) + return ((100 * (uint64_t)p_pctcpu * 1000000) / + (FSCALE - ccpu_exp[swtime])); +#endif + + return ((100 * (uint64_t)p_pctcpu * 1000000) / FSCALE); +} static void racct_add_racct(struct racct *dest, const struct racct *src) @@ -154,9 +385,11 @@ racct_add_racct(struct racct *dest, cons */ for (i = 0; i <= RACCT_MAX; i++) { KASSERT(dest->r_resources[i] >= 0, - ("racct propagation meltdown: dest < 0")); + ("%s: resource %d propagation meltdown: dest < 0", + __func__, i)); KASSERT(src->r_resources[i] >= 0, - ("racct propagation meltdown: src < 0")); + ("%s: resource %d propagation meltdown: src < 0", + __func__, i)); dest->r_resources[i] += src->r_resources[i]; } } @@ -172,19 +405,23 @@ racct_sub_racct(struct racct *dest, cons * Update resource usage in dest. */ for (i = 0; i <= RACCT_MAX; i++) { - if (!RACCT_IS_SLOPPY(i)) { + if (!RACCT_IS_SLOPPY(i) && !RACCT_IS_DECAYING(i)) { KASSERT(dest->r_resources[i] >= 0, - ("racct propagation meltdown: dest < 0")); + ("%s: resource %d propagation meltdown: dest < 0", + __func__, i)); KASSERT(src->r_resources[i] >= 0, - ("racct propagation meltdown: src < 0")); + ("%s: resource %d propagation meltdown: src < 0", + __func__, i)); KASSERT(src->r_resources[i] <= dest->r_resources[i], - ("racct propagation meltdown: src > dest")); + ("%s: resource %d propagation meltdown: src > dest", + __func__, i)); } - if (RACCT_IS_RECLAIMABLE(i)) { + if (RACCT_CAN_DROP(i)) { dest->r_resources[i] -= src->r_resources[i]; if (dest->r_resources[i] < 0) { - KASSERT(RACCT_IS_SLOPPY(i), - ("racct_sub_racct: usage < 0")); + KASSERT(RACCT_IS_SLOPPY(i) || + RACCT_IS_DECAYING(i), + ("%s: resource %d usage < 0", __func__, i)); dest->r_resources[i] = 0; } } @@ -254,10 +491,23 @@ racct_alloc_resource(struct racct *racct racct->r_resources[resource] += amount; if (racct->r_resources[resource] < 0) { - KASSERT(RACCT_IS_SLOPPY(resource), - ("racct_alloc_resource: usage < 0")); + KASSERT(RACCT_IS_SLOPPY(resource) || RACCT_IS_DECAYING(resource), + ("%s: resource %d usage < 0", __func__, resource)); racct->r_resources[resource] = 0; } + + /* + * There are some cases where the racct %cpu resource would grow + * beyond 100%. + * For example in racct_proc_exit() we add the process %cpu usage + * to the ucred racct containers. If too many processes terminated + * in a short time span, the ucred %cpu resource could grow too much. + * Also, the 4BSD scheduler sometimes returns for a thread more than + * 100% cpu usage. So we set a boundary here to 100%. + */ + if ((resource == RACCT_PCTCPU) && + (racct->r_resources[RACCT_PCTCPU] > 100 * 1000000)) + racct->r_resources[RACCT_PCTCPU] = 100 * 1000000; } static int @@ -357,7 +607,8 @@ racct_add_force(struct proc *p, int reso static int racct_set_locked(struct proc *p, int resource, uint64_t amount) { - int64_t diff; + int64_t old_amount, decayed_amount; + int64_t diff_proc, diff_cred; #ifdef RCTL int error; #endif @@ -369,15 +620,30 @@ racct_set_locked(struct proc *p, int res */ PROC_LOCK_ASSERT(p, MA_OWNED); - diff = amount - p->p_racct->r_resources[resource]; + old_amount = p->p_racct->r_resources[resource]; + /* + * The diffs may be negative. + */ + diff_proc = amount - old_amount; + if (RACCT_IS_DECAYING(resource)) { + /* + * Resources in per-credential racct containers may decay. + * If this is the case, we need to calculate the difference + * between the new amount and the proportional value of the + * old amount that has decayed in the ucred racct containers. + */ + decayed_amount = old_amount * RACCT_DECAY_FACTOR / FSCALE; + diff_cred = amount - decayed_amount; + } else + diff_cred = diff_proc; #ifdef notyet - KASSERT(diff >= 0 || RACCT_IS_RECLAIMABLE(resource), - ("racct_set: usage of non-reclaimable resource %d dropping", + KASSERT(diff_proc >= 0 || RACCT_CAN_DROP(resource), + ("%s: usage of non-droppable resource %d dropping", __func__, resource)); #endif #ifdef RCTL - if (diff > 0) { - error = rctl_enforce(p, resource, diff); + if (diff_proc > 0) { + error = rctl_enforce(p, resource, diff_proc); if (error && RACCT_IS_DENIABLE(resource)) { SDT_PROBE(racct, kernel, rusage, set_failure, p, resource, amount, 0, 0); @@ -385,11 +651,11 @@ racct_set_locked(struct proc *p, int res } } #endif - racct_alloc_resource(p->p_racct, resource, diff); - if (diff > 0) - racct_add_cred_locked(p->p_ucred, resource, diff); - else if (diff < 0) - racct_sub_cred_locked(p->p_ucred, resource, -diff); + racct_alloc_resource(p->p_racct, resource, diff_proc); + if (diff_cred > 0) + racct_add_cred_locked(p->p_ucred, resource, diff_cred); + else if (diff_cred < 0) + racct_sub_cred_locked(p->p_ucred, resource, -diff_cred); return (0); } @@ -412,10 +678,11 @@ racct_set(struct proc *p, int resource, return (error); } -void -racct_set_force(struct proc *p, int resource, uint64_t amount) +static void +racct_set_force_locked(struct proc *p, int resource, uint64_t amount) { - int64_t diff; + int64_t old_amount, decayed_amount; + int64_t diff_proc, diff_cred; SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0); @@ -424,13 +691,35 @@ racct_set_force(struct proc *p, int reso */ PROC_LOCK_ASSERT(p, MA_OWNED); + old_amount = p->p_racct->r_resources[resource]; + /* + * The diffs may be negative. + */ + diff_proc = amount - old_amount; + if (RACCT_IS_DECAYING(resource)) { + /* + * Resources in per-credential racct containers may decay. + * If this is the case, we need to calculate the difference + * between the new amount and the proportional value of the + * old amount that has decayed in the ucred racct containers. + */ + decayed_amount = old_amount * RACCT_DECAY_FACTOR / FSCALE; + diff_cred = amount - decayed_amount; + } else + diff_cred = diff_proc; + + racct_alloc_resource(p->p_racct, resource, diff_proc); + if (diff_cred > 0) + racct_add_cred_locked(p->p_ucred, resource, diff_cred); + else if (diff_cred < 0) + racct_sub_cred_locked(p->p_ucred, resource, -diff_cred); +} + +void +racct_set_force(struct proc *p, int resource, uint64_t amount) +{ mtx_lock(&racct_lock); - diff = amount - p->p_racct->r_resources[resource]; - racct_alloc_resource(p->p_racct, resource, diff); - if (diff > 0) - racct_add_cred_locked(p->p_ucred, resource, diff); - else if (diff < 0) - racct_sub_cred_locked(p->p_ucred, resource, -diff); + racct_set_force_locked(p, resource, amount); mtx_unlock(&racct_lock); } @@ -469,6 +758,22 @@ racct_get_available(struct proc *p, int } /* + * Returns amount of the %cpu resource that process 'p' can add to its %cpu + * utilization. Adding more than that would lead to the process being + * throttled. + */ +static int64_t +racct_pcpu_available(struct proc *p) +{ + +#ifdef RCTL + return (rctl_pcpu_available(p)); +#else + return (INT64_MAX); +#endif +} + +/* * Decrease allocation of 'resource' by 'amount' for process 'p'. */ void @@ -481,13 +786,13 @@ racct_sub(struct proc *p, int resource, * We need proc lock to dereference p->p_ucred. */ PROC_LOCK_ASSERT(p, MA_OWNED); - KASSERT(RACCT_IS_RECLAIMABLE(resource), - ("racct_sub: called for non-reclaimable resource %d", resource)); + KASSERT(RACCT_CAN_DROP(resource), + ("%s: called for non-droppable resource %d", __func__, resource)); mtx_lock(&racct_lock); KASSERT(amount <= p->p_racct->r_resources[resource], - ("racct_sub: freeing %ju of resource %d, which is more " - "than allocated %jd for %s (pid %d)", amount, resource, + ("%s: freeing %ju of resource %d, which is more " + "than allocated %jd for %s (pid %d)", __func__, amount, resource, (intmax_t)p->p_racct->r_resources[resource], p->p_comm, p->p_pid)); racct_alloc_resource(p->p_racct, resource, -amount); @@ -504,8 +809,8 @@ racct_sub_cred_locked(struct ucred *cred 0, 0); #ifdef notyet - KASSERT(RACCT_IS_RECLAIMABLE(resource), - ("racct_sub_cred: called for non-reclaimable resource %d", + KASSERT(RACCT_CAN_DROP(resource), + ("%s: called for resource %d which can not drop", __func__, resource)); #endif @@ -551,6 +856,10 @@ racct_proc_fork(struct proc *parent, str goto out; #endif + /* Init process cpu time. */ + child->p_prev_runtime = 0; + child->p_throttled = 0; + /* * Inherit resource usage. */ @@ -602,6 +911,8 @@ racct_proc_exit(struct proc *p) { int i; uint64_t runtime; + struct timeval wallclock; + uint64_t pct_estimate, pct; PROC_LOCK(p); /* @@ -614,8 +925,19 @@ racct_proc_exit(struct proc *p) if (runtime < p->p_prev_runtime) runtime = p->p_prev_runtime; #endif + microuptime(&wallclock); + timevalsub(&wallclock, &p->p_stats->p_start); + if (wallclock.tv_sec > 0 || wallclock.tv_usec > 0) { + pct_estimate = (1000000 * runtime * 100) / + ((uint64_t)wallclock.tv_sec * 1000000 + + wallclock.tv_usec); + } else + pct_estimate = 0; + pct = racct_getpcpu(p, pct_estimate); + mtx_lock(&racct_lock); racct_set_locked(p, RACCT_CPU, runtime); + racct_add_cred_locked(p->p_ucred, RACCT_PCTCPU, pct); for (i = 0; i <= RACCT_MAX; i++) { if (p->p_racct->r_resources[i] == 0) @@ -692,23 +1014,122 @@ racct_move(struct racct *dest, struct ra } static void +racct_proc_throttle(struct proc *p) +{ + struct thread *td; +#ifdef SMP + int cpuid; +#endif + + PROC_LOCK_ASSERT(p, MA_OWNED); + + /* + * Do not block kernel processes. Also do not block processes with + * low %cpu utilization to improve interactivity. + */ + if (((p->p_flag & (P_SYSTEM | P_KTHREAD)) != 0) || + (p->p_racct->r_resources[RACCT_PCTCPU] <= pcpu_threshold)) + return; + p->p_throttled = 1; + + FOREACH_THREAD_IN_PROC(p, td) { + thread_lock(td); + switch (td->td_state) { + case TDS_RUNQ: + /* + * If the thread is on the scheduler run-queue, we can + * not just remove it from there. So we set the flag + * TDF_NEEDRESCHED for the thread, so that once it is + * running, it is taken off the cpu as soon as possible. + */ + td->td_flags |= TDF_NEEDRESCHED; + break; + case TDS_RUNNING: + /* + * If the thread is running, we request a context + * switch for it by setting the TDF_NEEDRESCHED flag. + */ + td->td_flags |= TDF_NEEDRESCHED; +#ifdef SMP + cpuid = td->td_oncpu; + if ((cpuid != NOCPU) && (td != curthread)) + ipi_cpu(cpuid, IPI_AST); +#endif + break; + default: + break; + } + thread_unlock(td); + } +} + +static void +racct_proc_wakeup(struct proc *p) +{ + PROC_LOCK_ASSERT(p, MA_OWNED); + + if (p->p_throttled) { + p->p_throttled = 0; + wakeup(p->p_racct); + } +} + +static void +racct_decay_resource(struct racct *racct, void * res, void* dummy) +{ + int resource; + int64_t r_old, r_new; + + resource = *(int *)res; + r_old = racct->r_resources[resource]; + + /* If there is nothing to decay, just exit. */ + if (r_old <= 0) + return; + + mtx_lock(&racct_lock); + r_new = r_old * RACCT_DECAY_FACTOR / FSCALE; + racct->r_resources[resource] = r_new; + mtx_unlock(&racct_lock); +} + +static void +racct_decay(int resource) +{ + ui_racct_foreach(racct_decay_resource, &resource, NULL); + loginclass_racct_foreach(racct_decay_resource, &resource, NULL); + prison_racct_foreach(racct_decay_resource, &resource, NULL); +} + +static void racctd(void) { struct thread *td; struct proc *p; struct timeval wallclock; uint64_t runtime; + uint64_t pct, pct_estimate; for (;;) { + racct_decay(RACCT_PCTCPU); + sx_slock(&allproc_lock); + LIST_FOREACH(p, &zombproc, p_list) { + PROC_LOCK(p); + racct_set(p, RACCT_PCTCPU, 0); + PROC_UNLOCK(p); + } + FOREACH_PROC_IN_SYSTEM(p) { - if (p->p_state != PRS_NORMAL) + PROC_LOCK(p); + if (p->p_state != PRS_NORMAL) { + PROC_UNLOCK(p); continue; + } microuptime(&wallclock); timevalsub(&wallclock, &p->p_stats->p_start); - PROC_LOCK(p); PROC_SLOCK(p); FOREACH_THREAD_IN_PROC(p, td) ruxagg(p, td); @@ -722,7 +1143,15 @@ racctd(void) runtime = p->p_prev_runtime; #endif p->p_prev_runtime = runtime; + if (wallclock.tv_sec > 0 || wallclock.tv_usec > 0) { + pct_estimate = (1000000 * runtime * 100) / + ((uint64_t)wallclock.tv_sec * 1000000 + + wallclock.tv_usec); + } else + pct_estimate = 0; + pct = racct_getpcpu(p, pct_estimate); mtx_lock(&racct_lock); + racct_set_force_locked(p, RACCT_PCTCPU, pct); racct_set_locked(p, RACCT_CPU, runtime); racct_set_locked(p, RACCT_WALLCLOCK, (uint64_t)wallclock.tv_sec * 1000000 + @@ -730,6 +1159,26 @@ racctd(void) mtx_unlock(&racct_lock); PROC_UNLOCK(p); } + + /* + * To ensure that processes are throttled in a fair way, we need + * to iterate over all processes again and check the limits + * for %cpu resource only after ucred racct containers have been + * properly filled. + */ + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + if (p->p_state != PRS_NORMAL) { + PROC_UNLOCK(p); + continue; + } + + if (racct_pcpu_available(p) <= 0) + racct_proc_throttle(p); + else if (p->p_throttled) + racct_proc_wakeup(p); + PROC_UNLOCK(p); + } sx_sunlock(&allproc_lock); pause("-", hz); } Modified: stable/9/sys/kern/kern_rctl.c ============================================================================== --- stable/9/sys/kern/kern_rctl.c Sat Apr 13 20:01:07 2013 (r249443) +++ stable/9/sys/kern/kern_rctl.c Sat Apr 13 21:04:06 2013 (r249444) @@ -76,6 +76,8 @@ FEATURE(rctl, "Resource Limits"); #define RCTL_MAX_INBUFLEN 4096 #define RCTL_LOG_BUFSIZE 128 +#define RCTL_PCPU_SHIFT (10 * 1000000) + /* * 'rctl_rule_link' connects a rule with every racct it's related to. * For example, rule 'user:X:openfiles:deny=N/process' is linked @@ -120,6 +122,7 @@ static struct dict resourcenames[] = { { "nshm", RACCT_NSHM }, { "shmsize", RACCT_SHMSIZE }, { "wallclock", RACCT_WALLCLOCK }, + { "pcpu", RACCT_PCTCPU }, { NULL, -1 }}; static struct dict actionnames[] = { @@ -271,6 +274,51 @@ rctl_would_exceed(const struct proc *p, } /* + * Special version of rctl_available() function for the %cpu resource. + * We slightly cheat here and return less than we normally would. + */ +int64_t +rctl_pcpu_available(const struct proc *p) { + struct rctl_rule *rule; + struct rctl_rule_link *link; + int64_t available, minavailable, limit; + + minavailable = INT64_MAX; + limit = 0; + + rw_rlock(&rctl_lock); + + LIST_FOREACH(link, &p->p_racct->r_rule_links, rrl_next) { + rule = link->rrl_rule; + if (rule->rr_resource != RACCT_PCTCPU) + continue; + if (rule->rr_action != RCTL_ACTION_DENY) + continue; + available = rctl_available_resource(p, rule); + if (available < minavailable) { + minavailable = available; + limit = rule->rr_amount; + } + } + + rw_runlock(&rctl_lock); + + /* + * Return slightly less than actual value of the available + * %cpu resource. This makes %cpu throttling more agressive + * and lets us act sooner than the limits are already exceeded. + */ + if (limit != 0) { + if (limit > 2 * RCTL_PCPU_SHIFT) + minavailable -= RCTL_PCPU_SHIFT; + else + minavailable -= (limit / 2); + } + + return (minavailable); +} + +/* * Check whether the proc 'p' can allocate 'amount' of 'resource' in addition * to what it keeps allocated now. Returns non-zero if the allocation should * be denied, 0 otherwise. Modified: stable/9/sys/kern/sched_4bsd.c ============================================================================== --- stable/9/sys/kern/sched_4bsd.c Sat Apr 13 20:01:07 2013 (r249443) +++ stable/9/sys/kern/sched_4bsd.c Sat Apr 13 21:04:06 2013 (r249444) @@ -1585,6 +1585,40 @@ sched_pctcpu(struct thread *td) return (ts->ts_pctcpu); } +#ifdef RACCT +/* + * Calculates the contribution to the thread cpu usage for the latest + * (unfinished) second. + */ +fixpt_t +sched_pctcpu_delta(struct thread *td) +{ + struct td_sched *ts; + fixpt_t delta; + int realstathz; + + THREAD_LOCK_ASSERT(td, MA_OWNED); + ts = td->td_sched; + delta = 0; + realstathz = stathz ? stathz : hz; + if (ts->ts_cpticks != 0) { +#if (FSHIFT >= CCPU_SHIFT) + delta = (realstathz == 100) + ? ((fixpt_t) ts->ts_cpticks) << + (FSHIFT - CCPU_SHIFT) : + 100 * (((fixpt_t) ts->ts_cpticks) + << (FSHIFT - CCPU_SHIFT)) / realstathz; +#else + delta = ((FSCALE - ccpu) * + (ts->ts_cpticks * + FSCALE / realstathz)) >> FSHIFT; +#endif + } + + return (delta); +} +#endif + void sched_tick(int cnt) { Modified: stable/9/sys/kern/subr_trap.c ============================================================================== --- stable/9/sys/kern/subr_trap.c Sat Apr 13 20:01:07 2013 (r249443) +++ stable/9/sys/kern/subr_trap.c Sat Apr 13 21:04:06 2013 (r249444) @@ -151,6 +151,12 @@ userret(struct thread *td, struct trapfr #ifdef XEN PT_UPDATES_FLUSH(); #endif +#ifdef RACCT + PROC_LOCK(p); + while (p->p_throttled == 1) + msleep(p->p_racct, &p->p_mtx, 0, "racct", 0); + PROC_UNLOCK(p); +#endif } /* Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Sat Apr 13 20:01:07 2013 (r249443) +++ stable/9/sys/sys/proc.h Sat Apr 13 21:04:06 2013 (r249444) @@ -593,6 +593,7 @@ struct proc { */ LIST_ENTRY(proc) p_orphan; /* (e) List of orphan processes. */ LIST_HEAD(, proc) p_orphans; /* (e) Pointer to list of orphans. */ + u_char p_throttled; /* (c) Flag for racct pcpu throttling */ }; #define p_session p_pgrp->pg_session Modified: stable/9/sys/sys/racct.h ============================================================================== --- stable/9/sys/sys/racct.h Sat Apr 13 20:01:07 2013 (r249443) +++ stable/9/sys/sys/racct.h Sat Apr 13 21:04:06 2013 (r249444) @@ -68,7 +68,8 @@ struct ucred; #define RACCT_NSHM 17 #define RACCT_SHMSIZE 18 #define RACCT_WALLCLOCK 19 -#define RACCT_MAX RACCT_WALLCLOCK +#define RACCT_PCTCPU 20 +#define RACCT_MAX RACCT_PCTCPU /* * Resource properties. @@ -78,6 +79,7 @@ struct ucred; #define RACCT_INHERITABLE 0x04 #define RACCT_DENIABLE 0x08 #define RACCT_SLOPPY 0x10 +#define RACCT_DECAYING 0x20 extern int racct_types[]; @@ -89,7 +91,9 @@ extern int racct_types[]; #define RACCT_IS_IN_MILLIONS(X) (racct_types[X] & RACCT_IN_MILLIONS) /* - * Resource usage can drop, as opposed to only grow. + * Resource usage can drop, as opposed to only grow. When the process + * terminates, its resource usage is freed from the respective + * per-credential racct containers. */ #define RACCT_IS_RECLAIMABLE(X) (racct_types[X] & RACCT_RECLAIMABLE) @@ -113,6 +117,20 @@ extern int racct_types[]; #define RACCT_IS_SLOPPY(X) (racct_types[X] & RACCT_SLOPPY) /* + * When a process terminates, its resource usage is not automatically + * subtracted from per-credential racct containers. Instead, the resource + * usage of per-credential racct containers decays in time. + * Resource usage can olso drop for such resource. + * So far, the only such resource is RACCT_PCTCPU. + */ +#define RACCT_IS_DECAYING(X) (racct_types[X] & RACCT_DECAYING) + +/* + * Resource usage can drop, as opposed to only grow. + */ +#define RACCT_CAN_DROP(X) (RACCT_IS_RECLAIMABLE(X) | RACCT_IS_DECAYING(X)) + +/* * The 'racct' structure defines resource consumption for a particular * subject, such as process or jail. * Modified: stable/9/sys/sys/rctl.h ============================================================================== --- stable/9/sys/sys/rctl.h Sat Apr 13 20:01:07 2013 (r249443) +++ stable/9/sys/sys/rctl.h Sat Apr 13 21:04:06 2013 (r249444) @@ -140,6 +140,7 @@ void rctl_rule_release(struct rctl_rule int rctl_rule_add(struct rctl_rule *rule); int rctl_rule_remove(struct rctl_rule *filter); int rctl_enforce(struct proc *p, int resource, uint64_t amount); +int64_t rctl_pcpu_available(const struct proc *p); uint64_t rctl_get_limit(struct proc *p, int resource); uint64_t rctl_get_available(struct proc *p, int resource); const char *rctl_resource_name(int resource); Modified: stable/9/sys/sys/sched.h ============================================================================== --- stable/9/sys/sys/sched.h Sat Apr 13 20:01:07 2013 (r249443) +++ stable/9/sys/sys/sched.h Sat Apr 13 21:04:06 2013 (r249444) @@ -103,6 +103,11 @@ void sched_user_prio(struct thread *td, void sched_userret(struct thread *td); void sched_wakeup(struct thread *td); void sched_preempt(struct thread *td); +#ifdef RACCT +#ifdef SCHED_4BSD +fixpt_t sched_pctcpu_delta(struct thread *td); +#endif +#endif /* * Threads are moved on and off of run queues From owner-svn-src-stable@FreeBSD.ORG Sat Apr 13 21:11:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6957D6A2; Sat, 13 Apr 2013 21:11:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5C05F13F0; Sat, 13 Apr 2013 21:11:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DLBJ8U092967; Sat, 13 Apr 2013 21:11:19 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DLBJfA092966; Sat, 13 Apr 2013 21:11:19 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304132111.r3DLBJfA092966@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 13 Apr 2013 21:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249445 - stable/9/usr.bin/rctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 21:11:19 -0000 Author: trasz Date: Sat Apr 13 21:11:18 2013 New Revision: 249445 URL: http://svnweb.freebsd.org/changeset/base/249445 Log: MFC r242140: Add pcpu to the the rctl(8) manual page. Modified: stable/9/usr.bin/rctl/rctl.8 Directory Properties: stable/9/usr.bin/rctl/ (props changed) Modified: stable/9/usr.bin/rctl/rctl.8 ============================================================================== --- stable/9/usr.bin/rctl/rctl.8 Sat Apr 13 21:04:06 2013 (r249444) +++ stable/9/usr.bin/rctl/rctl.8 Sat Apr 13 21:11:18 2013 (r249445) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 16, 2012 +.Dd October 26, 2012 .Dt RCTL 8 .Os .Sh NAME @@ -146,6 +146,7 @@ A filter that matches all defined rules .It nshm Ta "number of SysV shared memory segments" .It shmsize Ta "SysV shared memory size, in bytes" .It wallclock Ta "wallclock time, in seconds" +.It pcpu Ta "%CPU, in percents of a single CPU core" .El .Sh ACTIONS .Bl -column -offset 3n "pseudoterminals" From owner-svn-src-stable@FreeBSD.ORG Sat Apr 13 21:14:52 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2259A90A; Sat, 13 Apr 2013 21:14:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 14C601446; Sat, 13 Apr 2013 21:14:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DLEpmh093558; Sat, 13 Apr 2013 21:14:51 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DLEpn5093557; Sat, 13 Apr 2013 21:14:51 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304132114.r3DLEpn5093557@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 13 Apr 2013 21:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249446 - stable/9/usr.bin/rctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 21:14:52 -0000 Author: trasz Date: Sat Apr 13 21:14:51 2013 New Revision: 249446 URL: http://svnweb.freebsd.org/changeset/base/249446 Log: MFC r243849 by bdrewery@: - Move EXAMPLES descriptions to before the actual command - Add mdoc macros for EXAMPLES Modified: stable/9/usr.bin/rctl/rctl.8 Directory Properties: stable/9/usr.bin/rctl/ (props changed) Modified: stable/9/usr.bin/rctl/rctl.8 ============================================================================== --- stable/9/usr.bin/rctl/rctl.8 Sat Apr 13 21:11:18 2013 (r249445) +++ stable/9/usr.bin/rctl/rctl.8 Sat Apr 13 21:14:51 2013 (r249446) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 26, 2012 +.Dd December 3, 2012 .Dt RCTL 8 .Os .Sh NAME @@ -169,21 +169,18 @@ Note that limiting RSS may kill the mach .Sh EXIT STATUS .Ex -std .Sh EXAMPLES -.Dl rctl -a user:joe:vmemoryuse:deny=1g +Prevent user "joe" from allocating more than 1GB of virtual memory: +.Dl Nm Fl a Ar user:joe:vmemoryuse:deny=1g .Pp -Prevent user "joe" from allocating more than 1GB of virtual memory. +Remove all RCTL rules: +.Dl Nm Fl r Ar \&: .Pp -.Dl rctl -r : +Display resource usage information for jail named "www": +.Dl Nm Fl hu Ar jail:www .Pp -Remove all RCTL rules. +Display all the rules applicable to process with PID 512: +.Dl Nm Fl l Ar process:512 .Pp -.Dl rctl -hu jail:www -.Pp -Display resource usage information for jail named "www". -.Pp -.Dl rctl -l process:512 -.Pp -Display all the rules applicable to process with PID 512. .Sh SEE ALSO .Xr rctl.conf 5 .Sh HISTORY From owner-svn-src-stable@FreeBSD.ORG Sat Apr 13 21:16:16 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5E616A86; Sat, 13 Apr 2013 21:16:16 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 511471455; Sat, 13 Apr 2013 21:16:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DLGGcf093833; Sat, 13 Apr 2013 21:16:16 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DLGGTj093832; Sat, 13 Apr 2013 21:16:16 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304132116.r3DLGGTj093832@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 13 Apr 2013 21:16:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249447 - stable/9/usr.bin/rctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 21:16:16 -0000 Author: trasz Date: Sat Apr 13 21:16:15 2013 New Revision: 249447 URL: http://svnweb.freebsd.org/changeset/base/249447 Log: MFC r249375 by joel@: Minor spelling and grammar fixes. Modified: stable/9/usr.bin/rctl/rctl.8 Directory Properties: stable/9/usr.bin/rctl/ (props changed) Modified: stable/9/usr.bin/rctl/rctl.8 ============================================================================== --- stable/9/usr.bin/rctl/rctl.8 Sat Apr 13 21:14:51 2013 (r249446) +++ stable/9/usr.bin/rctl/rctl.8 Sat Apr 13 21:16:15 2013 (r249447) @@ -162,7 +162,7 @@ See for a list of supported signals. .Pp Not all actions are supported for all resources. -Attempt to add rule with action not supported by a given resouce will result +Attempt to add rule with action not supported by a given resource will result in error. .Pp Note that limiting RSS may kill the machine due to thrashing. From owner-svn-src-stable@FreeBSD.ORG Sat Apr 13 21:17:44 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5CA41BFC; Sat, 13 Apr 2013 21:17:44 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3941469; Sat, 13 Apr 2013 21:17:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DLHiqg094076; Sat, 13 Apr 2013 21:17:44 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DLHivs094075; Sat, 13 Apr 2013 21:17:44 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304132117.r3DLHivs094075@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 13 Apr 2013 21:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249448 - stable/9/usr.bin/rctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 21:17:44 -0000 Author: trasz Date: Sat Apr 13 21:17:43 2013 New Revision: 249448 URL: http://svnweb.freebsd.org/changeset/base/249448 Log: MFC r243856 by joel@: Remove superfluous paragraph macro. Modified: stable/9/usr.bin/rctl/rctl.8 Directory Properties: stable/9/usr.bin/rctl/ (props changed) Modified: stable/9/usr.bin/rctl/rctl.8 ============================================================================== --- stable/9/usr.bin/rctl/rctl.8 Sat Apr 13 21:16:15 2013 (r249447) +++ stable/9/usr.bin/rctl/rctl.8 Sat Apr 13 21:17:43 2013 (r249448) @@ -180,7 +180,6 @@ Display resource usage information for j .Pp Display all the rules applicable to process with PID 512: .Dl Nm Fl l Ar process:512 -.Pp .Sh SEE ALSO .Xr rctl.conf 5 .Sh HISTORY From owner-svn-src-stable@FreeBSD.ORG Sat Apr 13 22:29:15 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2D8C18ED; Sat, 13 Apr 2013 22:29:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0D4641637; Sat, 13 Apr 2013 22:29:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DMTFMu015668; Sat, 13 Apr 2013 22:29:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DMTDnv015655; Sat, 13 Apr 2013 22:29:13 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201304132229.r3DMTDnv015655@svn.freebsd.org> From: Eitan Adler Date: Sat, 13 Apr 2013 22:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249451 - in stable/9/usr.bin/calendar/calendars: . hr_HR.ISO8859-2 ru_RU.KOI8-R X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 22:29:15 -0000 Author: eadler Date: Sat Apr 13 22:29:13 2013 New Revision: 249451 URL: http://svnweb.freebsd.org/changeset/base/249451 Log: MFC r225846, r225853, r225854, r226121, r226320, r226351, r226942, r228991, r229164, r230876, r231274, r231516, r232105, r232353, r234221, r234320, r234446, r234600, r236392, r236733, r238058, r238976, r239498, r240362, r240548, r242549, r242849, r242900, r245447, r247752, r249113 Merge all outstanding calendars commits. Discussed with: gjb, des Modified: stable/9/usr.bin/calendar/calendars/calendar.birthday stable/9/usr.bin/calendar/calendars/calendar.freebsd stable/9/usr.bin/calendar/calendars/calendar.history stable/9/usr.bin/calendar/calendars/calendar.music stable/9/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.all stable/9/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.praznici stable/9/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all Directory Properties: stable/9/usr.bin/calendar/calendars/ (props changed) Modified: stable/9/usr.bin/calendar/calendars/calendar.birthday ============================================================================== --- stable/9/usr.bin/calendar/calendars/calendar.birthday Sat Apr 13 21:41:51 2013 (r249450) +++ stable/9/usr.bin/calendar/calendars/calendar.birthday Sat Apr 13 22:29:13 2013 (r249451) @@ -6,6 +6,7 @@ #ifndef _calendar_birthday_ #define _calendar_birthday_ +#undef unix 01/01 J.D. Salinger born, 1919 01/01 Paul Revere born in Boston, 1735 @@ -214,7 +215,7 @@ 09/08 Richard ``the Lionheart'', king of England born in Oxford, 1157 09/08 Peter Sellers born in Southsea, England, 1925 09/09 Chinese Communist Party Chairman Mao Tse-Tung dies at age 82, 1976 -09/09 Dennis MacAlistair Ritchie, creater of C, born, 1941 +09/09 Dennis MacAlistair Ritchie, creator of C, born, 1941 09/12 Jesse Owens born, 1913 09/13 Walter Reed born, 1851 09/15 Agatha Christie born in Torquay, England, 1890 @@ -291,7 +292,7 @@ 12/12 E.G. Robinson born, 1893 12/14 George Washington dies, 1799 12/17 William Safire (Safir) born, 1929 -12/18 Konrad Zuse died in Hünfeld, 1995 +12/18 Konrad Zuse died in Hünfeld, 1995 12/20 Carl Sagan died, 1996 12/21 Benjamin Disraeli born, 1804 12/22 Giacomo Puccini born, 1858 Modified: stable/9/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/9/usr.bin/calendar/calendars/calendar.freebsd Sat Apr 13 21:41:51 2013 (r249450) +++ stable/9/usr.bin/calendar/calendars/calendar.freebsd Sat Apr 13 22:29:13 2013 (r249451) @@ -22,6 +22,7 @@ 01/16 Ariff Abdullah born in Kuala Lumpur, Malaysia, 1978 01/16 Dmitry Sivachenko born in Moscow, USSR, 1978 01/16 Vanilla I. Shu born in Taipei, Taiwan, Republic of China, 1978 +01/17 Raphael Kubo da Costa born in Sao Paulo, Sao Paulo, Brazil, 1989 01/18 Dejan Lesjak born in Ljubljana, Slovenia, Yugoslavia, 1977 01/19 Marshall Kirk McKusick born in Wilmington, Delaware, United States, 1954 01/19 Ruslan Ermilov born in Simferopol, USSR, 1974 @@ -47,10 +48,13 @@ 02/02 Michael W Lucas born in Detroit, Michigan, United States, 1967 02/02 Dmitry Chagin born in Stalingrad, USSR, 1976 02/02 Yoichi Nakayama born in Tsu, Mie, Japan, 1976 +02/03 Jason Helfman born in Royal Oak, Michigan, United States, 1972 +02/04 Eitan Adler born in West Hempstead, New York, United States, 1991 02/05 Frank Laszlo born in Howell, Michigan, United States, 1983 02/10 David Greenman born in Portland, Oregon, United States, 1968 02/10 Paul Richards born in Ammanford, Carmarthenshire, United Kingdom, 1968 02/10 Simon Barner born in Rosenheim, Bayern, Germany, 1980 +02/10 Jason E. Hale born in Pittsburgh, Pennsylvania, Unites States, 1982 02/13 Jesper Skriver born in Aarhus, Denmark, 1975 02/13 Steve Wills born in Lynchburg, Virginia, United States, 1975 02/13 Andrey Slusar born in Odessa, USSR, 1979 @@ -115,6 +119,7 @@ 04/03 Tong Liu born in Beijing, People's Republic of China, 1981 04/03 Gabor Pali born in Kunhegyes, Hungary, 1982 04/05 Stacey Son born in Burley, Idaho, United States, 1967 +04/06 Peter Jeremy born in Sydney, New South Wales, Australia, 1961 04/07 Edward Tomasz Napierala born in Wolsztyn, Poland, 1981 04/08 Jordan K. Hubbard born in Honolulu, Hawaii, United States, 1963 04/09 Ceri Davies born in Haverfordwest, Pembrokeshire, United Kingdom, 1976 @@ -123,10 +128,12 @@ 04/12 Ed Schouten born in Oss, the Netherlands, 1986 04/13 Oliver Braun born in Nuremberg, Bavaria, Germany, 1972 04/14 Crist J. Clark born in Milwaukee, Wisconsin, United States, 1970 +04/14 Glen J. Barber born in Wilkes-Barre, Pennsylvania, United States, 1981 04/15 David Malone born in Dublin, Ireland, 1973 04/17 Dryice Liu born in Jinan, Shandong, China, 1975 04/22 Joerg Wunsch born in Dresden, Sachsen, Germany, 1962 04/22 Jun Kuriyama born in Matsue, Shimane, Japan, 1973 +04/22 Jakub Klama born in Blachownia, Silesia, Poland, 1989 04/26 Rene Ladan born in Geldrop, the Netherlands, 1980 04/29 Adam Weinberger born in Berkeley, California, United States, 1980 04/29 Eric Anholt born in Portland, Oregon, United States, 1983 @@ -139,6 +146,7 @@ 05/08 Sean Kelly born in Walnut Creek, California, United States, 1982 05/09 Daniel Eischen born in Syracuse, New York, United States, 1963 05/09 Aaron Dalton born in Boise, Idaho, United States, 1973 +05/09 Jase Thew born in Abergavenny, Gwent, United Kingdom, 1974 05/10 Markus Brueffer born in Gronau, Nordrhein-Westfalen, Germany, 1977 05/11 Jesus Rodriguez born in Barcelona, Spain, 1972 05/11 Roman Kurakin born in Moscow, USSR, 1979 @@ -157,6 +165,7 @@ 05/22 Clive Tong-I Lin born in Changhua, Taiwan, Republic of China, 1978 05/22 Michael Bushkov born in Rostov-on-Don, Russian Federation, 1985 05/22 Rui Paulo born in Evora, Portugal, 1986 +05/22 David Naylor born in Johannesburg, South Africa, 1988 05/23 Munechika Sumikawa born in Osaka, Osaka, Japan, 1972 05/24 Duncan McLennan Barclay born in London, Middlesex, United Kingdom, 1970 05/24 Oliver Lehmann born in Karlsburg, Germany, 1981 @@ -176,6 +185,7 @@ 06/04 Justin Gibbs born in San Pedro, California, United States, 1973 06/04 Jason Evans born in Greeley, Colorado, United States, 1973 06/04 Thomas Moestl born in Braunschweig, Niedersachsen, Germany, 1980 +06/04 Devin Teske born in Arcadia, California, United States, 1982 06/04 Zack Kirsch born in Memphis, Tennessee, United States, 1982 06/06 Sergei Kolobov born in Karpinsk, Russian Federation, 1972 06/06 Alan Eldridge died in Denver, Colorado, 2003 @@ -213,6 +223,7 @@ 07/11 Jesus R. Camou born in Hermosillo, Sonora, Mexico, 1983 07/15 Gary Jennejohn born in Rochester, New York, United States, 1950 07/16 Suleiman Souhlal born in Roma, Italy, 1983 +07/16 Davide Italiano born in Milazzo, Italy, 1989 07/17 Michael Chin-Yuan Wu born in Taipei, Taiwan, Republic of China, 1980 07/19 Masafumi NAKANE born in Okazaki, Aichi, Japan, 1972 07/19 Simon L. Nielsen born in Copenhagen, Denmark, 1980 @@ -222,6 +233,7 @@ 07/22 Jens Schweikhardt born in Waiblingen, Baden-Wuerttemberg, Germany, 1967 07/22 Lukas Ertl born in Weissenbach/Enns, Steiermark, Austria, 1976 07/23 Sergey A. Osokin born in Krasnogorsky, Stepnogorsk, Akmolinskaya region, Kazakhstan, 1972 +07/23 Andrey Zonov born in Kirov, Russian Federation, 1985 07/24 Alexander Nedotsukov born in Ulyanovsk, Russian Federation, 1974 07/24 Alberto Villa born in Vercelli, Italy, 1987 07/27 Andriy Gapon born in Kyrykivka, Sumy region, Ukraine, 1976 @@ -234,6 +246,7 @@ 08/05 Alfred Perlstein born in Brooklyn, New York, United States, 1978 08/06 Anton Berezin born in Dnepropetrovsk, Ukraine, 1970 08/06 John-Mark Gurney born in Detroit, Michigan, United States, 1978 +08/06 Damjan Marion born in Rijeka, Croatia, 1978 08/07 Jonathan Mini born in San Mateo, California, United States, 1979 08/08 Mikolaj Golub born in Kharkov, USSR, 1977 08/10 Peter Pentchev born in Sofia, Bulgaria, 1977 @@ -257,6 +270,7 @@ 08/29 Thomas Gellekum born in Moenchengladbach, Nordrhein-Westfalen, Germany, 1967 08/29 Max Laier born in Karlsruhe, Germany, 1981 09/01 Pyun YongHyeon born in Kimcheon, Korea, 1968 +09/01 William Grzybowski born in Parana, Brazil, 1988 09/03 Max Khon born in Novosibirsk, USSR, 1976 09/03 Cheng-Lung Sung born in Taipei, Taiwan, Republic of China, 1977 09/05 Mark Robert Vaughan Murray born in Harare, Mashonaland, Zimbabwe, 1961 @@ -269,11 +283,14 @@ 09/12 Weongyo Jeong born in Haman, Korea, 1980 09/12 Benedict Christopher Reuschling born in Darmstadt, Germany, 1981 09/12 William C. Fumerola II born in Detroit, Michigan, United States, 1981 +09/14 Matthew Seaman born in Bristol, United Kingdom, 1965 09/15 Aleksandr Rybalko born in Odessa, Ukraine, 1977 09/15 Dima Panov born in Khabarovsk, Russian Federation, 1978 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 09/18 Matthew Fleming born in Cleveland, Ohio, United States, 1975 09/20 Kevin Lo born in Taipei, Taiwan, Republic of China, 1972 +09/21 Gleb Kurtsou born in Minsk, Belarus, 1984 +09/22 Bryan Drewery born in San Diego, California, United States, 1984 09/27 Neil Blakey-Milner born in Port Elizabeth, South Africa, 1978 09/27 Renato Botelho born in Araras, Sao Paulo, Brazil, 1979 09/28 Greg Lehey born in Melbourne, Victoria, Australia, 1948 @@ -282,6 +299,7 @@ 09/30 Hiten M. Pandya born in Dar-es-Salaam, Tanzania, East Africa, 1986 09/30 Third quarter status reports are due on 10/15 10/02 Beat Gaetzi born in Zurich, Switzerland, 1980 +10/02 Grzegorz Blach born in Starachowice, Poland, 1985 10/05 Hiroki Sato born in Yamagata, Japan, 1977 10/05 Chris Costello born in Houston, Texas, United States, 1985 10/09 Stefan Walter born in Werne, Nordrhein-Westfalen, Germany, 1978 @@ -299,6 +317,7 @@ 10/23 Mario Sergio Fujikawa Ferreira born in Brasilia, Distrito Federal, Brazil, 1976 10/25 Eric Melville born in Los Gatos, California, United States, 1980 10/25 Julien Laffaye born in Toulouse, France, 1988 +10/25 Ashish SHUKLA born in Kanpur, India, 1985 10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 @@ -306,6 +325,7 @@ 11/09 Antoine Brodin born in Bagnolet, France, 1981 11/10 Gregory Neil Shapiro born in Providence, Rhode Island, United States, 1970 11/13 John Baldwin born in Stuart, Virginia, United States, 1977 +11/14 Jeremie Le Hen born in Nancy, France, 1980 11/15 Lars Engels born in Hilden, Nordrhein-Westfalen, Germany, 1980 11/15 Tijl Coosemans born in Duffel, Belgium, 1983 11/16 Jose Maria Alcaide Salinas born in Madrid, Spain, 1962 @@ -322,7 +342,7 @@ 11/28 Stanislav Sedov born in Chelyabinsk, USSR, 1985 12/01 Hajimu Umemoto born in Nara, Japan, 1961 12/01 Alexey Dokuchaev born in Magadan, USSR, 1980 -12/02 Ermal Luçi born in Tirane, Albania, 1980 +12/02 Ermal Luçi born in Tirane, Albania, 1980 12/03 Diane Bruce born in Ottawa, Ontario, Canada, 1952 12/05 Ivan Voras born in Slavonski Brod, Croatia, 1981 12/06 Stefan Farfeleder born in Wien, Austria, 1980 @@ -336,6 +356,8 @@ 12/22 Maxim Sobolev born in Dnepropetrovsk, Ukraine, 1976 12/23 Sean Chittenden born in Seattle, Washington, United States, 1979 12/23 Alejandro Pulver born in Buenos Aires, Argentina, 1989 +12/24 Guido Falsi born in Firenze, Italy, 1978 +12/25 Niclas Zeising born in Stockholm, Sweden, 1986 12/28 Soren Schmidt born in Maribo, Denmark, 1960 12/28 Ade Lovett born in London, England, 1969 12/28 Marius Strobl born in Cham, Bavaria, Germany, 1978 Modified: stable/9/usr.bin/calendar/calendars/calendar.history ============================================================================== --- stable/9/usr.bin/calendar/calendars/calendar.history Sat Apr 13 21:41:51 2013 (r249450) +++ stable/9/usr.bin/calendar/calendars/calendar.history Sat Apr 13 22:29:13 2013 (r249451) @@ -302,7 +302,7 @@ 09/11 Terrorists destroy World Trade Center in New York, 2001 09/12 German paratroopers rescue Mussolini from captivity in Rome, 1943 09/12 Germany annexes Sudetenland, 1938 -09/13 58° C (136.4° F) measured at el Azizia, Libya, 1922 +09/13 58 °C (136.4 °F) measured at el Azizia, Libya, 1922 09/13 British defeat the French at the Plains of Abraham, just outside the walls of Quebec City, 1759 09/13 Building of Hadrian's Wall begun, 122 09/13 Chiang Kai-Shek becomes president of China, 1943 @@ -411,7 +411,7 @@ 11/09 Roosevelt establishes the Civil Works Administration, 1933 11/10 41 Women arrested in suffragette demonstrations near White House, 1917 11/10 Cpt. Wirz, commandant of Andersonville Prison hanged, 1865 -11/10 Henry Stanley asks David Livingston, "Dr. Livingston, I presume?", 1871 +11/10 Henry Stanley asks David Livingstone, "Dr. Livingstone, I presume?", 1871 11/11 Washington becomes the 42nd state, 1889 11/12 Dr. Sun Yat-sen's Birthday in Taiwan 11/12 USA first exports oil to Europe, 1861 Modified: stable/9/usr.bin/calendar/calendars/calendar.music ============================================================================== --- stable/9/usr.bin/calendar/calendars/calendar.music Sat Apr 13 21:41:51 2013 (r249450) +++ stable/9/usr.bin/calendar/calendars/calendar.music Sat Apr 13 22:29:13 2013 (r249451) @@ -225,7 +225,7 @@ 12/08 Jim Morrison is born in Melbourne, Florida, 1943 12/08 John Lennon is shot and killed in New York City, 1980 12/09 The Who's "Tommy" premieres in London, 1973 -12/11 (Louis) Hector Berlioz born in La-Côte-Saint-André, 1803 +12/11 (Louis) Hector Berlioz born in La-Côte-Saint-André, 1803 12/13 Ted Nugent, the motor city madman, born in Detroit, 1949 12/15 Thomas Edison receives patent on the phonograph, 1877 12/16 Don McLean's "American Pie" is released, 1971 Modified: stable/9/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.all ============================================================================== --- stable/9/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.all Sat Apr 13 21:41:51 2013 (r249450) +++ stable/9/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.all Sat Apr 13 22:29:13 2013 (r249451) @@ -4,9 +4,9 @@ * $FreeBSD$ */ -#ifndef _hr_HR_ISO8859_2_all -#define _hr_HR_ISO8859_2_all +#ifndef _hr_HR_ISO8859_2_all_ +#define _hr_HR_ISO8859_2_all_ #include -#endif /* !_hr_HR_ISO8859_2_all */ +#endif /* !_hr_HR_ISO8859_2_all_ */ Modified: stable/9/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.praznici ============================================================================== --- stable/9/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.praznici Sat Apr 13 21:41:51 2013 (r249450) +++ stable/9/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.praznici Sat Apr 13 22:29:13 2013 (r249451) @@ -4,8 +4,8 @@ * $FreeBSD$ */ -#ifndef _hr_HR_ISO8859_2_praznici -#define _hr_HR_ISO8859_2_praznici +#ifndef _hr_HR_ISO8859_2_praznici_ +#define _hr_HR_ISO8859_2_praznici_ LANG=hr_HR.ISO8859-2 @@ -41,4 +41,4 @@ Easter+39 Uza¹a¹æe 03/NedjeljaLast Poèetak ljetnog vremena 10/NedjeljaLast Kraj ljetnog vremena -#endif /* !_hr_HR_ISO8859_2_praznici */ +#endif /* !_hr_HR_ISO8859_2_praznici_ */ Modified: stable/9/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all ============================================================================== --- stable/9/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all Sat Apr 13 21:41:51 2013 (r249450) +++ stable/9/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all Sat Apr 13 22:29:13 2013 (r249451) @@ -4,8 +4,8 @@ * $FreeBSD$ */ -#ifndef _ru_RU_KOI8_R_all -#define _ru_RU_KOI8_R_all +#ifndef _ru_RU_KOI8_R_all_ +#define _ru_RU_KOI8_R_all_ #include #include @@ -13,4 +13,4 @@ #include #include -#endif /* !_ru_RU_KOI8_R_all */ +#endif /* !_ru_RU_KOI8_R_all_ */ From owner-svn-src-stable@FreeBSD.ORG Sat Apr 13 22:30:04 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 64B05A5F; Sat, 13 Apr 2013 22:30:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4750D163F; Sat, 13 Apr 2013 22:30:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DMU4wS015893; Sat, 13 Apr 2013 22:30:04 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DMU2rN015868; Sat, 13 Apr 2013 22:30:02 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201304132230.r3DMU2rN015868@svn.freebsd.org> From: Eitan Adler Date: Sat, 13 Apr 2013 22:30:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r249452 - in stable/8/usr.bin/calendar/calendars: . hr_HR.ISO8859-2 pt_BR.ISO8859-1 pt_BR.UTF-8 ru_RU.KOI8-R X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 22:30:04 -0000 Author: eadler Date: Sat Apr 13 22:30:02 2013 New Revision: 249452 URL: http://svnweb.freebsd.org/changeset/base/249452 Log: MFC r219937, r220094, r221383, r222307, r222817, r222994, r223545, r223638, r225846, r225853, r225854, r226121, r226320, r226351, r228991, r229164, r230876, r231274, r231516, r232105, r232353, r234221, r234320, r234446, r234600, r236392, r236733, r238058, r238976, r239498, r240362, r240548, r242549, r242849, r242900, r245447, r247752, r249113 Merge all outstanding calendar commits. Discussed with: gjb, des Added: stable/8/usr.bin/calendar/calendars/calendar.brazilian - copied unchanged from r219937, head/usr.bin/calendar/calendars/calendar.brazilian stable/8/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ - copied from r219937, head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ stable/8/usr.bin/calendar/calendars/pt_BR.UTF-8/ - copied from r219937, head/usr.bin/calendar/calendars/pt_BR.UTF-8/ Deleted: stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.msk Modified: stable/8/usr.bin/calendar/calendars/calendar.all stable/8/usr.bin/calendar/calendars/calendar.birthday stable/8/usr.bin/calendar/calendars/calendar.freebsd stable/8/usr.bin/calendar/calendars/calendar.history stable/8/usr.bin/calendar/calendars/calendar.music stable/8/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.all stable/8/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.praznici stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all Directory Properties: stable/8/usr.bin/calendar/calendars/ (props changed) Modified: stable/8/usr.bin/calendar/calendars/calendar.all ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.all Sat Apr 13 22:29:13 2013 (r249451) +++ stable/8/usr.bin/calendar/calendars/calendar.all Sat Apr 13 22:30:02 2013 (r249452) @@ -9,6 +9,7 @@ #include #include +#include #include #include #include Modified: stable/8/usr.bin/calendar/calendars/calendar.birthday ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.birthday Sat Apr 13 22:29:13 2013 (r249451) +++ stable/8/usr.bin/calendar/calendars/calendar.birthday Sat Apr 13 22:30:02 2013 (r249452) @@ -6,6 +6,7 @@ #ifndef _calendar_birthday_ #define _calendar_birthday_ +#undef unix 01/01 J.D. Salinger born, 1919 01/01 Paul Revere born in Boston, 1735 @@ -291,7 +292,7 @@ 12/12 E.G. Robinson born, 1893 12/14 George Washington dies, 1799 12/17 William Safire (Safir) born, 1929 -12/18 Konrad Zuse died in Hünfeld, 1995 +12/18 Konrad Zuse died in Hünfeld, 1995 12/20 Carl Sagan died, 1996 12/21 Benjamin Disraeli born, 1804 12/22 Giacomo Puccini born, 1858 Copied: stable/8/usr.bin/calendar/calendars/calendar.brazilian (from r219937, head/usr.bin/calendar/calendars/calendar.brazilian) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/usr.bin/calendar/calendars/calendar.brazilian Sat Apr 13 22:30:02 2013 (r249452, copy of r219937, head/usr.bin/calendar/calendars/calendar.brazilian) @@ -0,0 +1,13 @@ +/* + * $FreeBSD$ + * + * Brazilian calendar file(s), originally submitted by + * Renato Tambellini + */ + +#ifndef _calendar_brazilian_ +#define _calendar_brazilian_ + +#include + +#endif Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.freebsd Sat Apr 13 22:29:13 2013 (r249451) +++ stable/8/usr.bin/calendar/calendars/calendar.freebsd Sat Apr 13 22:30:02 2013 (r249452) @@ -22,6 +22,7 @@ 01/16 Ariff Abdullah born in Kuala Lumpur, Malaysia, 1978 01/16 Dmitry Sivachenko born in Moscow, USSR, 1978 01/16 Vanilla I. Shu born in Taipei, Taiwan, Republic of China, 1978 +01/17 Raphael Kubo da Costa born in Sao Paulo, Sao Paulo, Brazil, 1989 01/18 Dejan Lesjak born in Ljubljana, Slovenia, Yugoslavia, 1977 01/19 Marshall Kirk McKusick born in Wilmington, Delaware, United States, 1954 01/19 Ruslan Ermilov born in Simferopol, USSR, 1974 @@ -45,12 +46,15 @@ 02/01 Juli Mallett born in Washington, Pennsylvania, United States, 1985 02/02 Diomidis D. Spinellis born in Athens, Greece, 1967 02/02 Michael W Lucas born in Detroit, Michigan, United States, 1967 -02/02 Yoichi Nakayama born in Tsu, Mie, Japan, 1976 02/02 Dmitry Chagin born in Stalingrad, USSR, 1976 +02/02 Yoichi Nakayama born in Tsu, Mie, Japan, 1976 +02/03 Jason Helfman born in Royal Oak, Michigan, United States, 1972 +02/04 Eitan Adler born in West Hempstead, New York, United States, 1991 02/05 Frank Laszlo born in Howell, Michigan, United States, 1983 02/10 David Greenman born in Portland, Oregon, United States, 1968 02/10 Paul Richards born in Ammanford, Carmarthenshire, United Kingdom, 1968 02/10 Simon Barner born in Rosenheim, Bayern, Germany, 1980 +02/10 Jason E. Hale born in Pittsburgh, Pennsylvania, Unites States, 1982 02/13 Jesper Skriver born in Aarhus, Denmark, 1975 02/13 Steve Wills born in Lynchburg, Virginia, United States, 1975 02/13 Andrey Slusar born in Odessa, USSR, 1979 @@ -68,7 +72,6 @@ 02/24 Johan Karlsson born in Mariannelund, Sweden, 1974 02/24 Colin Percival born in Burnaby, Canada, 1981 02/26 Pietro Cerutti born in Faido, Switzerland, 1984 -05/19 Sofian Brabez born in Toulouse, France, 1984 02/28 Daichi GOTO born in Shimizu Suntou, Shizuoka, Japan, 1980 03/01 Hye-Shik Chang born in Daejeon, Republic of Korea, 1980 03/02 Cy Schubert born in Edmonton, Alberta, Canada, 1956 @@ -116,6 +119,7 @@ 04/03 Tong Liu born in Beijing, People's Republic of China, 1981 04/03 Gabor Pali born in Kunhegyes, Hungary, 1982 04/05 Stacey Son born in Burley, Idaho, United States, 1967 +04/06 Peter Jeremy born in Sydney, New South Wales, Australia, 1961 04/07 Edward Tomasz Napierala born in Wolsztyn, Poland, 1981 04/08 Jordan K. Hubbard born in Honolulu, Hawaii, United States, 1963 04/09 Ceri Davies born in Haverfordwest, Pembrokeshire, United Kingdom, 1976 @@ -124,10 +128,12 @@ 04/12 Ed Schouten born in Oss, the Netherlands, 1986 04/13 Oliver Braun born in Nuremberg, Bavaria, Germany, 1972 04/14 Crist J. Clark born in Milwaukee, Wisconsin, United States, 1970 +04/14 Glen J. Barber born in Wilkes-Barre, Pennsylvania, United States, 1981 04/15 David Malone born in Dublin, Ireland, 1973 04/17 Dryice Liu born in Jinan, Shandong, China, 1975 04/22 Joerg Wunsch born in Dresden, Sachsen, Germany, 1962 04/22 Jun Kuriyama born in Matsue, Shimane, Japan, 1973 +04/22 Jakub Klama born in Blachownia, Silesia, Poland, 1989 04/26 Rene Ladan born in Geldrop, the Netherlands, 1980 04/29 Adam Weinberger born in Berkeley, California, United States, 1980 04/29 Eric Anholt born in Portland, Oregon, United States, 1983 @@ -140,6 +146,7 @@ 05/08 Sean Kelly born in Walnut Creek, California, United States, 1982 05/09 Daniel Eischen born in Syracuse, New York, United States, 1963 05/09 Aaron Dalton born in Boise, Idaho, United States, 1973 +05/09 Jase Thew born in Abergavenny, Gwent, United Kingdom, 1974 05/10 Markus Brueffer born in Gronau, Nordrhein-Westfalen, Germany, 1977 05/11 Jesus Rodriguez born in Barcelona, Spain, 1972 05/11 Roman Kurakin born in Moscow, USSR, 1979 @@ -152,11 +159,13 @@ 05/17 Thomas Abthorpe born in Port Arthur, Ontario, Canada, 1968 05/19 Philippe Charnier born in Fontainebleau, France, 1966 05/19 Ian Dowse born in Dublin, Ireland, 1975 -05/20 Dan Moschuk died in Burlington, Ontario, Canada, 2010 +05/19 Sofian Brabez born in Toulouse, France, 1984 +05/20 Dan Moschuk died in Burlington, Ontario, Canada, 2010 05/21 Kris Kennaway born in Winnipeg, Manitoba, Canada, 1978 05/22 Clive Tong-I Lin born in Changhua, Taiwan, Republic of China, 1978 05/22 Michael Bushkov born in Rostov-on-Don, Russian Federation, 1985 05/22 Rui Paulo born in Evora, Portugal, 1986 +05/22 David Naylor born in Johannesburg, South Africa, 1988 05/23 Munechika Sumikawa born in Osaka, Osaka, Japan, 1972 05/24 Duncan McLennan Barclay born in London, Middlesex, United Kingdom, 1970 05/24 Oliver Lehmann born in Karlsburg, Germany, 1981 @@ -176,7 +185,8 @@ 06/04 Justin Gibbs born in San Pedro, California, United States, 1973 06/04 Jason Evans born in Greeley, Colorado, United States, 1973 06/04 Thomas Moestl born in Braunschweig, Niedersachsen, Germany, 1980 -06/04 Zack Kirsch born in Memphis, Tennessee, United States, 1982 +06/04 Devin Teske born in Arcadia, California, United States, 1982 +06/04 Zack Kirsch born in Memphis, Tennessee, United States, 1982 06/06 Sergei Kolobov born in Karpinsk, Russian Federation, 1972 06/06 Alan Eldridge died in Denver, Colorado, 2003 06/07 Jimmy Olgeni born in Milano, Italy, 1976 @@ -213,6 +223,7 @@ 07/11 Jesus R. Camou born in Hermosillo, Sonora, Mexico, 1983 07/15 Gary Jennejohn born in Rochester, New York, United States, 1950 07/16 Suleiman Souhlal born in Roma, Italy, 1983 +07/16 Davide Italiano born in Milazzo, Italy, 1989 07/17 Michael Chin-Yuan Wu born in Taipei, Taiwan, Republic of China, 1980 07/19 Masafumi NAKANE born in Okazaki, Aichi, Japan, 1972 07/19 Simon L. Nielsen born in Copenhagen, Denmark, 1980 @@ -222,6 +233,7 @@ 07/22 Jens Schweikhardt born in Waiblingen, Baden-Wuerttemberg, Germany, 1967 07/22 Lukas Ertl born in Weissenbach/Enns, Steiermark, Austria, 1976 07/23 Sergey A. Osokin born in Krasnogorsky, Stepnogorsk, Akmolinskaya region, Kazakhstan, 1972 +07/23 Andrey Zonov born in Kirov, Russian Federation, 1985 07/24 Alexander Nedotsukov born in Ulyanovsk, Russian Federation, 1974 07/24 Alberto Villa born in Vercelli, Italy, 1987 07/27 Andriy Gapon born in Kyrykivka, Sumy region, Ukraine, 1976 @@ -234,6 +246,7 @@ 08/05 Alfred Perlstein born in Brooklyn, New York, United States, 1978 08/06 Anton Berezin born in Dnepropetrovsk, Ukraine, 1970 08/06 John-Mark Gurney born in Detroit, Michigan, United States, 1978 +08/06 Damjan Marion born in Rijeka, Croatia, 1978 08/07 Jonathan Mini born in San Mateo, California, United States, 1979 08/08 Mikolaj Golub born in Kharkov, USSR, 1977 08/10 Peter Pentchev born in Sofia, Bulgaria, 1977 @@ -257,21 +270,27 @@ 08/29 Thomas Gellekum born in Moenchengladbach, Nordrhein-Westfalen, Germany, 1967 08/29 Max Laier born in Karlsruhe, Germany, 1981 09/01 Pyun YongHyeon born in Kimcheon, Korea, 1968 +09/01 William Grzybowski born in Parana, Brazil, 1988 09/03 Max Khon born in Novosibirsk, USSR, 1976 09/03 Cheng-Lung Sung born in Taipei, Taiwan, Republic of China, 1977 09/05 Mark Robert Vaughan Murray born in Harare, Mashonaland, Zimbabwe, 1961 09/05 Adrian Harold Chadd born in Perth, Western Australia, Australia, 1979 09/07 Tim Bishop born in Cornwall, United Kingdom, 1978 +09/07 Chris Rees born in Kettering, United Kingdom, 1987 09/08 Boris Samorodov born in Krasnodar, Russian Federation, 1963 09/09 Yoshio Mita born in Hiroshima, Japan, 1972 09/10 Wesley R. Peters born in Hartford, Alabama, United States, 1961 09/12 Weongyo Jeong born in Haman, Korea, 1980 09/12 Benedict Christopher Reuschling born in Darmstadt, Germany, 1981 09/12 William C. Fumerola II born in Detroit, Michigan, United States, 1981 +09/14 Matthew Seaman born in Bristol, United Kingdom, 1965 +09/15 Aleksandr Rybalko born in Odessa, Ukraine, 1977 09/15 Dima Panov born in Khabarovsk, Russian Federation, 1978 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 09/18 Matthew Fleming born in Cleveland, Ohio, United States, 1975 09/20 Kevin Lo born in Taipei, Taiwan, Republic of China, 1972 +09/21 Gleb Kurtsou born in Minsk, Belarus, 1984 +09/22 Bryan Drewery born in San Diego, California, United States, 1984 09/27 Neil Blakey-Milner born in Port Elizabeth, South Africa, 1978 09/27 Renato Botelho born in Araras, Sao Paulo, Brazil, 1979 09/28 Greg Lehey born in Melbourne, Victoria, Australia, 1948 @@ -280,6 +299,7 @@ 09/30 Hiten M. Pandya born in Dar-es-Salaam, Tanzania, East Africa, 1986 09/30 Third quarter status reports are due on 10/15 10/02 Beat Gaetzi born in Zurich, Switzerland, 1980 +10/02 Grzegorz Blach born in Starachowice, Poland, 1985 10/05 Hiroki Sato born in Yamagata, Japan, 1977 10/05 Chris Costello born in Houston, Texas, United States, 1985 10/09 Stefan Walter born in Werne, Nordrhein-Westfalen, Germany, 1978 @@ -290,12 +310,14 @@ 10/18 Sheldon Hearn born in Cape Town, Western Cape, South Africa, 1974 10/19 Nicholas Souchu born in Suresnes, Hauts-de-Seine, France, 1972 10/19 Nick Barkas born in Longview, Washington, United States, 1981 -10/20 Joel Dahl born in Lidkoping, Sweden, 1983 +10/20 Joel Dahl born in Bitterna, Skaraborg, Sweden, 1983 10/20 Dmitry Marakasov born in Moscow, Russian Federation, 1984 10/21 Ben Smithurst born in Sheffield, South Yorkshire, United Kingdom, 1981 10/22 Jean-Sebastien Pedron born in Redon, Ille-et-Vilaine, France, 1980 10/23 Mario Sergio Fujikawa Ferreira born in Brasilia, Distrito Federal, Brazil, 1976 10/25 Eric Melville born in Los Gatos, California, United States, 1980 +10/25 Julien Laffaye born in Toulouse, France, 1988 +10/25 Ashish SHUKLA born in Kanpur, India, 1985 10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 @@ -303,6 +325,7 @@ 11/09 Antoine Brodin born in Bagnolet, France, 1981 11/10 Gregory Neil Shapiro born in Providence, Rhode Island, United States, 1970 11/13 John Baldwin born in Stuart, Virginia, United States, 1977 +11/14 Jeremie Le Hen born in Nancy, France, 1980 11/15 Lars Engels born in Hilden, Nordrhein-Westfalen, Germany, 1980 11/15 Tijl Coosemans born in Duffel, Belgium, 1983 11/16 Jose Maria Alcaide Salinas born in Madrid, Spain, 1962 @@ -319,10 +342,11 @@ 11/28 Stanislav Sedov born in Chelyabinsk, USSR, 1985 12/01 Hajimu Umemoto born in Nara, Japan, 1961 12/01 Alexey Dokuchaev born in Magadan, USSR, 1980 -12/02 Ermal Luçi born in Tirane, Albania, 1980 +12/02 Ermal Luçi born in Tirane, Albania, 1980 12/03 Diane Bruce born in Ottawa, Ontario, Canada, 1952 12/05 Ivan Voras born in Slavonski Brod, Croatia, 1981 12/06 Stefan Farfeleder born in Wien, Austria, 1980 +12/11 Ganael Laplanche born in Reims, France, 1980 12/15 James FitzGibbon born in Amersham, Buckinghamshire, United Kingdom, 1974 12/15 Timur I. Bakeyev born in Kazan, Republic of Tatarstan, USSR, 1974 12/18 Chris Timmons born in Ellensburg, Washington, United States, 1964 @@ -332,6 +356,8 @@ 12/22 Maxim Sobolev born in Dnepropetrovsk, Ukraine, 1976 12/23 Sean Chittenden born in Seattle, Washington, United States, 1979 12/23 Alejandro Pulver born in Buenos Aires, Argentina, 1989 +12/24 Guido Falsi born in Firenze, Italy, 1978 +12/25 Niclas Zeising born in Stockholm, Sweden, 1986 12/28 Soren Schmidt born in Maribo, Denmark, 1960 12/28 Ade Lovett born in London, England, 1969 12/28 Marius Strobl born in Cham, Bavaria, Germany, 1978 Modified: stable/8/usr.bin/calendar/calendars/calendar.history ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.history Sat Apr 13 22:29:13 2013 (r249451) +++ stable/8/usr.bin/calendar/calendars/calendar.history Sat Apr 13 22:30:02 2013 (r249452) @@ -302,7 +302,7 @@ 09/11 Terrorists destroy World Trade Center in New York, 2001 09/12 German paratroopers rescue Mussolini from captivity in Rome, 1943 09/12 Germany annexes Sudetenland, 1938 -09/13 58° C (136.4° F) measured at el Azizia, Libya, 1922 +09/13 58 °C (136.4 °F) measured at el Azizia, Libya, 1922 09/13 British defeat the French at the Plains of Abraham, just outside the walls of Quebec City, 1759 09/13 Building of Hadrian's Wall begun, 122 09/13 Chiang Kai-Shek becomes president of China, 1943 @@ -411,7 +411,7 @@ 11/09 Roosevelt establishes the Civil Works Administration, 1933 11/10 41 Women arrested in suffragette demonstrations near White House, 1917 11/10 Cpt. Wirz, commandant of Andersonville Prison hanged, 1865 -11/10 Henry Stanley asks David Livingston, "Dr. Livingston, I presume?", 1871 +11/10 Henry Stanley asks David Livingstone, "Dr. Livingstone, I presume?", 1871 11/11 Washington becomes the 42nd state, 1889 11/12 Dr. Sun Yat-sen's Birthday in Taiwan 11/12 USA first exports oil to Europe, 1861 Modified: stable/8/usr.bin/calendar/calendars/calendar.music ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.music Sat Apr 13 22:29:13 2013 (r249451) +++ stable/8/usr.bin/calendar/calendars/calendar.music Sat Apr 13 22:30:02 2013 (r249452) @@ -225,7 +225,7 @@ 12/08 Jim Morrison is born in Melbourne, Florida, 1943 12/08 John Lennon is shot and killed in New York City, 1980 12/09 The Who's "Tommy" premieres in London, 1973 -12/11 (Louis) Hector Berlioz born in La-Côte-Saint-André, 1803 +12/11 (Louis) Hector Berlioz born in La-Côte-Saint-André, 1803 12/13 Ted Nugent, the motor city madman, born in Detroit, 1949 12/15 Thomas Edison receives patent on the phonograph, 1877 12/16 Don McLean's "American Pie" is released, 1971 Modified: stable/8/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.all ============================================================================== --- stable/8/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.all Sat Apr 13 22:29:13 2013 (r249451) +++ stable/8/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.all Sat Apr 13 22:30:02 2013 (r249452) @@ -4,9 +4,9 @@ * $FreeBSD$ */ -#ifndef _hr_HR_ISO8859_2_all -#define _hr_HR_ISO8859_2_all +#ifndef _hr_HR_ISO8859_2_all_ +#define _hr_HR_ISO8859_2_all_ #include -#endif /* !_hr_HR_ISO8859_2_all */ +#endif /* !_hr_HR_ISO8859_2_all_ */ Modified: stable/8/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.praznici ============================================================================== --- stable/8/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.praznici Sat Apr 13 22:29:13 2013 (r249451) +++ stable/8/usr.bin/calendar/calendars/hr_HR.ISO8859-2/calendar.praznici Sat Apr 13 22:30:02 2013 (r249452) @@ -4,8 +4,8 @@ * $FreeBSD$ */ -#ifndef _hr_HR_ISO8859_2_praznici -#define _hr_HR_ISO8859_2_praznici +#ifndef _hr_HR_ISO8859_2_praznici_ +#define _hr_HR_ISO8859_2_praznici_ LANG=hr_HR.ISO8859-2 @@ -41,4 +41,4 @@ Easter+39 Uza¹a¹æe 03/NedjeljaLast Poèetak ljetnog vremena 10/NedjeljaLast Kraj ljetnog vremena -#endif /* !_hr_HR_ISO8859_2_praznici */ +#endif /* !_hr_HR_ISO8859_2_praznici_ */ Modified: stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all ============================================================================== --- stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all Sat Apr 13 22:29:13 2013 (r249451) +++ stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all Sat Apr 13 22:30:02 2013 (r249452) @@ -4,14 +4,13 @@ * $FreeBSD$ */ -#ifndef _ru_RU_KOI8_R_all -#define _ru_RU_KOI8_R_all +#ifndef _ru_RU_KOI8_R_all_ +#define _ru_RU_KOI8_R_all_ #include #include #include -#include #include #include -#endif /* !_ru_RU_KOI8_R_all */ +#endif /* !_ru_RU_KOI8_R_all_ */