PERFORCE change 117782 for review
Warner Losh
imp at FreeBSD.org
Mon Apr 9 22:34:05 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=117782
Change 117782 by imp at imp_paco-paco on 2007/04/09 22:33:35
IFC @117780
Affected files ...
.. //depot/projects/arm/src/sys/boot/forth/loader.conf#14 integrate
.. //depot/projects/arm/src/sys/cam/scsi/scsi_sg.c#2 integrate
.. //depot/projects/arm/src/sys/compat/opensolaris/sys/lock.h#1 branch
.. //depot/projects/arm/src/sys/compat/opensolaris/sys/mutex.h#2 integrate
.. //depot/projects/arm/src/sys/compat/opensolaris/sys/rwlock.h#2 integrate
.. //depot/projects/arm/src/sys/conf/files#67 integrate
.. //depot/projects/arm/src/sys/conf/files.ia64#9 integrate
.. //depot/projects/arm/src/sys/dev/cxgb/sys/uipc_mvec.c#2 integrate
.. //depot/projects/arm/src/sys/kern/kern_mib.c#4 integrate
.. //depot/projects/arm/src/sys/kern/vfs_mount.c#27 integrate
.. //depot/projects/arm/src/sys/modules/libalias/libalias/Makefile#2 integrate
.. //depot/projects/arm/src/sys/sys/kernel.h#7 integrate
.. //depot/projects/arm/src/sys/sys/sysctl.h#13 integrate
Differences ...
==== //depot/projects/arm/src/sys/boot/forth/loader.conf#14 (text+ko) ====
@@ -6,7 +6,7 @@
#
# All arguments must be in double quotes.
#
-# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.119 2007/04/09 00:04:54 pjd Exp $
+# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.120 2007/04/09 22:09:09 pjd Exp $
##############################################################
### Basic configuration options ############################
@@ -138,6 +138,7 @@
#umapfs_load="NO" # User-id map filesystem
unionfs_load="NO" # Union filesystem
xfs_load="NO" # XFS
+zfs_load="NO" # ZFS
# Related stuff
==== //depot/projects/arm/src/sys/cam/scsi/scsi_sg.c#2 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sg.c,v 1.1 2007/04/07 19:40:57 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sg.c,v 1.3 2007/04/09 05:47:32 scottl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -71,8 +71,8 @@
} sg_state;
typedef enum {
+ SG_RDWR_FREE,
SG_RDWR_INPROG,
- SG_RDWR_WAITING,
SG_RDWR_DONE
} sg_rdwr_state;
@@ -289,13 +289,12 @@
return (CAM_REQ_CMP_ERR);
}
- softc = (struct sg_softc *)malloc(sizeof(*softc), M_DEVBUF, M_NOWAIT);
+ softc = malloc(sizeof(*softc), M_DEVBUF, M_ZERO | M_NOWAIT);
if (softc == NULL) {
printf("sgregister: Unable to allocate softc\n");
return (CAM_REQ_CMP_ERR);
}
- bzero(softc, sizeof(*softc));
softc->state = SG_STATE_NORMAL;
softc->pd_type = SID_TYPE(&cgd->inq_data);
TAILQ_INIT(&softc->rdwr_done);
@@ -388,8 +387,7 @@
rdwr = done_ccb->ccb_h.ccb_rdwr;
state = rdwr->state;
rdwr->state = SG_RDWR_DONE;
- if (state == SG_RDWR_WAITING)
- wakeup(rdwr);
+ wakeup(rdwr);
break;
}
default:
@@ -507,6 +505,7 @@
* The linuxolator seems to have a hard time with this,
* so just return 0 and hope that apps can cope.
*/
+ td->td_retval[0] = 60*hz;
error = 0;
break;
case SG_IO:
@@ -679,7 +678,7 @@
periph = dev->si_drv1;
sc = periph->softc;
- rdwr = malloc(sizeof(*rdwr), M_DEVBUF, M_WAITOK);
+ rdwr = malloc(sizeof(*rdwr), M_DEVBUF, M_WAITOK | M_ZERO);
hdr = &rdwr->hdr.hdr;
/* Copy in the header block and sanity check it */
@@ -728,13 +727,13 @@
*/
buf_len = uio->uio_resid;
if (buf_len != 0) {
- buf = malloc(buf_len, M_DEVBUF, M_WAITOK);
+ buf = malloc(buf_len, M_DEVBUF, M_WAITOK | M_ZERO);
error = uiomove(buf, buf_len, uio);
if (error)
goto out_buf;
dir = CAM_DIR_OUT;
} else if (hdr->reply_len != 0) {
- buf = malloc(hdr->reply_len, M_DEVBUF, M_WAITOK);
+ buf = malloc(hdr->reply_len, M_DEVBUF, M_WAITOK | M_ZERO);
buf_len = hdr->reply_len;
dir = CAM_DIR_IN;
} else {
@@ -809,7 +808,6 @@
break;
}
if ((rdwr == NULL) || (rdwr->state != SG_RDWR_DONE)) {
- rdwr->state = SG_RDWR_WAITING;
if (tsleep(rdwr, PCATCH, "sgread", 0) == ERESTART)
return (EAGAIN);
goto search;
==== //depot/projects/arm/src/sys/compat/opensolaris/sys/mutex.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/compat/opensolaris/sys/mutex.h,v 1.1 2007/04/06 01:09:06 pjd Exp $
+ * $FreeBSD: src/sys/compat/opensolaris/sys/mutex.h,v 1.2 2007/04/09 01:05:31 pjd Exp $
*/
#ifndef _OPENSOLARIS_SYS_MUTEX_H_
@@ -48,6 +48,9 @@
#define mutex_init(lock, desc, type, arg) do { \
ASSERT((type) == MUTEX_DEFAULT); \
+ KASSERT(((lock)->lock_object.lo_flags & LO_ALLMASK) != \
+ LO_EXPECTED, ("lock %s already initialized", #lock)); \
+ bzero((lock), sizeof(struct sx)); \
sx_init_flags((lock), "zfs:" #lock, SX_DUPOK); \
} while (0)
#define mutex_destroy(lock) sx_destroy(lock)
==== //depot/projects/arm/src/sys/compat/opensolaris/sys/rwlock.h#2 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/compat/opensolaris/sys/rwlock.h,v 1.1 2007/04/06 01:09:06 pjd Exp $
+ * $FreeBSD: src/sys/compat/opensolaris/sys/rwlock.h,v 1.2 2007/04/09 01:05:31 pjd Exp $
*/
#ifndef _OPENSOLARIS_SYS_RWLOCK_H_
@@ -53,8 +53,12 @@
#define RW_LOCK_HELD(x) (rw_lock_held((x)))
#define RW_ISWRITER(x) (rw_iswriter(x))
-#define rw_init(lock, desc, type, arg) \
- sx_init_flags((lock), "zfs:" #lock, SX_DUPOK)
+#define rw_init(lock, desc, type, arg) do { \
+ KASSERT(((lock)->lock_object.lo_flags & LO_ALLMASK) != \
+ LO_EXPECTED, ("lock %s already initialized", #lock)); \
+ bzero((lock), sizeof(struct sx)); \
+ sx_init_flags((lock), "zfs:" #lock, SX_DUPOK); \
+} while (0)
#define rw_destroy(lock) sx_destroy(lock)
#define rw_enter(lock, how) do { \
if ((how) == RW_READER) \
==== //depot/projects/arm/src/sys/conf/files#67 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1192 2007/04/08 15:18:02 kmacy Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1194 2007/04/09 17:08:27 piso Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -1778,19 +1778,19 @@
netinet/ip_options.c optional inet
netinet/ip_output.c optional inet
netinet/raw_ip.c optional inet
-netinet/sctp_usrreq.c optional inet inet6 sctp
-netinet/sctp_pcb.c optional inet inet6 sctp
-netinet/sctputil.c optional inet inet6 sctp
+netinet/sctp_asconf.c optional inet inet6 sctp
+netinet/sctp_auth.c optional inet inet6 sctp
netinet/sctp_bsd_addr.c optional inet inet6 sctp
-netinet/sctp_timer.c optional inet inet6 sctp
+netinet/sctp_crc32.c optional inet inet6 sctp
+netinet/sctp_indata.c optional inet inet6 sctp
netinet/sctp_input.c optional inet inet6 sctp
netinet/sctp_output.c optional inet inet6 sctp
-netinet/sctp_indata.c optional inet inet6 sctp
-netinet/sctp_asconf.c optional inet inet6 sctp
+netinet/sctp_pcb.c optional inet inet6 sctp
netinet/sctp_peeloff.c optional inet inet6 sctp
-netinet/sctp_crc32.c optional inet inet6 sctp
-netinet/sctp_auth.c optional inet inet6 sctp
netinet/sctp_sysctl.c optional inet inet6 sctp
+netinet/sctp_timer.c optional inet inet6 sctp
+netinet/sctp_usrreq.c optional inet inet6 sctp
+netinet/sctputil.c optional inet inet6 sctp
netinet/tcp_debug.c optional tcpdebug
netinet/tcp_hostcache.c optional inet
netinet/tcp_input.c optional inet
@@ -1804,7 +1804,6 @@
netinet/libalias/alias.c optional libalias
netinet/libalias/alias_db.c optional libalias
netinet/libalias/alias_mod.c optional libalias
-netinet/libalias/alias_old.c optional libalias
netinet/libalias/alias_proxy.c optional libalias
netinet/libalias/alias_util.c optional libalias
netinet6/ah_aesxcbcmac.c optional ipsec
==== //depot/projects/arm/src/sys/conf/files.ia64#9 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.ia64,v 1.90 2006/10/23 13:23:12 ru Exp $
+# $FreeBSD: src/sys/conf/files.ia64,v 1.91 2007/04/09 14:02:18 kan Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -128,3 +128,4 @@
libkern/ia64/__umodsi3.S standard
libkern/ia64/bswap16.S standard
libkern/ia64/bswap32.S standard
+libkern/memset.c standard
==== //depot/projects/arm/src/sys/dev/cxgb/sys/uipc_mvec.c#2 (text+ko) ====
@@ -29,7 +29,7 @@
***************************************************************************/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cxgb/sys/uipc_mvec.c,v 1.2 2007/04/08 15:59:07 kmacy Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cxgb/sys/uipc_mvec.c,v 1.4 2007/04/09 17:05:54 kmacy Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -230,7 +230,7 @@
m->m_flags &= ~M_IOVEC;
uma_zfree(zone_mbuf, m);
}
-
+#if (!defined(__sparc64__) && !defined(__sun4v__))
struct mvec_sg_cb_arg {
int error;
bus_dma_segment_t seg;
@@ -322,3 +322,4 @@
return (error);
}
+#endif /* !__sparc64__ */
==== //depot/projects/arm/src/sys/kern/kern_mib.c#4 (text+ko) ====
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_mib.c,v 1.76 2005/08/21 18:03:31 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_mib.c,v 1.77 2007/04/09 19:18:09 pjd Exp $");
#include "opt_posix.h"
@@ -301,6 +301,9 @@
u_long hostid;
SYSCTL_ULONG(_kern, KERN_HOSTID, hostid, CTLFLAG_RW, &hostid, 0, "Host ID");
+char hostuuid[64] = "00000000-0000-0000-0000-000000000000";
+SYSCTL_STRING(_kern, KERN_HOSTUUID, hostuuid, CTLFLAG_RW, hostuuid,
+ sizeof(hostuuid), "Host UUID");
/*
* This is really cheating. These actually live in the libc, something
==== //depot/projects/arm/src/sys/kern/vfs_mount.c#27 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.254 2007/04/08 23:54:01 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.256 2007/04/09 21:10:04 njl Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -1312,7 +1312,7 @@
static LIST_HEAD(, root_hold_token) root_holds =
LIST_HEAD_INITIALIZER(&root_holds);
-static int root_mount_complete = 0;
+static int root_mount_complete;
/*
* Hold root mount.
@@ -1377,24 +1377,25 @@
root_mount_done(void)
{
+ /*
+ * Use a mutex to prevent the wakeup being missed and waiting for
+ * an extra 1 second sleep.
+ */
mtx_lock(&mountlist_mtx);
root_mount_complete = 1;
wakeup(&root_mount_complete);
mtx_unlock(&mountlist_mtx);
}
- /*
+/*
* Return true if root is already mounted.
*/
int
root_mounted(void)
{
- int mounted;
- mtx_lock(&mountlist_mtx);
- mounted = root_mount_complete;
- mtx_unlock(&mountlist_mtx);
- return (mounted);
+ /* No mutex is acquired here because int stores are atomic. */
+ return (root_mount_complete);
}
/*
==== //depot/projects/arm/src/sys/modules/libalias/libalias/Makefile#2 (text+ko) ====
@@ -1,8 +1,8 @@
-# $FreeBSD: src/sys/modules/libalias/libalias/Makefile,v 1.1 2006/09/26 23:26:51 piso Exp $
+# $FreeBSD: src/sys/modules/libalias/libalias/Makefile,v 1.2 2007/04/09 17:08:27 piso Exp $
.PATH: ${.CURDIR}/../../../netinet/libalias
KMOD= libalias
-SRCS= alias.c alias_db.c alias_proxy.c alias_util.c alias_old.c alias_mod.c
+SRCS= alias.c alias_db.c alias_proxy.c alias_util.c alias_mod.c
.include <bsd.kmod.mk>
==== //depot/projects/arm/src/sys/sys/kernel.h#7 (text+ko) ====
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)kernel.h 8.3 (Berkeley) 1/21/94
- * $FreeBSD: src/sys/sys/kernel.h,v 1.133 2007/04/05 20:40:47 pjd Exp $
+ * $FreeBSD: src/sys/sys/kernel.h,v 1.135 2007/04/09 22:29:13 pjd Exp $
*/
#ifndef _SYS_KERNEL_H_
@@ -56,6 +56,7 @@
/* 1.1 */
extern unsigned long hostid;
+extern char hostuuid[64];
extern char hostname[MAXHOSTNAMELEN];
extern char domainname[MAXHOSTNAMELEN];
extern char kernelname[MAXPATHLEN];
==== //depot/projects/arm/src/sys/sys/sysctl.h#13 (text+ko) ====
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* @(#)sysctl.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD: src/sys/sys/sysctl.h,v 1.145 2006/09/17 20:00:35 rwatson Exp $
+ * $FreeBSD: src/sys/sys/sysctl.h,v 1.146 2007/04/09 19:18:08 pjd Exp $
*/
#ifndef _SYS_SYSCTL_H_
@@ -389,7 +389,8 @@
#define KERN_USRSTACK 33 /* int: address of USRSTACK */
#define KERN_LOGSIGEXIT 34 /* int: do we log sigexit procs? */
#define KERN_IOV_MAX 35 /* int: value of UIO_MAXIOV */
-#define KERN_MAXID 36 /* number of valid kern ids */
+#define KERN_HOSTUUID 36 /* string: host UUID identifier */
+#define KERN_MAXID 37 /* number of valid kern ids */
#define CTL_KERN_NAMES { \
{ 0, 0 }, \
@@ -427,6 +428,7 @@
{ "usrstack", CTLTYPE_INT }, \
{ "logsigexit", CTLTYPE_INT }, \
{ "iov_max", CTLTYPE_INT }, \
+ { "hostuuid", CTLTYPE_STRING }, \
}
/*
More information about the p4-projects
mailing list