svn commit: r234450 - in head/sys/dev/ath: . ath_hal/ar5210 ath_hal/ar5211 ath_hal/ar5212 ath_hal/ar5312 ath_hal/ar5416

2012-04-18 Thread Adrian Chadd
Author: adrian
Date: Thu Apr 19 03:26:21 2012
New Revision: 234450
URL: http://svn.freebsd.org/changeset/base/234450

Log:
  Stop using the hardware register value byte order swapping for now,
  at least until I can root cause what's going on.
  
  The only platform I've seen this on is the AR9220 when attached to
  the AR71xx CPUs.  I get immediate PCIe bus errors and all subsequent
  accesses cause further MIPS bus exceptions.  I don't have any other
  big-endian platforms to test this on.
  
  If I get a chance (or two), I'll try to whack this on a bus analyser
  and see exactly what happens.
  
  I'd rather leave this on, especially for slower, embedded platforms.
  But the #ifdef hell is something I'm trying to avoid.

Modified:
  head/sys/dev/ath/ah_osdep.c
  head/sys/dev/ath/ah_osdep.h
  head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c
  head/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c
  head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c
  head/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c

Modified: head/sys/dev/ath/ah_osdep.c
==
--- head/sys/dev/ath/ah_osdep.c Thu Apr 19 03:20:13 2012(r234449)
+++ head/sys/dev/ath/ah_osdep.c Thu Apr 19 03:26:21 2012(r234450)
@@ -267,12 +267,7 @@ ath_hal_reg_write(struct ath_hal *ah, u_
}
if (ah->ah_config.ah_serialise_reg_war)
mtx_lock_spin(&ah_regser_mtx);
-#if _BYTE_ORDER == _BIG_ENDIAN
-   if (OS_REG_UNSWAPPED(reg))
-   bus_space_write_4(tag, h, reg, val);
-   else
-#endif
-   bus_space_write_stream_4(tag, h, reg, val);
+   bus_space_write_4(tag, h, reg, val);
if (ah->ah_config.ah_serialise_reg_war)
mtx_unlock_spin(&ah_regser_mtx);
 }
