From owner-svn-src-stable-8@FreeBSD.ORG Sun Apr 7 17:06:28 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Mon Apr 8 08:33:32 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Mon Apr 8 19:50:16 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Mon Apr 8 20:45:12 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Mon Apr 8 22:32:38 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Mon Apr 8 22:56:41 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Mon Apr 8 23:01:34 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Mon Apr 8 23:06:26 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Tue Apr 9 15:35:28 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Wed Apr 10 17:51:15 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Thu Apr 11 22:09:00 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Fri Apr 12 14:23:21 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Fri Apr 12 14:32:29 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Fri Apr 12 19:36:55 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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-8@FreeBSD.ORG Sat Apr 13 22:30:04 2013 Return-Path: Delivered-To: svn-src-stable-8@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-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable 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_ */