@@ -286,12 +281,7 @@ ath_hal_reg_read(struct ath_hal *ah, u_i
 
if (ah->ah_config.ah_serialise_reg_war)
mtx_lock_spin(&ah_regser_mtx);
-#if _BYTE_ORDER == _BIG_ENDIAN
-   if (OS_REG_UNSWAPPED(reg))
-   val = bus_space_read_4(tag, h, reg);
-   else
-#endif
-   val = bus_space_read_stream_4(tag, h, reg);
+   val = bus_space_read_4(tag, h, reg);
if (ah->ah_config.ah_serialise_reg_war)
mtx_unlock_spin(&ah_regser_mtx);
if (ath_hal_alq) {
@@ -343,12 +333,7 @@ ath_hal_reg_write(struct ath_hal *ah, u_
 
if (ah->ah_config.ah_serialise_reg_war)
mtx_lock_spin(&ah_regser_mtx);
-#if _BYTE_ORDER == _BIG_ENDIAN
-   if (OS_REG_UNSWAPPED(reg))
-   bus_space_write_4(tag, h, reg, val);
-   else
-#endif
-   bus_space_write_stream_4(tag, h, reg, val);
+   bus_space_write_4(tag, h, reg, val);
if (ah->ah_config.ah_serialise_reg_war)
mtx_unlock_spin(&ah_regser_mtx);
 }
@@ -362,12 +347,7 @@ ath_hal_reg_read(struct ath_hal *ah, u_i
 
if (ah->ah_config.ah_serialise_reg_war)
mtx_lock_spin(&ah_regser_mtx);
-#if _BYTE_ORDER == _BIG_ENDIAN
-   if (OS_REG_UNSWAPPED(reg))
-   val = bus_space_read_4(tag, h, reg);
-   else
-#endif
-   val = bus_space_read_stream_4(tag, h, reg);
+   val = bus_space_read_4(tag, h, reg);
if (ah->ah_config.ah_serialise_reg_war)
mtx_unlock_spin(&ah_regser_mtx);
return val;

Modified: head/sys/dev/ath/ah_osdep.h
==
--- head/sys/dev/ath/ah_osdep.h Thu Apr 19 03:20:13 2012(r234449)
+++ head/sys/dev/ath/ah_osdep.h Thu Apr 19 03:26:21 2012(r234450)
@@ -97,39 +97,13 @@ struct ath_hal;
 extern void ath_hal_reg_write(struct ath_hal *ah, u_int reg, u_int32_t val);
 extern u_int32_t ath_hal_reg_read(struct ath_hal *ah, u_int reg);
 #else
-/*
- * The hardware registers are native little-endian byte order.
- * Big-endian hosts are handled by enabling hardware byte-swap
- * of register reads and writes at reset.  But the PCI clock
- * domain registers are not byte swapped!  Thus, on big-endian
- * platforms we have to explicitly byte-swap those registers.
- * Most of this code is collapsed at compile time because the
- * register values are constants.
- */
-#if _BYTE_ORDER == _BIG_ENDIAN
-#define OS_REG_WRITE(_ah, _reg, _val) do { \
-   if (OS_REG_UNSWAPPED(_reg)) \
-   bus_space_write_4((bus_space_tag_t)(_ah)->ah_st,\
-   (bus_space_handle_t)(_ah)->ah_sh, (_reg), (_val));  \
-   else\
-   bus_space_write_stream_4((bus_space_tag_t)(_ah)->ah_st, \
-   (bus_space_handle_t)(_ah)->ah_sh, (_reg), (_val));  \
-} while (0)
-#define OS_REG_READ(_ah, _reg) \
-   (OS_REG_UNSWAPPED(_reg) ?   \
-   bus_space_

svn commit: r234449 - in head: contrib/file contrib/file/Magdir contrib/file/tests lib/libmagic usr.bin/file

2012-04-18 Thread David E. O'Brien
Author: obrien
Date: Thu Apr 19 03:20:13 2012
New Revision: 234449
URL: http://svn.freebsd.org/changeset/base/234449

Log:
  Update file(1) to version 5.11.

Added:
  head/contrib/file/Magdir/assembler
 - copied unchanged from r234250, vendor/file/dist/Magdir/assembler
  head/contrib/file/Magdir/blcr
 - copied unchanged from r234250, vendor/file/dist/Magdir/blcr
  head/contrib/file/Magdir/bsi
 - copied unchanged from r234250, vendor/file/dist/Magdir/bsi
  head/contrib/file/Magdir/cups
 - copied unchanged from r234250, vendor/file/dist/Magdir/cups
  head/contrib/file/Magdir/ebml
 - copied unchanged from r234250, vendor/file/dist/Magdir/ebml
  head/contrib/file/Magdir/fusecompress
 - copied unchanged from r234250, vendor/file/dist/Magdir/fusecompress
  head/contrib/file/Magdir/geo
 - copied unchanged from r234250, vendor/file/dist/Magdir/geo
  head/contrib/file/Magdir/guile
 - copied unchanged from r234250, vendor/file/dist/Magdir/guile
  head/contrib/file/Magdir/isz
 - copied unchanged from r234250, vendor/file/dist/Magdir/isz
  head/contrib/file/Magdir/m4
 - copied unchanged from r234250, vendor/file/dist/Magdir/m4
  head/contrib/file/Magdir/make
 - copied unchanged from r234250, vendor/file/dist/Magdir/make
  head/contrib/file/Magdir/marc21
 - copied unchanged from r234250, vendor/file/dist/Magdir/marc21
  head/contrib/file/Magdir/metastore
 - copied unchanged from r234250, vendor/file/dist/Magdir/metastore
  head/contrib/file/Magdir/msooxml
 - copied unchanged from r234250, vendor/file/dist/Magdir/msooxml
  head/contrib/file/Magdir/music
 - copied unchanged from r234250, vendor/file/dist/Magdir/music
  head/contrib/file/Magdir/oasis
 - copied unchanged from r234250, vendor/file/dist/Magdir/oasis
  head/contrib/file/Magdir/parrot
 - copied unchanged from r234250, vendor/file/dist/Magdir/parrot
  head/contrib/file/Magdir/pascal
 - copied unchanged from r234250, vendor/file/dist/Magdir/pascal
  head/contrib/file/Magdir/rinex
 - copied unchanged from r234250, vendor/file/dist/Magdir/rinex
  head/contrib/file/Magdir/selinux
 - copied unchanged from r234250, vendor/file/dist/Magdir/selinux
  head/contrib/file/Magdir/sisu
 - copied unchanged from r234250, vendor/file/dist/Magdir/sisu
  head/contrib/file/Magdir/smile
 - copied unchanged from r234250, vendor/file/dist/Magdir/smile
  head/contrib/file/Magdir/ssh
 - copied unchanged from r234250, vendor/file/dist/Magdir/ssh
  head/contrib/file/Magdir/ssl
 - copied unchanged from r234250, vendor/file/dist/Magdir/ssl
  head/contrib/file/Magdir/tcl
 - copied unchanged from r234250, vendor/file/dist/Magdir/tcl
  head/contrib/file/Magdir/virtual
 - copied unchanged from r234250, vendor/file/dist/Magdir/virtual
  head/contrib/file/Magdir/wsdl
 - copied unchanged from r234250, vendor/file/dist/Magdir/wsdl
  head/contrib/file/Magdir/zfs
 - copied unchanged from r234250, vendor/file/dist/Magdir/zfs
  head/contrib/file/getline.c
 - copied unchanged from r234250, vendor/file/dist/getline.c
Deleted:
  head/contrib/file/Magdir/alpha
  head/contrib/file/Magdir/psion
  head/contrib/file/patchlevel.h
Modified:
  head/contrib/file/ChangeLog
  head/contrib/file/Header
  head/contrib/file/INSTALL
  head/contrib/file/Magdir/acorn
  head/contrib/file/Magdir/adi
  head/contrib/file/Magdir/adventure
  head/contrib/file/Magdir/allegro
  head/contrib/file/Magdir/alliant
  head/contrib/file/Magdir/amanda
  head/contrib/file/Magdir/amigaos
  head/contrib/file/Magdir/animation
  head/contrib/file/Magdir/apl
  head/contrib/file/Magdir/apple
  head/contrib/file/Magdir/applix
  head/contrib/file/Magdir/archive
  head/contrib/file/Magdir/asterix
  head/contrib/file/Magdir/att3b
  head/contrib/file/Magdir/audio
  head/contrib/file/Magdir/basis
  head/contrib/file/Magdir/bflt
  head/contrib/file/Magdir/blender
  head/contrib/file/Magdir/blit
  head/contrib/file/Magdir/bout
  head/contrib/file/Magdir/bsdi
  head/contrib/file/Magdir/btsnoop
  head/contrib/file/Magdir/c-lang
  head/contrib/file/Magdir/c64
  head/contrib/file/Magdir/cad
  head/contrib/file/Magdir/cafebabe
  head/contrib/file/Magdir/cddb
  head/contrib/file/Magdir/chord
  head/contrib/file/Magdir/cisco
  head/contrib/file/Magdir/citrus
  head/contrib/file/Magdir/clarion
  head/contrib/file/Magdir/claris
  head/contrib/file/Magdir/clipper
  head/contrib/file/Magdir/commands
  head/contrib/file/Magdir/communications
  head/contrib/file/Magdir/compress
  head/contrib/file/Magdir/console
  head/contrib/file/Magdir/convex
  head/contrib/file/Magdir/cracklib
  head/contrib/file/Magdir/ctags
  head/contrib/file/Magdir/dact
  head/contrib/file/Magdir/database
  head/contrib/file/Magdir/diamond
  head/contrib/file/Magdir/diff
  head/contrib/file/Magdir/digital
  head/contrib/file/Magdir/dolby
  head/contrib/file/Magdir/dump
  head/contrib/file/Magdir/dyadic
  head/contrib/file/Magdir/editors
  head/contrib/file/Magdir/efi
  head/co

Re: svn commit: r234425 - in head: sbin/iscontrol sys/modules/iscsi/initiator

2012-04-18 Thread Garrett Cooper
On Apr 18, 2012, at 9:47 AM, Josh Paetzel  wrote:

> Author: jpaetzel
> Date: Wed Apr 18 16:47:57 2012
> New Revision: 234425
> URL: http://svn.freebsd.org/changeset/base/234425
> 
> Log:
> Unbreak tinderbox.
> 
> Fix FreeBSD paradigms in the upstream code.
> 
> PR:bin/166933
> Submitted by:Garrett Cooper 
> 
> Modified:
> head/sbin/iscontrol/Makefile
> head/sbin/iscontrol/iscontrol.c
> head/sys/modules/iscsi/initiator/Makefile
> 
> Modified: head/sbin/iscontrol/Makefile
> ==
> --- head/sbin/iscontrol/MakefileWed Apr 18 16:29:55 2012(r234424)
> +++ head/sbin/iscontrol/MakefileWed Apr 18 16:47:57 2012(r234425)
> @@ -7,8 +7,7 @@ LDADD= -lcam -lmd
> S= ${.CURDIR}/../../sys
> 
> WARNS?=3
> -CFLAGS += -I$S
> -CFLAGS += -g -DDEBUG
> +CFLAGS+=-I$S
> 
> MAN= iscsi.conf.5 iscontrol.8
> 
> 
> Modified: head/sbin/iscontrol/iscontrol.c
> ==
> --- head/sbin/iscontrol/iscontrol.cWed Apr 18 16:29:55 2012(r234424)
> +++ head/sbin/iscontrol/iscontrol.cWed Apr 18 16:47:57 2012(r234425)
> @@ -44,13 +44,15 @@ __FBSDID("$FreeBSD$");
> #include 
> #include 
> #include 
> -#include 
> -#include 
> -#include 
> -#include 
> +#include 
> #include 
> #include 
> +#include 
> +#include 
> +#include 
> +#include 
> #include 
> +#include 
> #include 
> 
> #include 
> @@ -111,6 +113,13 @@ isc_opt_t opvals = {
> .immediateData= TRUE,
> };
> 
> +static void
> +usage(const char *pname)
> +{
> +fprintf(stderr, "usage: %s " USAGE "\n", pname);
> +exit(1);
> +}
> +
> int
> lookup(token_t *tbl, char *m)
> {
> @@ -135,8 +144,8 @@ main(int cc, char **vv)
> iscsidev = "/dev/"ISCSIDEV;
> fd = NULL;
> pname = vv[0];
> - if((p = strrchr(pname, '/')) != NULL)
> -  pname = p + 1;
> + if ((pname = basename(pname)) == NULL)
> +  err(1, "basename");
> 
> kw = ta = 0;
> disco = 0;
> @@ -145,17 +154,21 @@ main(int cc, char **vv)
>  | check for driver & controller version match
>  */
> n = 0;
> - if(sysctlbyname("net.iscsi_initiator.driver_version", 0, &n, 0, 0) != 0)
> -  perror("sysctlbyname");
> - v = malloc(n+1);
> - if(sysctlbyname("net.iscsi_initiator.driver_version", v, &n, 0, 0) != 0)
> -  perror("sysctlbyname");
> -
> - if(strncmp(version, v, 3)) {
> -  fprintf(stderr, "versions missmatch\n");
> -  exit(1);
> +#define VERSION_OID_S"net.iscsi_initiator.driver_version"
> + if (sysctlbyname(VERSION_OID_S, 0, &n, 0, 0) != 0) {
> +  if (errno == ENOENT)
> +errx(1, "sysctlbyname(\"" VERSION_OID_S "\") "
> +"failed; is the iscsi driver loaded?");
> +  err(1, "sysctlbyname(\"" VERSION_OID_S "\")");
> }
> + v = malloc(n+1);
> + if (v == NULL)
> +  err(1, "malloc");
> + if (sysctlbyname(VERSION_OID_S, v, &n, 0, 0) != 0)
> +  err(1, "sysctlbyname");
> 
> + if (strncmp(version, v, 3) != 0)
> +  errx(1, "versions mismatch");
> 
> while((ch = getopt(cc, vv, OPTIONS)) != -1) {
> switch(ch) {
> @@ -164,10 +177,8 @@ main(int cc, char **vv)
>  break;
> case 'c':
>  fd = fopen(optarg, "r");
> -   if(fd == NULL) {
> -perror(optarg);
> -exit(1);
> -   }
> +   if (fd == NULL)
> +err(1, "fopen(\"%s\")", optarg);
>  break;
> case 'd':
>  disco = 1;
> @@ -182,9 +193,7 @@ main(int cc, char **vv)
>  pidfile = optarg;
>  break;
> default:
> -  badu:
> -   fprintf(stderr, "Usage: %s %s\n", pname, USAGE);
> -   exit(1);
> +   usage(pname);
> }
> }
> if(fd == NULL)
> @@ -205,8 +214,8 @@ main(int cc, char **vv)
> op->targetAddress = ta;
> 
> if(op->targetAddress == NULL) {
> -  fprintf(stderr, "No target!\n");
> -  goto badu;
> +  warnx("no target specified!");
> +  usage(pname);
> }
> q = op->targetAddress;
> if(*q == '[' && (q = strchr(q, ']')) != NULL) {
> @@ -224,7 +233,7 @@ main(int cc, char **vv)
> op->targetPortalGroupTag = atoi(p);
> }
> if(op->initiatorName == 0) {
> -  charhostname[256];
> +  charhostname[MAXHOSTNAMELEN];
> 
> if(op->iqn) {
>  if(gethostname(hostname, sizeof(hostname)) == 0)
> 
> Modified: head/sys/modules/iscsi/initiator/Makefile
> ==
> --- head/sys/modules/iscsi/initiator/MakefileWed Apr 18 16:29:55 2012
> (r234424)
> +++ head/sys/modules/iscsi/initiator/MakefileWed Apr 18 16:47:57 2012
> (r234425)
> @@ -10,7 +10,9 @@ SRCS+= iscsi.c isc_cam.c isc_soc.c isc_s
> SRCS+= opt_cam.h opt_iscsi_initiator.h
> SRCS+= bus_if.h device_if.h
> #CFLAGS+= -DNO_USE_MBUF
> +CFLAGS+= -DISCSI_INITIATOR_DEBUG=2
> #CFLAGS+= -DISCSI_INITIATOR_DEBUG=2
> +CFLAGS+= -DINVARIANTS
> CFLAG

svn commit: r234446 - head/usr.bin/calendar/calendars

2012-04-18 Thread Devin Teske
Author: dteske
Date: Wed Apr 18 22:56:46 2012
New Revision: 234446
URL: http://svn.freebsd.org/changeset/base/234446

Log:
  Add my birth date/place to the calendar as new committer.
  
  Approved by:  emaste (mentor)

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==
--- head/usr.bin/calendar/calendars/calendar.freebsdWed Apr 18 21:08:53 
2012(r234445)
+++ head/usr.bin/calendar/calendars/calendar.freebsdWed Apr 18 22:56:46 
2012(r234446)
@@ -181,6 +181,7 @@
 06/04  Justin Gibbs  born in San Pedro, California, United 
States, 1973
 06/04  Jason Evans  born in Greeley, Colorado, United 
States, 1973
 06/04  Thomas Moestl  born in Braunschweig, Niedersachsen, 
Germany, 1980
+06/04  Devin Teske  born in Arcadia, California, United 
States, 1982
 06/04  Zack Kirsch  born in Memphis, Tennessee, United 
States, 1982
 06/06  Sergei Kolobov  born in Karpinsk, Russian 
Federation, 1972
 06/06  Alan Eldridge  died in Denver, Colorado, 2003
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r233700 - head/sys/kern

2012-04-18 Thread Dimitry Andric

On 2012-04-18 15:54, John Baldwin wrote:
...

http://www.FreeBSD.org/~jhb/patches/asr_stailq.patch


Yes, that seems to work just fine, at least for the list juggling.  Thanks!

The only additional fix needed now is the following.  Shall I commit
that including your patch?

Index: sys/dev/asr/asr.c
===
--- sys/dev/asr/asr.c   (revision 234390)
+++ sys/dev/asr/asr.c   (working copy)
@@ -2700,7 +2701,7 @@ asr_action(struct cam_sim *sim, union ccb  *ccb)
 
 	ccb->ccb_h.spriv_ptr0 = sc = (struct Asr_softc *)cam_sim_softc(sim);
 
-	switch (ccb->ccb_h.func_code) {

+   switch ((int)ccb->ccb_h.func_code) {
 
 	/* Common cases first */

case XPT_SCSI_IO:   /* Execute the requested I/O operation */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234443 - head/sys/kern

2012-04-18 Thread Kirk McKusick
Author: mckusick
Date: Wed Apr 18 19:34:20 2012
New Revision: 234443
URL: http://svn.freebsd.org/changeset/base/234443

Log:
  Delete a no longer useful VNASSERT missed during changes in 234400.
  
  Suggested by: kib

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cWed Apr 18 19:31:52 2012(r234442)
+++ head/sys/kern/vfs_subr.cWed Apr 18 19:34:20 2012(r234443)
@@ -2369,8 +2369,6 @@ vdropl(struct vnode *vp)
("vnode already free"));
VNASSERT(VSHOULDFREE(vp), vp,
("vdropl: freeing when we shouldn't"));
-   VNASSERT((vp->v_iflag & VI_DOOMED) == 0, vp,
-   ("vdropl: Freeing doomed vnode"));
if (vp->v_iflag & VI_AGE) {
TAILQ_INSERT_HEAD(&vnode_free_list, vp, v_freelist);
} else {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234441 - head/sys/kern

2012-04-18 Thread Kirk McKusick
Author: mckusick
Date: Wed Apr 18 19:30:22 2012
New Revision: 234441
URL: http://svn.freebsd.org/changeset/base/234441

Log:
  Fix a memory leak of M_VNODE_MARKER introduced in 234386.
  
  Found by:  Peter Holm

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cWed Apr 18 19:25:37 2012(r234440)
+++ head/sys/kern/vfs_subr.cWed Apr 18 19:30:22 2012(r234441)
@@ -4528,10 +4528,10 @@ __mnt_vnode_first_all(struct vnode **mvp
 
/* Check if we are done */
if (vp == NULL) {
-   *mvp = NULL;
MNT_REL(mp);
MNT_IUNLOCK(mp);
free(*mvp, M_VNODE_MARKER);
+   *mvp = NULL;
return (NULL);
}
(*mvp)->v_mount = mp;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234430 - head/share/misc

2012-04-18 Thread Devin Teske
Author: dteske
Date: Wed Apr 18 18:35:19 2012
New Revision: 234430
URL: http://svn.freebsd.org/changeset/base/234430

Log:
  Add myself as a new committer.
  
  Approved by:  emaste (mentor)

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Wed Apr 18 18:31:11 2012
(r234429)
+++ head/share/misc/committers-src.dot  Wed Apr 18 18:35:19 2012
(r234430)
@@ -127,6 +127,7 @@ dfr [label="Doug Rabson\n...@freebsd.org
 dg [label="David Greenman\n...@freebsd.org\n1993/06/14"]
 dim [label="Dimitry Andric\n...@freebsd.org\n2010/08/30"]
 dougb [label="Doug Barton\ndo...@freebsd.org\n2000/10/26"]
+dteske [label="Devin Teske\ndte...@freebsd.org\n2012/04/10"]
 dwmalone [label="David Malone\ndwmal...@freebsd.org\n2000/07/11"]
 ed [label="Ed Schouten\n...@freebsd.org\n2008/05/22"]
 edwin [label="Edwin Groothuis\ned...@freebsd.org\n2007/06/25"]
@@ -362,6 +363,7 @@ eivind -> des
 eivind -> rwatson
 
 emaste -> rstone
+emaste -> dteske
 
 emax -> markus
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234427 - head/sys/modules/uart

2012-04-18 Thread Marcel Moolenaar
Author: marcel
Date: Wed Apr 18 17:44:05 2012
New Revision: 234427
URL: http://svn.freebsd.org/changeset/base/234427

Log:
  Compensate for the replacement of uart_cpu_{amd64|i386}.c with
  uart_cpu_x86.c
  
  Pointy hat: marcel

Modified:
  head/sys/modules/uart/Makefile

Modified: head/sys/modules/uart/Makefile
==
--- head/sys/modules/uart/Makefile  Wed Apr 18 17:12:04 2012
(r234426)
+++ head/sys/modules/uart/Makefile  Wed Apr 18 17:44:05 2012
(r234427)
@@ -7,16 +7,23 @@ uart_bus_ebus=uart_bus_ebus.c
 ofw_bus_if=ofw_bus_if.h
 .endif
 
+.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
+_uart_cpu=uart_cpu_x86.c
+.else
+_uart_cpu=uart_cpu_${MACHINE}.c
+.endif
+.if exists(${.CURDIR:H:H}/dev/uart/${_uart_cpu})
+uart_cpu_machine= ${_uart_cpu}
+.endif
+
 KMOD=  uart
 SRCS=  uart_bus_acpi.c ${uart_bus_ebus} uart_bus_isa.c uart_bus_pccard.c \
uart_bus_pci.c uart_bus_puc.c uart_bus_scc.c \
-   uart_core.c uart_dbg.c \
+   uart_core.c ${uart_cpu_machine} uart_dbg.c \
uart_dev_ns8250.c uart_dev_quicc.c uart_dev_sab82532.c \
uart_dev_z8530.c \
uart_if.c uart_if.h uart_subr.c uart_tty.c
-.if exists(${.CURDIR}/../../dev/uart/uart_cpu_${MACHINE}.c)
-SRCS+= uart_cpu_${MACHINE}.c
-.endif
+
 SRCS+= bus_if.h card_if.h device_if.h isa_if.h ${ofw_bus_if} pci_if.h \
power_if.h pccarddevs.h serdev_if.h
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234425 - in head: sbin/iscontrol sys/modules/iscsi/initiator

2012-04-18 Thread Josh Paetzel
Author: jpaetzel
Date: Wed Apr 18 16:47:57 2012
New Revision: 234425
URL: http://svn.freebsd.org/changeset/base/234425

Log:
  Unbreak tinderbox.
  
  Fix FreeBSD paradigms in the upstream code.
  
  PR:   bin/166933
  Submitted by: Garrett Cooper 

Modified:
  head/sbin/iscontrol/Makefile
  head/sbin/iscontrol/iscontrol.c
  head/sys/modules/iscsi/initiator/Makefile

Modified: head/sbin/iscontrol/Makefile
==
--- head/sbin/iscontrol/MakefileWed Apr 18 16:29:55 2012
(r234424)
+++ head/sbin/iscontrol/MakefileWed Apr 18 16:47:57 2012
(r234425)
@@ -7,8 +7,7 @@ LDADD= -lcam -lmd
 S= ${.CURDIR}/../../sys
 
 WARNS?=3
-CFLAGS += -I$S
-CFLAGS += -g -DDEBUG
+CFLAGS+=   -I$S
 
 MAN= iscsi.conf.5 iscontrol.8
 

Modified: head/sbin/iscontrol/iscontrol.c
==
--- head/sbin/iscontrol/iscontrol.c Wed Apr 18 16:29:55 2012
(r234424)
+++ head/sbin/iscontrol/iscontrol.c Wed Apr 18 16:47:57 2012
(r234425)
@@ -44,13 +44,15 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
+#include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 #include 
+#include 
 #include 
 
 #include 
@@ -111,6 +113,13 @@ isc_opt_t opvals = {
  .immediateData= TRUE,
 };
 
+static void
+usage(const char *pname)
+{
+   fprintf(stderr, "usage: %s " USAGE "\n", pname);
+   exit(1);
+}
+
 int
 lookup(token_t *tbl, char *m)
 {
@@ -135,8 +144,8 @@ main(int cc, char **vv)
  iscsidev = "/dev/"ISCSIDEV;
  fd = NULL;
  pname = vv[0];
- if((p = strrchr(pname, '/')) != NULL)
- pname = p + 1;
+ if ((pname = basename(pname)) == NULL)
+ err(1, "basename");
 
  kw = ta = 0;
  disco = 0;
@@ -145,17 +154,21 @@ main(int cc, char **vv)
   | check for driver & controller version match
   */
  n = 0;
- if(sysctlbyname("net.iscsi_initiator.driver_version", 0, &n, 0, 0) != 0)
- perror("sysctlbyname");
- v = malloc(n+1);
- if(sysctlbyname("net.iscsi_initiator.driver_version", v, &n, 0, 0) != 0)
- perror("sysctlbyname");
-
- if(strncmp(version, v, 3)) {
- fprintf(stderr, "versions missmatch\n");
- exit(1);
+#define VERSION_OID_S  "net.iscsi_initiator.driver_version"
+ if (sysctlbyname(VERSION_OID_S, 0, &n, 0, 0) != 0) {
+ if (errno == ENOENT)
+   errx(1, "sysctlbyname(\"" VERSION_OID_S "\") "
+   "failed; is the iscsi driver loaded?");
+ err(1, "sysctlbyname(\"" VERSION_OID_S "\")");
  }
+ v = malloc(n+1);
+ if (v == NULL)
+ err(1, "malloc");
+ if (sysctlbyname(VERSION_OID_S, v, &n, 0, 0) != 0)
+ err(1, "sysctlbyname");
 
+ if (strncmp(version, v, 3) != 0)
+ errx(1, "versions mismatch");
 
  while((ch = getopt(cc, vv, OPTIONS)) != -1) {
  switch(ch) {
@@ -164,10 +177,8 @@ main(int cc, char **vv)
   break;
  case 'c':
   fd = fopen(optarg, "r");
-  if(fd == NULL) {
-   perror(optarg);
-   exit(1);
-  }
+  if (fd == NULL)
+   err(1, "fopen(\"%s\")", optarg);
   break;
  case 'd':
   disco = 1;
@@ -182,9 +193,7 @@ main(int cc, char **vv)
   pidfile = optarg;
   break;
  default:
- badu:
-  fprintf(stderr, "Usage: %s %s\n", pname, USAGE);
-  exit(1);
+  usage(pname);
  }
  }
  if(fd == NULL)
@@ -205,8 +214,8 @@ main(int cc, char **vv)
  op->targetAddress = ta;
 
  if(op->targetAddress == NULL) {
- fprintf(stderr, "No target!\n");
- goto badu;
+ warnx("no target specified!");
+ usage(pname);
  }
  q = op->targetAddress;
  if(*q == '[' && (q = strchr(q, ']')) != NULL) {
@@ -224,7 +233,7 @@ main(int cc, char **vv)
  op->targetPortalGroupTag = atoi(p);
  }
  if(op->initiatorName == 0) {
- char  hostname[256];
+ char  hostname[MAXHOSTNAMELEN];
 
  if(op->iqn) {
   if(gethostname(hostname, sizeof(hostname)) == 0)

Modified: head/sys/modules/iscsi/initiator/Makefile
==
--- head/sys/modules/iscsi/initiator/Makefile   Wed Apr 18 16:29:55 2012
(r234424)
+++ head/sys/modules/iscsi/initiator/Makefile   Wed Apr 18 16:47:57 2012
(r234425)
@@ -10,7 +10,9 @@ SRCS+= iscsi.c isc_cam.c isc_soc.c isc_s
 SRCS+= opt_cam.h opt_iscsi_initiator.h
 SRCS+= bus_if.h device_if.h
 #CFLAGS+= -DNO_USE_MBUF
+CFLAGS+= -DISCSI_INITIATOR_DEBUG=2
 #CFLAGS+= -DISCSI_INITIATOR_DEBUG=2
+CFLAGS+= -DINVARIANTS
 CFLAGS+= -I$S
 CFLAGS+= -DINVARIANTS
 .include 
__

svn commit: r234424 - head/lib/libthr/thread

2012-04-18 Thread George V. Neville-Neil
Author: gnn
Date: Wed Apr 18 16:29:55 2012
New Revision: 234424
URL: http://svn.freebsd.org/changeset/base/234424

Log:
  Set SIGCANCEL to SIGTHR as part of some cleanup of DTrace code.
  
  Reviewed by:  davidxu@
  MFC after:1 week

Modified:
  head/lib/libthr/thread/thr_private.h

Modified: head/lib/libthr/thread/thr_private.h
==
--- head/lib/libthr/thread/thr_private.hWed Apr 18 15:23:21 2012
(r234423)
+++ head/lib/libthr/thread/thr_private.hWed Apr 18 16:29:55 2012
(r234424)
@@ -80,7 +80,7 @@ typedef TAILQ_HEAD(atfork_head, pthread_
 TAILQ_HEAD(mutex_queue, pthread_mutex);
 
 /* Signal to do cancellation */
-#defineSIGCANCEL   32
+#defineSIGCANCEL   SIGTHR
 
 /*
  * Kernel fatal error handler macro.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234423 - head/share/misc

2012-04-18 Thread Maxim Konovalov
Author: maxim
Date: Wed Apr 18 15:23:21 2012
New Revision: 234423
URL: http://svn.freebsd.org/changeset/base/234423

Log:
  o FreeBSD 8.3-RELEASE added.

Modified:
  head/share/misc/bsd-family-tree

Modified: head/share/misc/bsd-family-tree
==
--- head/share/misc/bsd-family-tree Wed Apr 18 15:22:08 2012
(r234422)
+++ head/share/misc/bsd-family-tree Wed Apr 18 15:23:21 2012
(r234423)
@@ -246,13 +246,14 @@ FreeBSD 5.2   |  |  
  | || |  | NetBSD 5.1  |   |
  |  FreeBSD  FreeBSD  |  | |   |
  |8.2  7.4|  | |   DragonFly 2.10.1
- | v  |  | OpenBSD 4.9 |
- | Mac OS X  | |   |
- |   10.7| |   |
- ||  | OpenBSD 5.0 |
- +--FreeBSD   |  | |   |
- |9.0 |  | |   DragonFly 3.0.1
- | v  |  | |   |
+ | |  |  | OpenBSD 4.9 |
+ | `-. Mac OS X  | |   |
+ |\  10.7| |   |
+ | |  |  | OpenBSD 5.0 |
+ *--FreeBSD|  |  | |   |
+ |9.0  |  |  | |   DragonFly 3.0.1
+ | vFreeBSD   |  | |   |
+ |8.3 |  | |   |
  ||  | |   |
 FreeBSD 10 -current   |  NetBSD -current  OpenBSD -current |
  ||  | |   |
@@ -544,6 +545,7 @@ Mac OS X 10.7   2011-07-20 [APL]
 OpenBSD 5.02011-11-01 [OBD]
 FreeBSD 9.02012-01-12 [FBD]
 DragonFly 3.0.12012-02-21 [DFB]
+FreeBSD 8.32012-04-18 [FBD]
 
 Bibliography
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234422 - head/sys/fs/tmpfs

2012-04-18 Thread Jaakko Heinonen
Author: jh
Date: Wed Apr 18 15:22:08 2012
New Revision: 234422
URL: http://svn.freebsd.org/changeset/base/234422

Log:
  Return EOPNOTSUPP rather than EPERM for the SF_SNAPSHOT flag because
  tmpfs doesn't support snapshots.
  
  Suggested by: bde

Modified:
  head/sys/fs/tmpfs/tmpfs_subr.c

Modified: head/sys/fs/tmpfs/tmpfs_subr.c
==
--- head/sys/fs/tmpfs/tmpfs_subr.c  Wed Apr 18 15:19:00 2012
(r234421)
+++ head/sys/fs/tmpfs/tmpfs_subr.c  Wed Apr 18 15:22:08 2012
(r234422)
@@ -1080,7 +1080,7 @@ tmpfs_chflags(struct vnode *vp, int flag
 
if ((flags & ~(UF_NODUMP | UF_IMMUTABLE | UF_APPEND | UF_OPAQUE |
UF_NOUNLINK | SF_ARCHIVED | SF_IMMUTABLE | SF_APPEND |
-   SF_NOUNLINK | SF_SNAPSHOT)) != 0)
+   SF_NOUNLINK)) != 0)
return (EOPNOTSUPP);
 
/* Disallow this operation if the file system is mounted read-only. */
@@ -1104,9 +1104,6 @@ tmpfs_chflags(struct vnode *vp, int flag
if (error)
return (error);
}
-   /* The snapshot flag cannot be toggled. */
-   if ((flags ^ node->tn_flags) & SF_SNAPSHOT)
-   return (EPERM);
} else {
if (node->tn_flags &
(SF_NOUNLINK | SF_IMMUTABLE | SF_APPEND) ||
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r234352 - in head/sys: amd64/linux32 compat/linux i386/linux kern

2012-04-18 Thread Giovanni Trematerra
2012/4/18 Konstantin Belousov :
> On Wed, Apr 18, 2012 at 01:52:24PM +0200, Giovanni Trematerra wrote:
>> On Mon, Apr 16, 2012 at 11:22 PM, Jung-uk Kim  wrote:
>> > Author: jkim
>> > Date: Mon Apr 16 21:22:02 2012
>> > New Revision: 234352
>> > URL: http://svn.freebsd.org/changeset/base/234352
>> >
>> > Log:
>> >  - Implement pipe2 syscall for Linuxulator.  This syscall appeared in 
>> > 2.6.27
>> >  but GNU libc used it without checking its kernel version, e. g., Fedora 
>> > 10.
>> >  - Move pipe(2) implementation for Linuxulator from MD files to MI file,
>> >  sys/compat/linux/linux_file.c.  There is no MD code for this syscall at 
>> > all.
>> >  - Correct an argument type for pipe() from l_ulong * to l_int *.  Probably
>> >  this was the source of MI/MD confusion.
>> >
>> >  Reviewed by:  emulation
>> >
>> > Modified:
>> >  head/sys/amd64/linux32/linux32_dummy.c
>> >  head/sys/amd64/linux32/linux32_machdep.c
>> >  head/sys/amd64/linux32/syscalls.master
>> >  head/sys/compat/linux/linux_file.c
>> >  head/sys/i386/linux/linux_dummy.c
>> >  head/sys/i386/linux/linux_machdep.c
>> >  head/sys/i386/linux/syscalls.master
>> >  head/sys/kern/sys_pipe.c
>> >
>>
>> I don't think it's worth to change sys/kern/sys_pipe.c just to implement
>> linux_pipe2 in linuxator.
>> You can just revert the changes in sys_pipe.c and call kern_fcntl in 
>> linux_pipe2
>> to set appropriate flags for the pipes after you created them with kern_pipe.
>> Please, take a look at this patch
>> http://www.trematerra.net/patches/linux_pipe2.patch
>>
>> It's only test-compiled though.
>> Thank you.
>
> I do think that what Jung-uk did is the right approach, and your suggestion
> is wrong. The way it is done in r234352 serves the purpose of pipe2(2),
> namely, the atomicity of setting O_CLOEXEC and O_NONBLOCK with respect
> to execve(2).

Uhm I'm overlooked that linux threads in linuxolator are actual processes as you
pointed me out in private.

Sorry for the noise.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234421 - head/sys/ufs/ufs

2012-04-18 Thread Jaakko Heinonen
Author: jh
Date: Wed Apr 18 15:19:00 2012
New Revision: 234421
URL: http://svn.freebsd.org/changeset/base/234421

Log:
  The part about exec atime no longer applies in the comment.
  
  Pointed out by:   bde

Modified:
  head/sys/ufs/ufs/ufs_vnops.c

Modified: head/sys/ufs/ufs/ufs_vnops.c
==
--- head/sys/ufs/ufs/ufs_vnops.cWed Apr 18 13:50:17 2012
(r234420)
+++ head/sys/ufs/ufs/ufs_vnops.cWed Apr 18 15:19:00 2012
(r234421)
@@ -573,9 +573,8 @@ ufs_setattr(ap)
}
/*
 * If immutable or append, no one can change any of its attributes
-* except the ones already handled (exec atime and, in some cases
-* for the superuser, file flags including the immutability flags
-* themselves).
+* except the ones already handled (in some cases, file flags
+* including the immutability flags themselves for the superuser).
 */
if (ip->i_flags & (IMMUTABLE | APPEND))
return (EPERM);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r233700 - head/sys/kern

2012-04-18 Thread John Baldwin
On Tuesday, April 17, 2012 4:24:38 pm Dimitry Andric wrote:
> On 2012-04-02 13:52, John Baldwin wrote:
> ...
> >> It seems the for loop walks the list until the end, then tacks 'sc' onto
> >> it.
> >>
> >> So to 'fix' the warning, and make the meaning more explicit, we should
> >> probably rewrite that fragment as:
> >>
> >>   LIST_INIT(&(sc->ha_ccb));
> >>   /* Link us into the HA list */
> >>   for (ha =&Asr_softc_list; *ha; ha =&((*ha)->ha_next))
> >>;
> >>*(ha) = sc;
> >>
> >> Is this OK?
> >
> > Can we just make that code use a STAILQ() instead of doing it obscurely by
> > hand?
> 
> That would be a more invasive change, and since this driver is
> essentially unmaintained, I'd like to change as little as possible. :)
> 
> Another solution is to just silence the warning for this driver.

http://www.FreeBSD.org/~jhb/patches/asr_stailq.patch

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234420 - head/sbin/growfs

2012-04-18 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Apr 18 13:50:17 2012
New Revision: 234420
URL: http://svn.freebsd.org/changeset/base/234420

Log:
  Style.

Modified:
  head/sbin/growfs/growfs.c

Modified: head/sbin/growfs/growfs.c
==
--- head/sbin/growfs/growfs.c   Wed Apr 18 12:51:48 2012(r234419)
+++ head/sbin/growfs/growfs.c   Wed Apr 18 13:50:17 2012(r234420)
@@ -1235,7 +1235,7 @@ charsperline(void)
columns = 80;   /* last resort */
 
DBG_LEAVE;
-   return columns;
+   return (columns);
 }
 
 /*
@@ -1526,7 +1526,7 @@ main(int argc, char **argv)
DBG_CLOSE;
 
DBG_LEAVE;
-   return 0;
+   return (0);
 }
 
 /*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234418 - head/sys/dev/usb/serial

2012-04-18 Thread Thomas Quinot
Author: thomas
Date: Wed Apr 18 12:50:13 2012
New Revision: 234418
URL: http://svn.freebsd.org/changeset/base/234418

Log:
  Fix typo in comment

Modified:
  head/sys/dev/usb/serial/umodem.c

Modified: head/sys/dev/usb/serial/umodem.c
==
--- head/sys/dev/usb/serial/umodem.cWed Apr 18 11:59:03 2012
(r234417)
+++ head/sys/dev/usb/serial/umodem.cWed Apr 18 12:50:13 2012
(r234418)
@@ -139,7 +139,7 @@ static const STRUCT_USB_HOST_ID umodem_d
 };
 
 /*
- * As speeds for umodem deivces increase, these numbers will need to
+ * As speeds for umodem devices increase, these numbers will need to
  * be increased. They should be good for G3 speeds and below.
  *
  * TODO: The TTY buffers should be increased!
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r234352 - in head/sys: amd64/linux32 compat/linux i386/linux kern

2012-04-18 Thread Konstantin Belousov
On Wed, Apr 18, 2012 at 01:52:24PM +0200, Giovanni Trematerra wrote:
> On Mon, Apr 16, 2012 at 11:22 PM, Jung-uk Kim  wrote:
> > Author: jkim
> > Date: Mon Apr 16 21:22:02 2012
> > New Revision: 234352
> > URL: http://svn.freebsd.org/changeset/base/234352
> >
> > Log:
> >  - Implement pipe2 syscall for Linuxulator.  This syscall appeared in 2.6.27
> >  but GNU libc used it without checking its kernel version, e. g., Fedora 10.
> >  - Move pipe(2) implementation for Linuxulator from MD files to MI file,
> >  sys/compat/linux/linux_file.c.  There is no MD code for this syscall at 
> > all.
> >  - Correct an argument type for pipe() from l_ulong * to l_int *.  Probably
> >  this was the source of MI/MD confusion.
> >
> >  Reviewed by:  emulation
> >
> > Modified:
> >  head/sys/amd64/linux32/linux32_dummy.c
> >  head/sys/amd64/linux32/linux32_machdep.c
> >  head/sys/amd64/linux32/syscalls.master
> >  head/sys/compat/linux/linux_file.c
> >  head/sys/i386/linux/linux_dummy.c
> >  head/sys/i386/linux/linux_machdep.c
> >  head/sys/i386/linux/syscalls.master
> >  head/sys/kern/sys_pipe.c
> >
> 
> I don't think it's worth to change sys/kern/sys_pipe.c just to implement
> linux_pipe2 in linuxator.
> You can just revert the changes in sys_pipe.c and call kern_fcntl in 
> linux_pipe2
> to set appropriate flags for the pipes after you created them with kern_pipe.
> Please, take a look at this patch
> http://www.trematerra.net/patches/linux_pipe2.patch
> 
> It's only test-compiled though.
> Thank you.

I do think that what Jung-uk did is the right approach, and your suggestion
is wrong. The way it is done in r234352 serves the purpose of pipe2(2),
namely, the atomicity of setting O_CLOEXEC and O_NONBLOCK with respect
to execve(2).

You may argue that kern_execve() applies single-threading around the syscall
implementation, so our thread cannot be inside the kern_pipe() while other
thread performs execve(2). But unfortunately, this is only true for FreeBSD
ABI, while linuxolator has very flawed execve() (and fork()) implementation.
In particular, other threads are running while some thread performs fork
or exec.

So I think that the do_pipe() should be kept as is.


pgpU13qxghxJo.pgp
Description: PGP signature


svn commit: r234417 - in head/sys: geom/part sys

2012-04-18 Thread Dmitry Morozovsky
Author: marck (doc committer)
Date: Wed Apr 18 11:59:03 2012
New Revision: 234417
URL: http://svn.freebsd.org/changeset/base/234417

Log:
  VMware environments are not unusual now.  Add VMware partitions recognition
  (both MBR for ESXi <= 4.1 and GPT for ESXi 5) to g_part.
  
  Reviewed by:  ae
  Approved by:  ae
  MFC after:2 weeks

Modified:
  head/sys/geom/part/g_part.c
  head/sys/geom/part/g_part.h
  head/sys/geom/part/g_part_gpt.c
  head/sys/geom/part/g_part_mbr.c
  head/sys/sys/diskmbr.h
  head/sys/sys/gpt.h

Modified: head/sys/geom/part/g_part.c
==
--- head/sys/geom/part/g_part.c Wed Apr 18 10:23:42 2012(r234416)
+++ head/sys/geom/part/g_part.c Wed Apr 18 11:59:03 2012(r234417)
@@ -103,6 +103,9 @@ struct g_part_alias_list {
{ "netbsd-lfs", G_PART_ALIAS_NETBSD_LFS },
{ "netbsd-raid", G_PART_ALIAS_NETBSD_RAID },
{ "netbsd-swap", G_PART_ALIAS_NETBSD_SWAP },
+   { "vmware-vmfs", G_PART_ALIAS_VMFS },
+   { "vmware-vmkdiag", G_PART_ALIAS_VMKDIAG },
+   { "vmware-reserved", G_PART_ALIAS_VMRESERVED },
 };
 
 SYSCTL_DECL(_kern_geom);

Modified: head/sys/geom/part/g_part.h
==
--- head/sys/geom/part/g_part.h Wed Apr 18 10:23:42 2012(r234416)
+++ head/sys/geom/part/g_part.h Wed Apr 18 11:59:03 2012(r234417)
@@ -69,6 +69,9 @@ enum g_part_alias {
G_PART_ALIAS_EBR,   /* A EBR partition entry. */
G_PART_ALIAS_MS_FAT32,  /* A Microsoft FAT32 partition entry. */
G_PART_ALIAS_BIOS_BOOT, /* A GRUB 2 boot partition entry. */
+   G_PART_ALIAS_VMFS,  /* A VMware VMFS partition entry */
+   G_PART_ALIAS_VMKDIAG,   /* A VMware vmkDiagnostic partition 
entry */
+   G_PART_ALIAS_VMRESERVED,/* A VMware reserved partition entry */
/* Keep the following last */
G_PART_ALIAS_COUNT
 };

Modified: head/sys/geom/part/g_part_gpt.c
==
--- head/sys/geom/part/g_part_gpt.c Wed Apr 18 10:23:42 2012
(r234416)
+++ head/sys/geom/part/g_part_gpt.c Wed Apr 18 11:59:03 2012
(r234417)
@@ -163,6 +163,9 @@ static struct uuid gpt_uuid_linux_data =
 static struct uuid gpt_uuid_linux_lvm = GPT_ENT_TYPE_LINUX_LVM;
 static struct uuid gpt_uuid_linux_raid = GPT_ENT_TYPE_LINUX_RAID;
 static struct uuid gpt_uuid_linux_swap = GPT_ENT_TYPE_LINUX_SWAP;
+static struct uuid gpt_uuid_vmfs = GPT_ENT_TYPE_VMFS;
+static struct uuid gpt_uuid_vmkdiag = GPT_ENT_TYPE_VMKDIAG;
+static struct uuid gpt_uuid_vmreserved = GPT_ENT_TYPE_VMRESERVED;
 static struct uuid gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA;
 static struct uuid gpt_uuid_ms_reserved = GPT_ENT_TYPE_MS_RESERVED;
 static struct uuid gpt_uuid_ms_ldm_data = GPT_ENT_TYPE_MS_LDM_DATA;
@@ -200,6 +203,9 @@ static struct g_part_uuid_alias {
{ &gpt_uuid_linux_lvm,  G_PART_ALIAS_LINUX_LVM,  0 },
{ &gpt_uuid_linux_raid, G_PART_ALIAS_LINUX_RAID, 0 },
{ &gpt_uuid_linux_swap, G_PART_ALIAS_LINUX_SWAP, 0 },
+   { &gpt_uuid_vmfs,   G_PART_ALIAS_VMFS,   0 },
+   { &gpt_uuid_vmkdiag,G_PART_ALIAS_VMKDIAG,0 },
+   { &gpt_uuid_vmreserved, G_PART_ALIAS_VMRESERVED, 0 },
{ &gpt_uuid_mbr,G_PART_ALIAS_MBR,0 },
{ &gpt_uuid_ms_basic_data,  G_PART_ALIAS_MS_BASIC_DATA,  0x0b },
{ &gpt_uuid_ms_ldm_data,G_PART_ALIAS_MS_LDM_DATA,0 },

Modified: head/sys/geom/part/g_part_mbr.c
==
--- head/sys/geom/part/g_part_mbr.c Wed Apr 18 10:23:42 2012
(r234416)
+++ head/sys/geom/part/g_part_mbr.c Wed Apr 18 11:59:03 2012
(r234417)
@@ -126,6 +126,8 @@ static struct g_part_mbr_alias {
{ DOSPTYP_LINLVM,   G_PART_ALIAS_LINUX_LVM },
{ DOSPTYP_LINRAID,  G_PART_ALIAS_LINUX_RAID },
{ DOSPTYP_PPCBOOT,  G_PART_ALIAS_FREEBSD_BOOT },
+   { DOSPTYP_VMFS, G_PART_ALIAS_VMFS },
+   { DOSPTYP_VMKDIAG,  G_PART_ALIAS_VMKDIAG },
 };
 
 static int

Modified: head/sys/sys/diskmbr.h
==
--- head/sys/sys/diskmbr.h  Wed Apr 18 10:23:42 2012(r234416)
+++ head/sys/sys/diskmbr.h  Wed Apr 18 11:59:03 2012(r234417)
@@ -55,6 +55,8 @@
 #defineDOSPTYP_LINUX   0x83/* Linux partition */
 #defineDOSPTYP_LINLVM  0x8e/* Linux LVM partition */
 #defineDOSPTYP_PMBR0xee/* GPT Protective MBR */
+#defineDOSPTYP_VMFS0xfb/* VMware VMFS partition */
+#defineDOSPTYP_VMKDIAG 0xfc/* VMware vmkDiagnostic partition */
 #define

Re: svn commit: r234352 - in head/sys: amd64/linux32 compat/linux i386/linux kern

2012-04-18 Thread Giovanni Trematerra
On Mon, Apr 16, 2012 at 11:22 PM, Jung-uk Kim  wrote:
> Author: jkim
> Date: Mon Apr 16 21:22:02 2012
> New Revision: 234352
> URL: http://svn.freebsd.org/changeset/base/234352
>
> Log:
>  - Implement pipe2 syscall for Linuxulator.  This syscall appeared in 2.6.27
>  but GNU libc used it without checking its kernel version, e. g., Fedora 10.
>  - Move pipe(2) implementation for Linuxulator from MD files to MI file,
>  sys/compat/linux/linux_file.c.  There is no MD code for this syscall at all.
>  - Correct an argument type for pipe() from l_ulong * to l_int *.  Probably
>  this was the source of MI/MD confusion.
>
>  Reviewed by:  emulation
>
> Modified:
>  head/sys/amd64/linux32/linux32_dummy.c
>  head/sys/amd64/linux32/linux32_machdep.c
>  head/sys/amd64/linux32/syscalls.master
>  head/sys/compat/linux/linux_file.c
>  head/sys/i386/linux/linux_dummy.c
>  head/sys/i386/linux/linux_machdep.c
>  head/sys/i386/linux/syscalls.master
>  head/sys/kern/sys_pipe.c
>

I don't think it's worth to change sys/kern/sys_pipe.c just to implement
linux_pipe2 in linuxator.
You can just revert the changes in sys_pipe.c and call kern_fcntl in linux_pipe2
to set appropriate flags for the pipes after you created them with kern_pipe.
Please, take a look at this patch
http://www.trematerra.net/patches/linux_pipe2.patch

It's only test-compiled though.
Thank you.

--
Giovanni Trematerra
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r234400 - in head/sys: kern sys

2012-04-18 Thread Attilio Rao
2012/4/17, Kirk McKusick :
> Author: mckusick
> Date: Tue Apr 17 21:46:59 2012
> New Revision: 234400
> URL: http://svn.freebsd.org/changeset/base/234400
>
> Log:
>   Drop export of vdestroy() function from kern/vfs_subr.c as it is
>   used only as a helper function in that file. Replace sole call to
>   vbusy() with inline code in vholdl(). Replace sole calls to vfree()
>   and vdestroy() with inline code in vdropl().

Thanks, I wanted to do this since some time.

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234416 - head/usr.bin/top

2012-04-18 Thread Konstantin Belousov
Author: kib
Date: Wed Apr 18 10:23:42 2012
New Revision: 234416
URL: http://svn.freebsd.org/changeset/base/234416

Log:
  Fix string buffer overflow when preparing the line of output.
  
  PR:   bin/161739
  Submitted by: Jeremy Chadwick 
  MFC after:1 week

Modified:
  head/usr.bin/top/machine.c

Modified: head/usr.bin/top/machine.c
==
--- head/usr.bin/top/machine.c  Wed Apr 18 09:42:14 2012(r234415)
+++ head/usr.bin/top/machine.c  Wed Apr 18 10:23:42 2012(r234416)
@@ -933,7 +933,7 @@ format_next_process(caddr_t handle, char
p_tot = rup->ru_inblock + rup->ru_oublock + rup->ru_majflt;
s_tot = total_inblock + total_oublock + total_majflt;
 
-   sprintf(fmt, io_Proc_format,
+   snprintf(fmt, sizeof(fmt), io_Proc_format,
pp->ki_pid,
jid_buf,
namelength, namelength, (*get_userid)(pp->ki_ruid),
@@ -961,7 +961,7 @@ format_next_process(caddr_t handle, char
snprintf(thr_buf, sizeof(thr_buf), "%*d ",
sizeof(thr_buf) - 2, pp->ki_numthreads);
 
-   sprintf(fmt, proc_fmt,
+   snprintf(fmt, sizeof(fmt), proc_fmt,
pp->ki_pid,
jid_buf,
namelength, namelength, (*get_userid)(pp->ki_ruid),
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234415 - in head: sbin/geom/class/multipath sys/geom/multipath

2012-04-18 Thread Alexander Motin
Author: mav
Date: Wed Apr 18 09:42:14 2012
New Revision: 234415
URL: http://svn.freebsd.org/changeset/base/234415

Log:
  Some improvements to GEOM MULTIPATH:
   - Implement "configure" command to allow switching operation mode of
  running device on-fly without destroying and recreation.
   - Implement Active/Read mode as hybrid of Active/Active and Active/Passive.
  In this mode all paths not marked FAIL may handle reads same time,
  but unlike Active/Active only one path handles write requests at any
  point in time. It allows to closer follow original write request order
  if above layers need it for data consistency (not waiting for requisite
  write completion before sending dependent write).
   - Hide duplicate messages about device status change.
   - Remove periodic thread wake up with 10Hz rate.
  
  MFC after:2 weeks
  Sponsored by: iXsystems, Inc.

Modified:
  head/sbin/geom/class/multipath/geom_multipath.c
  head/sbin/geom/class/multipath/gmultipath.8
  head/sys/geom/multipath/g_multipath.c

Modified: head/sbin/geom/class/multipath/geom_multipath.c
==
--- head/sbin/geom/class/multipath/geom_multipath.c Wed Apr 18 08:55:26 
2012(r234414)
+++ head/sbin/geom/class/multipath/geom_multipath.c Wed Apr 18 09:42:14 
2012(r234415)
@@ -55,17 +55,28 @@ struct g_command class_commands[] = {
"create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL,
{
{ 'A', "active_active", NULL, G_TYPE_BOOL },
+   { 'R', "active_read", NULL, G_TYPE_BOOL },
G_OPT_SENTINEL
},
-   "[-vA] name prov ..."
+   "[-vAR] name prov ..."
},
{
"label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, mp_main,
{
{ 'A', "active_active", NULL, G_TYPE_BOOL },
+   { 'R', "active_read", NULL, G_TYPE_BOOL },
G_OPT_SENTINEL
},
-   "[-vA] name prov ..."
+   "[-vAR] name prov ..."
+   },
+   { "configure", G_FLAG_VERBOSE, NULL,
+   {
+   { 'A', "active_active", NULL, G_TYPE_BOOL },
+   { 'P', "active_passive", NULL, G_TYPE_BOOL },
+   { 'R', "active_read", NULL, G_TYPE_BOOL },
+   G_OPT_SENTINEL
+   },
+   "[-vAPR] name"
},
{
"add", G_FLAG_VERBOSE, NULL, G_NULL_OPTS,
@@ -196,6 +207,8 @@ mp_label(struct gctl_req *req)
}
strlcpy(md.md_uuid, ptr, sizeof (md.md_uuid));
md.md_active_active = gctl_get_int(req, "active_active");
+   if (gctl_get_int(req, "active_read"))
+   md.md_active_active = 2;
free(ptr);
 
/*

Modified: head/sbin/geom/class/multipath/gmultipath.8
==
--- head/sbin/geom/class/multipath/gmultipath.8 Wed Apr 18 08:55:26 2012
(r234414)
+++ head/sbin/geom/class/multipath/gmultipath.8 Wed Apr 18 09:42:14 2012
(r234415)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 31, 2011
+.Dd April 18, 2012
 .Dt GMULTIPATH 8
 .Os
 .Sh NAME
@@ -33,15 +33,19 @@
 .Sh SYNOPSIS
 .Nm
 .Cm create
-.Op Fl Av
+.Op Fl ARv
 .Ar name
 .Ar prov ...
 .Nm
 .Cm label
-.Op Fl Av
+.Op Fl ARv
 .Ar name
 .Ar prov ...
 .Nm
+.Cm configure
+.Op Fl APRv
+.Ar name
+.Nm
 .Cm add
 .Op Fl v
 .Ar name prov
@@ -121,7 +125,9 @@ Kernel will only check that all given pr
 sector sizes.
 .Pp
 .Fl A
-option enables Active/Active mode, otherwise Active/Passive mode is used
+option enables Active/Active mode,
+.Fl R
+option enables Active/Read mode, otherwise Active/Passive mode is used
 by default.
 .It Cm label
 Create multipath device with
@@ -134,8 +140,19 @@ It reliably protects against specifying 
 Providers with no matching metadata detected will not be added to the device.
 .Pp
 .Fl A
-option enables Active/Active mode, otherwise Active/Passive mode is used
+option enables Active/Active mode,
+.Fl R
+option enables Active/Read mode, otherwise Active/Passive mode is used
 by default.
+.It Cm configure
+Configure the given multipath device.
+.Pp
+.Fl A
+option enables Active/Active mode,
+.Fl P
+option enables Active/Passive mode,
+.Fl R
+option enables Active/Read mode.
 .It Cm add
 Add the given provider as a path to the given multipath device.
 Should normally be used only for devices created with
@@ -221,7 +238,8 @@ of multiple pathnames refer to the same 
 system operator who will use tools and knowledge of their own storage
 subsystem to make the correct configuration selection.
 .Pp
-There are Active/Passive and Active/Active operation modes supported.
+There are Active/Passive, Active/Read and Active/Active operation modes
+supported.
 In Active/Passive mode only one path has I/O moving on it
 at an

svn commit: r234414 - head/sys/cam/ata

2012-04-18 Thread Alexander Motin
Author: mav
Date: Wed Apr 18 08:55:26 2012
New Revision: 234414
URL: http://svn.freebsd.org/changeset/base/234414

Log:
  Alike to SCSI make adaclose() to not return error if device gone.
  This fixes KASSERT panic inside GEOM if kernel built with INVARIANTS.
  
  MFC after:1 week

Modified:
  head/sys/cam/ata/ata_da.c

Modified: head/sys/cam/ata/ata_da.c
==
--- head/sys/cam/ata/ata_da.c   Wed Apr 18 08:15:55 2012(r234413)
+++ head/sys/cam/ata/ata_da.c   Wed Apr 18 08:55:26 2012(r234414)
@@ -456,17 +456,16 @@ adaclose(struct disk *dp)
struct  cam_periph *periph;
struct  ada_softc *softc;
union ccb *ccb;
-   int error;
 
periph = (struct cam_periph *)dp->d_drv1;
if (periph == NULL)
return (ENXIO); 
 
cam_periph_lock(periph);
-   if ((error = cam_periph_hold(periph, PRIBIO)) != 0) {
+   if (cam_periph_hold(periph, PRIBIO) != 0) {
cam_periph_unlock(periph);
cam_periph_release(periph);
-   return (error);
+   return (0);
}
 
softc = (struct ada_softc *)periph->softc;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r234412 - head/lib/libkse

2012-04-18 Thread Sergey Kandaurov
On 18 April 2012 11:02, Sergey Kandaurov  wrote:
> Author: pluknet
> Date: Wed Apr 18 07:02:53 2012
> New Revision: 234412
> URL: http://svn.freebsd.org/changeset/base/234412
>
> Log:
>  Fix typo in ".PATH"
>
> Modified:
>  head/lib/libkse/Makefile
>

Since kernel part of KSE has gone in r177091, any reason to keep it in tree?

-- 
wbr,
pluknet
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r234412 - head/lib/libkse

2012-04-18 Thread Sergey Kandaurov
Author: pluknet
Date: Wed Apr 18 07:02:53 2012
New Revision: 234412
URL: http://svn.freebsd.org/changeset/base/234412

Log:
  Fix typo in ".PATH"

Modified:
  head/lib/libkse/Makefile

Modified: head/lib/libkse/Makefile
==
--- head/lib/libkse/MakefileWed Apr 18 05:16:20 2012(r234411)
+++ head/lib/libkse/MakefileWed Apr 18 07:02:53 2012(r234412)
@@ -38,7 +38,7 @@ SYMBOL_MAPS=${.CURDIR}/kse.map
 
 PRECIOUSLIB=
 
-.path: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
+.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
 
 .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
 .include "${.CURDIR}/support/Makefile.inc"
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"