svn commit: r230529 - head/usr.sbin/makefs
Author: hrs Date: Wed Jan 25 07:45:15 2012 New Revision: 230529 URL: http://svn.freebsd.org/changeset/base/230529 Log: Fix a SIGSEGV problem in directory entry renaming. Modified: head/usr.sbin/makefs/cd9660.c Modified: head/usr.sbin/makefs/cd9660.c == --- head/usr.sbin/makefs/cd9660.c Wed Jan 25 07:14:23 2012 (r230528) +++ head/usr.sbin/makefs/cd9660.c Wed Jan 25 07:45:15 2012 (r230529) @@ -1086,6 +1086,8 @@ cd9660_rename_filename(cd9660node *iter, */ while (count < maxlength) { + if (*naming == ';') + break; naming++; count++; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230528 - stable/8/sys/sys
Author: kib Date: Wed Jan 25 07:14:23 2012 New Revision: 230528 URL: http://svn.freebsd.org/changeset/base/230528 Log: MFC r230459: Fix typo. Modified: stable/8/sys/sys/elf_common.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/sys/elf_common.h == --- stable/8/sys/sys/elf_common.h Wed Jan 25 07:12:45 2012 (r230527) +++ stable/8/sys/sys/elf_common.h Wed Jan 25 07:14:23 2012 (r230528) @@ -382,7 +382,7 @@ typedef struct { #defineDT_INIT_ARRAYSZ 27 /* Size in bytes of the array of initialization functions. */ #defineDT_FINI_ARRAYSZ 28 /* Size in bytes of the array of - terminationfunctions. */ + termination functions. */ #defineDT_RUNPATH 29 /* String table offset of a null-terminated library search path string. */ #defineDT_FLAGS30 /* Object specific flag values. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230527 - stable/9/sys/sys
Author: kib Date: Wed Jan 25 07:12:45 2012 New Revision: 230527 URL: http://svn.freebsd.org/changeset/base/230527 Log: MFC r230459: Fix typo. Modified: stable/9/sys/sys/elf_common.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sys/elf_common.h == --- stable/9/sys/sys/elf_common.h Wed Jan 25 04:48:27 2012 (r230526) +++ stable/9/sys/sys/elf_common.h Wed Jan 25 07:12:45 2012 (r230527) @@ -384,7 +384,7 @@ typedef struct { #defineDT_INIT_ARRAYSZ 27 /* Size in bytes of the array of initialization functions. */ #defineDT_FINI_ARRAYSZ 28 /* Size in bytes of the array of - terminationfunctions. */ + termination functions. */ #defineDT_RUNPATH 29 /* String table offset of a null-terminated library search path string. */ #defineDT_FLAGS30 /* Object specific flag values. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r230353 - head/usr.sbin/makefs
Andreas Tobler wrote in <4f1f9cd1.9070...@freebsd.org>: an> It is a powerpc64 crossbuild installation, built on amd64. It is an> around 650MB unzipped, 230MB zipped. I can upload it to freefall later an> this evening. Thanks! -- Hiroki pgprasZW2UGW6.pgp Description: PGP signature
Re: svn commit: r230353 - head/usr.sbin/makefs
On 25.01.12 07:03, Hiroki Sato wrote: Andreas Tobler wrote in<4f1f94b3.6020...@freebsd.org>: an> On 25.01.12 01:40, Hiroki Sato wrote: an> > Andreas Tobler wrote an> > in<4f1f3585.8060...@freebsd.org>: an> > an> > an> Hi Eitan, an> > an> an> > an> On 20.01.12 02:38, Eitan Adler wrote: an> > an> > Author: eadler an> > an> > Date: Fri Jan 20 01:38:21 2012 an> > an> > New Revision: 230353 an> > an> > URL: http://svn.freebsd.org/changeset/base/230353 an> > an> > an> > an> > Log: an> > an> > Fix warning when compiling with gcc46: an> > an> > error: variable 'temp' set but not used an> > an> > an> > an> > Approved by: dim an> > an> > Approved by: cperciva (mentor, blanket for pre-mentorship an> > an> > already-approved commits) an> > an> > MFC after: 3 days an> > an> an> > an> I do not know which of the makefs commits it was: an> > an> an> > an> [andreast@neon] /export/home/andreast/> makefs -t cd9660 -o an> > chrp-boot an> > an> -o rockridge -o label=pseries -B4321 p.iso an> > /data1/netboot/powerpc64/ an> > an> Segmentation fault (core dumped) an> > an> an> > an> [neon:~] andreast% uname -ra an> > an> FreeBSD neon.andreas.nets 10.0-CURRENT FreeBSD 10.0-CURRENT #11 an> > an> r230469M: Mon Jan 23 02:53:05 CET 2012 an> > an> an> > andre...@neon.andreas.nets:/usr/obj/export/devel/fbsd/head/src/sys/NEON an> > an> amd64 an> > an> an> > an> Reverting to 230352 lets me create an iso. an> > an> an> > an> I compile makefs with the base compiler. an> > an> an> > an> I'll do some more investigations tomorrow, late night here. an> > an> >I got the same symptom and am investigating it. Can you rebuild the an> >binary with a debug option like this: an> > an> >% cd /usr/src/usr.sbin/makefs an> >% make clean an> >% make DEBUG_FLAGS=-g an> >% make DEBUG_FLAGS=-g install an> > an> >and then send me the output of the following command? an> > an> >% printf "run -t cd9660 -o chrp-boot -o rockridge -o label=pseries an> >% -B4321 p.iso /data1/netboot/powerpc64/\nbt\nf 1\n f 2\n" | gdb -x an> >% /dev/stdin -batch /usr/sbin/makefs an> > an> >In my environment both the old and the new version could reproduce an> >it. I am not sure if mine is the same as yours at this moment, an> >though. an> an> It is actually r230354, this is the commit which shows the failure. an> And I reverted back to 230353 and onfirmed that it 'works'. Thank you! I will investigating it. Actually my test data set can make SIGSEGV in both of the versions for some reason. I have to narrow down the cause, anyway. I guess your /data1/netboot/powerpc64/ is quite large, but can I receive the tarball of it in some way? It would be helpful. It is a powerpc64 crossbuild installation, built on amd64. It is around 650MB unzipped, 230MB zipped. I can upload it to freefall later this evening. Thanks, Andreas ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r230353 - head/usr.sbin/makefs
Andreas Tobler wrote in <4f1f94b3.6020...@freebsd.org>: an> On 25.01.12 01:40, Hiroki Sato wrote: an> > Andreas Tobler wrote an> >in<4f1f3585.8060...@freebsd.org>: an> > an> > an> Hi Eitan, an> > an> an> > an> On 20.01.12 02:38, Eitan Adler wrote: an> > an> > Author: eadler an> > an> > Date: Fri Jan 20 01:38:21 2012 an> > an> > New Revision: 230353 an> > an> > URL: http://svn.freebsd.org/changeset/base/230353 an> > an> > an> > an> > Log: an> > an> > Fix warning when compiling with gcc46: an> > an> > error: variable 'temp' set but not used an> > an> > an> > an> > Approved by: dim an> > an> > Approved by: cperciva (mentor, blanket for pre-mentorship an> > an> > already-approved commits) an> > an> > MFC after: 3 days an> > an> an> > an> I do not know which of the makefs commits it was: an> > an> an> > an> [andreast@neon] /export/home/andreast/> makefs -t cd9660 -o an> > chrp-boot an> > an> -o rockridge -o label=pseries -B4321 p.iso an> > /data1/netboot/powerpc64/ an> > an> Segmentation fault (core dumped) an> > an> an> > an> [neon:~] andreast% uname -ra an> > an> FreeBSD neon.andreas.nets 10.0-CURRENT FreeBSD 10.0-CURRENT #11 an> > an> r230469M: Mon Jan 23 02:53:05 CET 2012 an> > an> an> > andre...@neon.andreas.nets:/usr/obj/export/devel/fbsd/head/src/sys/NEON an> > an> amd64 an> > an> an> > an> Reverting to 230352 lets me create an iso. an> > an> an> > an> I compile makefs with the base compiler. an> > an> an> > an> I'll do some more investigations tomorrow, late night here. an> > an> > I got the same symptom and am investigating it. Can you rebuild the an> > binary with a debug option like this: an> > an> > % cd /usr/src/usr.sbin/makefs an> > % make clean an> > % make DEBUG_FLAGS=-g an> > % make DEBUG_FLAGS=-g install an> > an> > and then send me the output of the following command? an> > an> > % printf "run -t cd9660 -o chrp-boot -o rockridge -o label=pseries an> > % -B4321 p.iso /data1/netboot/powerpc64/\nbt\nf 1\n f 2\n" | gdb -x an> > % /dev/stdin -batch /usr/sbin/makefs an> > an> > In my environment both the old and the new version could reproduce an> > it. I am not sure if mine is the same as yours at this moment, an> > though. an> an> It is actually r230354, this is the commit which shows the failure. an> And I reverted back to 230353 and onfirmed that it 'works'. Thank you! I will investigating it. Actually my test data set can make SIGSEGV in both of the versions for some reason. I have to narrow down the cause, anyway. I guess your /data1/netboot/powerpc64/ is quite large, but can I receive the tarball of it in some way? It would be helpful. -- Hiroki pgpEPN13Bllt5.pgp Description: PGP signature
Re: svn commit: r230353 - head/usr.sbin/makefs
On 25.01.12 06:50, Garrett Cooper wrote: On Tue, Jan 24, 2012 at 9:35 PM, Andreas Tobler wrote: ... It is actually r230354, this is the commit which shows the failure. And I reverted back to 230353 and onfirmed that it 'works'. I additionally built with -O0 -g, see below. If you need more details, I'll be out the next 15h but later on I can continue. Thank you very much! Andreas Here the output from the binary built with "-g": -- [andreast@tcx58] /export/home/andreast/> printf "run -t cd9660 -o chrp-boot -o rockridge -o label=pseries -B4321 p.iso /export/netboot/powerpc64/\nbt\nf 1\n f 2\n" | gdb -x /dev/stdin -batch /usr/sbin/makefs ... delete_chars); 1. What does 'list' say for that frame (the line numbers are misleading)? 2. What compiler are you using to compile the binary? 1.) Starting program: /usr/sbin/makefs -t cd9660 -o chrp-boot -o rockridge -o label=pseries -B4321 p.iso /export/netboot/powerpc64 Program received signal SIGSEGV, Segmentation fault. 0x000800b781d6 in memcpy () from /lib/libc.so.7 (gdb) l 85 struct stat sb; 86 struct timeval start; 87 fstype_t*fstype; 88 fsinfo_t fsoptions; 89 fsnode *root; 90 int ch, len; 91 char*subtree; 92 char*specfile; 93 94 setprogname(argv[0]); (gdb) up #1 0x004045f8 in cd9660_rename_filename (iter=0x0, num=36, delete_chars=2) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1120 1120memcpy(tmp, (iter->o_name), numbts); (gdb) l 1115} 1116} 1117*/ 1118 1119/* (copying just the filename before the '.' */ 1120memcpy(tmp, (iter->o_name), numbts); 1121 1122/* adding the appropriate number following the name */ 1123temp = i; 1124while (digits > 0) { 2.) gcc -v Using built-in specs. Target: amd64-undermydesk-freebsd Configured with: FreeBSD/amd64 system compiler Thread model: posix gcc version 4.2.1 20070831 patched [FreeBSD] Thanks! Andreas ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r230353 - head/usr.sbin/makefs
On Tue, Jan 24, 2012 at 9:35 PM, Andreas Tobler wrote: > ... > It is actually r230354, this is the commit which shows the failure. > And I reverted back to 230353 and onfirmed that it 'works'. > > I additionally built with -O0 -g, see below. > > If you need more details, I'll be out the next 15h but later on I can > continue. > > Thank you very much! > Andreas > > Here the output from the binary built with "-g": > -- > [andreast@tcx58] /export/home/andreast/> printf "run -t cd9660 -o chrp-boot > -o rockridge -o label=pseries -B4321 p.iso /export/netboot/powerpc64/\nbt\nf > 1\n f 2\n" | gdb -x /dev/stdin -batch /usr/sbin/makefs ... > delete_chars); 1. What does 'list' say for that frame (the line numbers are misleading)? 2. What compiler are you using to compile the binary? Thanks! -Garrett ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r230353 - head/usr.sbin/makefs
On 25.01.12 01:40, Hiroki Sato wrote: Andreas Tobler wrote in<4f1f3585.8060...@freebsd.org>: an> Hi Eitan, an> an> On 20.01.12 02:38, Eitan Adler wrote: an> > Author: eadler an> > Date: Fri Jan 20 01:38:21 2012 an> > New Revision: 230353 an> > URL: http://svn.freebsd.org/changeset/base/230353 an> > an> > Log: an> > Fix warning when compiling with gcc46: an> > error: variable 'temp' set but not used an> > an> > Approved by: dim an> > Approved by: cperciva (mentor, blanket for pre-mentorship an> > already-approved commits) an> > MFC after: 3 days an> an> I do not know which of the makefs commits it was: an> an> [andreast@neon] /export/home/andreast/> makefs -t cd9660 -o chrp-boot an> -o rockridge -o label=pseries -B4321 p.iso /data1/netboot/powerpc64/ an> Segmentation fault (core dumped) an> an> [neon:~] andreast% uname -ra an> FreeBSD neon.andreas.nets 10.0-CURRENT FreeBSD 10.0-CURRENT #11 an> r230469M: Mon Jan 23 02:53:05 CET 2012 an> andre...@neon.andreas.nets:/usr/obj/export/devel/fbsd/head/src/sys/NEON an> amd64 an> an> Reverting to 230352 lets me create an iso. an> an> I compile makefs with the base compiler. an> an> I'll do some more investigations tomorrow, late night here. I got the same symptom and am investigating it. Can you rebuild the binary with a debug option like this: % cd /usr/src/usr.sbin/makefs % make clean % make DEBUG_FLAGS=-g % make DEBUG_FLAGS=-g install and then send me the output of the following command? % printf "run -t cd9660 -o chrp-boot -o rockridge -o label=pseries -B4321 p.iso /data1/netboot/powerpc64/\nbt\nf 1\n f 2\n" | gdb -x /dev/stdin -batch /usr/sbin/makefs In my environment both the old and the new version could reproduce it. I am not sure if mine is the same as yours at this moment, though. It is actually r230354, this is the commit which shows the failure. And I reverted back to 230353 and onfirmed that it 'works'. I additionally built with -O0 -g, see below. If you need more details, I'll be out the next 15h but later on I can continue. Thank you very much! Andreas Here the output from the binary built with "-g": -- [andreast@tcx58] /export/home/andreast/> printf "run -t cd9660 -o chrp-boot -o rockridge -o label=pseries -B4321 p.iso /export/netboot/powerpc64/\nbt\nf 1\n f 2\n" | gdb -x /dev/stdin -batch /usr/sbin/makefs Program received signal SIGSEGV, Segmentation fault. 0x000800b781d6 in memcpy () from /lib/libc.so.7 #0 0x000800b781d6 in memcpy () from /lib/libc.so.7 #1 0x004045f8 in cd9660_rename_filename (iter=0x0, num=36, delete_chars=2) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1120 #2 0x004044bb in cd9660_handle_collisions (colliding=0x801ba9ec0, past=35) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1042 #3 0x00404f13 in cd9660_convert_structure (root=0x8013929c0, parent_node=0x801ba9ec0, level=5, numDirectories=0x7fffd864, error=0x7fffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1462 #4 0x00404e42 in cd9660_convert_structure (root=0x801378e70, parent_node=0x801b894c0, level=4, numDirectories=0x7fffd864, error=0x7fffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419 #5 0x00404e42 in cd9660_convert_structure (root=0x80123fa60, parent_node=0x8016f2280, level=3, numDirectories=0x7fffd864, error=0x7fffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419 #6 0x00404e42 in cd9660_convert_structure (root=0x80110cec0, parent_node=0x801552100, level=2, numDirectories=0x7fffd864, error=0x7fffd860) ---Type to continue, or q to quit---at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419 #7 0x00404e42 in cd9660_convert_structure (root=0x80104c0b0, parent_node=0x801007140, level=1, numDirectories=0x7fffd864, error=0x7fffd860) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419 #8 0x004036f1 in cd9660_makefs (image=0x7fffdd45 "p.iso", dir=0x7fffdd4b "/export/netboot/powerpc64/", root=0x80104c060, fsopts=0x7fffd920) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:505 #9 0x0040bb58 in main (argc=2, argv=0x7fffda90) at /export/devel/fbsd/src/usr.sbin/makefs/makefs.c:291 #1 0x004045f8 in cd9660_rename_filename (iter=0x0, num=36, delete_chars=2) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1120 1120memcpy(tmp, (iter->o_name), numbts); #2 0x004044bb in cd9660_handle_collisions (colliding=0x801ba9ec0, past=35) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1042 1042iter = cd9660_rename_filename(iter, skip, delete_chars); -- And here the output from a bt full with a binary built with "-g -O0": -- [andreast@tcx58] /export/home/andreast/> printf "run -t cd9660 -o chrp-boot -o rockridge -o l
svn commit: r230526 - head/sys/dev/fxp
Author: imp Date: Wed Jan 25 04:48:27 2012 New Revision: 230526 URL: http://svn.freebsd.org/changeset/base/230526 Log: Minor indenting divot... Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c == --- head/sys/dev/fxp/if_fxp.c Wed Jan 25 04:45:29 2012(r230525) +++ head/sys/dev/fxp/if_fxp.c Wed Jan 25 04:48:27 2012(r230526) @@ -2555,7 +2555,7 @@ fxp_ifmedia_upd(struct ifnet *ifp) { struct fxp_softc *sc = ifp->if_softc; struct mii_data *mii; - struct mii_softc*miisc; + struct mii_softc*miisc; mii = device_get_softc(sc->miibus); FXP_LOCK(sc); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230525 - head/share/man/man4
Author: imp Date: Wed Jan 25 04:45:29 2012 New Revision: 230525 URL: http://svn.freebsd.org/changeset/base/230525 Log: Some minor additions to the list of supported devices... Modified: head/share/man/man4/ed.4 Modified: head/share/man/man4/ed.4 == --- head/share/man/man4/ed.4Wed Jan 25 03:57:43 2012(r230524) +++ head/share/man/man4/ed.4Wed Jan 25 04:45:29 2012(r230525) @@ -139,7 +139,7 @@ Allied Telesis SIC-98, SIC-98NOTE (110pi .It Allied Telesis SIU-98-D (flags 0x61) (PC-98) .It -AmbiCom 10BaseT card +AmbiCom 10BaseT card (8002, 8002T, 8010 and 8610) .It Bay Networks NETGEAR FA410TXC Fast Ethernet .It @@ -147,11 +147,15 @@ Belkin F5D5020 PC Card Fast Ethernet .It Billionton LM5LT-10B Ethernet/Modem PC Card .It +Billionton LNT-10TB, LNT-10TN Ethernet PC Card +.It Bromax iPort 10/100 Ethernet PC Card .It Bromax iPort 10 Ethernet PC Card .It -Buffalo LPC2-CLT, LPC3-CLT, LPC3-CLX, LPC4-TX PC Card +Buffalo LPC2-CLT, LPC3-CLT, LPC3-CLX, LPC4-TX, LPC-CTX PC Card +.It +Buffalo LPC-CF-CLT CF Card .It CNet BC40 adapter .It ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r230516 - in head/sys: fs/nfsclient nfsclient
On Tue, 24 Jan 2012, Rick Macklem wrote: Bruce Evans wrote: On Wed, 25 Jan 2012, Rick Macklem wrote: Log: If a mount -u is done to either NFS client that switches it from TCP to UDP and the rsize/wsize/readdirsize is greater than NFS_MAXDGRAMDATA, it is possible for a thread doing an I/O RPC to get stuck repeatedly doing retries. This happens ... Could it wait for the old i/o to complete (and not start any new i/o?). This is little different from having to wait when changing from rw to ro. The latter is not easy, and at least the old nfs client seems to not even dream of it. ffs has always called a ... As you said above "not easy ... uses complicated suspension of i/o". I have not tried to code this, but I think it would be non-trivial. The code would need to block new I/O before RPCs are issued and wait for all in-progress I/Os to complete. At this time, the kernel RPC handles the in-progress RPCs and NFS doesn't "know" what is outstanding. Of course, code could be added to keep track of in-progress I/O RPCs, but that would have to be written, as well. Hmm, this means that even when the i/o sizes are small, the mode switch from tcp to udp may be unsafe since there may still be i/o's with higher sizes outstanding. So to switch from tcp to udp, the user should first reduce the sizes, when wait a while before switching to udp. And what happens with retries after changing sizes up or down? Does it retry with the old sizes? Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230522 - in head: sys/boot/powerpc/boot1.chrp sys/geom/part sys/sys usr.sbin/bsdinstall/partedit
Author: nwhitehorn Date: Wed Jan 25 03:37:39 2012 New Revision: 230522 URL: http://svn.freebsd.org/changeset/base/230522 Log: Experimental support for booting CHRP-type PowerPC systems from hard disks. Modified: head/sys/boot/powerpc/boot1.chrp/Makefile head/sys/geom/part/g_part_mbr.c head/sys/sys/diskmbr.h head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Modified: head/sys/boot/powerpc/boot1.chrp/Makefile == --- head/sys/boot/powerpc/boot1.chrp/Makefile Wed Jan 25 02:22:16 2012 (r230521) +++ head/sys/boot/powerpc/boot1.chrp/Makefile Wed Jan 25 03:37:39 2012 (r230522) @@ -10,7 +10,6 @@ INSTALLFLAGS= -b FILES= boot1.hfs SRCS= boot1.c ashldi3.c -INTERNALPROG= NO_MAN= CFLAGS= -ffreestanding -msoft-float -Os \ Modified: head/sys/geom/part/g_part_mbr.c == --- head/sys/geom/part/g_part_mbr.c Wed Jan 25 02:22:16 2012 (r230521) +++ head/sys/geom/part/g_part_mbr.c Wed Jan 25 03:37:39 2012 (r230522) @@ -123,6 +123,7 @@ static struct g_part_mbr_alias { { DOSPTYP_LINUX,G_PART_ALIAS_LINUX_DATA }, { DOSPTYP_LINLVM, G_PART_ALIAS_LINUX_LVM }, { DOSPTYP_LINRAID, G_PART_ALIAS_LINUX_RAID }, + { DOSPTYP_PPCBOOT, G_PART_ALIAS_FREEBSD_BOOT }, }; static int Modified: head/sys/sys/diskmbr.h == --- head/sys/sys/diskmbr.h Wed Jan 25 02:22:16 2012(r230521) +++ head/sys/sys/diskmbr.h Wed Jan 25 03:37:39 2012(r230522) @@ -48,6 +48,7 @@ #defineDOSPTYP_NTFS0x07/* NTFS partition */ #defineDOSPTYP_FAT32 0x0b/* FAT32 partition */ #defineDOSPTYP_EXTLBA 0x0f/* DOS extended partition */ +#defineDOSPTYP_PPCBOOT 0x41/* PReP/CHRP boot partition */ #defineDOSPTYP_386BSD 0xa5/* 386BSD partition type */ #defineDOSPTYP_LINSWP 0x82/* Linux swap partition */ #defineDOSPTYP_LINUX 0x83/* Linux partition */ Modified: head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c == --- head/usr.sbin/bsdinstall/partedit/partedit_powerpc.cWed Jan 25 02:22:16 2012(r230521) +++ head/usr.sbin/bsdinstall/partedit/partedit_powerpc.cWed Jan 25 03:37:39 2012(r230522) @@ -67,7 +67,7 @@ is_scheme_bootable(const char *part_type size_t bootpart_size(const char *part_type) { - if (strcmp(part_type, "APM") == 0) + if (strcmp(part_type, "APM") == 0 || strcmp(part_type, "MBR") == 0) return (800*1024); return (0); } @@ -81,6 +81,8 @@ const char * partcode_path(const char *part_type) { if (strcmp(part_type, "APM") == 0) return ("/boot/boot1.hfs"); + if (strcmp(part_type, "MBR") == 0) + return ("/boot/boot1.elf"); return (NULL); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r230516 - in head/sys: fs/nfsclient nfsclient
Bruce Evans wrote: > On Wed, 25 Jan 2012, Rick Macklem wrote: > > > Log: > > If a mount -u is done to either NFS client that switches it > > from TCP to UDP and the rsize/wsize/readdirsize is greater > > than NFS_MAXDGRAMDATA, it is possible for a thread doing an > > I/O RPC to get stuck repeatedly doing retries. This happens > > because the RPC will use a resize/wsize/readdirsize that won't > > work for UDP and, as such, it will keep failing indefinitely. > > This patch returns an error for this case, to avoid the problem. > > A discussion on freebsd-fs@ seemed to indicate that returning > > an error was preferable to silently ignoring the "udp"/"mntudp" > > option. > > Could it wait for the old i/o to complete (and not start any new > i/o?). This is little different from having to wait when changing > from rw to ro. The latter is not easy, and at least the old nfs > client seems to not even dream of it. ffs has always called a > flushfiles() function, but until relatively recently had lots of > bugs in this area. It now uses complicated suspension of i/o > to prevent starting new i/o. It is still the only file system in > FreeBSD that uses MNTK_SUSPEND* or vfs_write_suspend(). > (geom journal also uses vfs_write_suspend(), but I think > it only works with ffs. vfs_write_suspend() uses MNT_SUSPEND > in its call to VFS_SYNC(), but ffs_sync() is the only sync > function that references MNT_SUSPEND.) > I wonder how zfs handles this. > As you said above "not easy ... uses complicated suspension of i/o". I have not tried to code this, but I think it would be non-trivial. The code would need to block new I/O before RPCs are issued and wait for all in-progress I/Os to complete. At this time, the kernel RPC handles the in-progress RPCs and NFS doesn't "know" what is outstanding. Of course, code could be added to keep track of in-progress I/O RPCs, but that would have to be written, as well. One tricky case would be if a forced dismount was invoked while the above is happening. (Forced dismount is hard to get right and easy to break, from my experience with it.) I didn't feel that the above work was justified, since I didn't see a need to switch from TCP -> UDP for a mount. If others feel that returning an error isn't sufficient and the above work is justified, I can revert the patch and try and find time to do the above. > > This problem was discovered while investigating a problem reported > > by pjd@ via email. > > This problem has annoyed me for years. I now know a workaround :-). > It doesn't help that, at least without nmount(), you can't see any > of the udp/tcp, rsize or wsize parameters. The behaviour of mount -u > should probably be to not change anything that is not an explicit > parameter, but this is not traditional (mount -u > traditionally means mount -u -o rw...) and is impossible for at least > mount() to determine the current parameters, so it was passed a > complete set of defaults. So for mount -u, you have to tell it all > the current parameters that are not the default unless you want them > changed back to the default, and it is just as impossible for you as > for mount() to tell what the current parameters are. You have to > remember what you set them to. When you forgot what they were or > mistype type, you sometimes switch tcp back to udp when you meant to > keep tcp, and see the bug. The rsize and wsize parameters give the > additional problem that when switching between udp and tcp, the > defaults > for the size parameters change, so you normally don't want to keep the > old parameters; but when testing which combination works best, you > need to control the new parameters; in particular, it is useful to > know what the defaults are; but the defaults are of course only > documented in the source code, and the source code that sets the > defaults is very large. > Although I haven't coded it yet, I am planning on adding a "-m" option to nfsstat (similar to what Linux has), that would dump out the NFS mount options actually being used. This becomes more important for NFSv4.n, since the newer protocol is negotiating more things. rick ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230521 - stable/8/sys/fs/nfs
Author: rmacklem Date: Wed Jan 25 02:22:16 2012 New Revision: 230521 URL: http://svn.freebsd.org/changeset/base/230521 Log: MFC: r229956 jwd@ reported via email that the "CacheSize" field reported by "nfsstat -e -s" would go negative after using the "-z" option to zero out the stats. This patch fixes that by not zeroing out the srvcache_size field for "-z", since it is the size of the cache and not a counter Modified: stable/8/sys/fs/nfs/nfs_commonport.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfs/nfs_commonport.c == --- stable/8/sys/fs/nfs/nfs_commonport.cWed Jan 25 02:15:40 2012 (r230520) +++ stable/8/sys/fs/nfs/nfs_commonport.cWed Jan 25 02:22:16 2012 (r230521) @@ -485,7 +485,6 @@ nfssvc_call(struct thread *p, struct nfs newnfsstats.srvcache_nonidemdonehits = 0; newnfsstats.srvcache_misses = 0; newnfsstats.srvcache_tcppeak = 0; - newnfsstats.srvcache_size = 0; newnfsstats.srvclients = 0; newnfsstats.srvopenowners = 0; newnfsstats.srvopens = 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230520 - head/usr.sbin/tzsetup
Author: emaste Date: Wed Jan 25 02:15:40 2012 New Revision: 230520 URL: http://svn.freebsd.org/changeset/base/230520 Log: Clean up reinstall option and remove duplicate code - Move the reinstall logic to be before menus are initialised (menus are not needed when reinstalling a zonefile). - Remove unnecessary re-initialization of path_db. - Update variable name and error message because we now use the zone name relative to /usr/share/zoneinfo, not the full path. pr: bin/164041 Submitted by: Devin Teske MFC after:1 week Modified: head/usr.sbin/tzsetup/tzsetup.c Modified: head/usr.sbin/tzsetup/tzsetup.c == --- head/usr.sbin/tzsetup/tzsetup.c Wed Jan 25 01:54:28 2012 (r230519) +++ head/usr.sbin/tzsetup/tzsetup.c Wed Jan 25 02:15:40 2012 (r230520) @@ -951,32 +951,16 @@ main(int argc, char **argv) /* Override the user-supplied umask. */ (void)umask(S_IWGRP | S_IWOTH); - read_iso3166_table(); - read_zones(); - sort_countries(); - make_menus(); - if (reinstall == 1) { FILE *f; - char zonefile[MAXPATHLEN]; - char path_db[MAXPATHLEN]; - - zonefile[0] = '\0'; - path_db[0] = '\0'; - if (chrootenv != NULL) { - sprintf(zonefile, "%s/", chrootenv); - sprintf(path_db, "%s/", chrootenv); - } - strcat(zonefile, _PATH_ZONEINFO); - strcat(zonefile, "/"); - strcat(path_db, _PATH_DB); + char zoneinfo[MAXPATHLEN]; if ((f = fopen(path_db, "r")) != NULL) { - if (fgets(zonefile, sizeof(zonefile), f) != NULL) { - zonefile[sizeof(zonefile) - 1] = 0; - if (strlen(zonefile) > 0) { - zonefile[strlen(zonefile) - 1] = 0; - rv = install_zoneinfo(zonefile); + if (fgets(zoneinfo, sizeof(zoneinfo), f) != NULL) { + zoneinfo[sizeof(zoneinfo) - 1] = 0; + if (strlen(zoneinfo) > 0) { + zoneinfo[strlen(zoneinfo) - 1] = 0; + rv = install_zoneinfo(zoneinfo); exit(rv & ~DITEM_LEAVE_MENU); } errx(1, "Error reading %s.\n", path_db); @@ -984,7 +968,7 @@ main(int argc, char **argv) fclose(f); errx(1, "Unable to determine earlier installed zoneinfo " - "file. Check %s", path_db); + "name. Check %s", path_db); } errx(1, "Cannot open %s for reading. Does it exist?", path_db); } @@ -1004,6 +988,11 @@ main(int argc, char **argv) /* FALLTHROUGH */ } + read_iso3166_table(); + read_zones(); + sort_countries(); + make_menus(); + init_dialog(stdin, stdout); if (skiputc == 0) { DIALOG_VARS save_vars; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r230516 - in head/sys: fs/nfsclient nfsclient
On Wed, 25 Jan 2012, Rick Macklem wrote: Log: If a mount -u is done to either NFS client that switches it from TCP to UDP and the rsize/wsize/readdirsize is greater than NFS_MAXDGRAMDATA, it is possible for a thread doing an I/O RPC to get stuck repeatedly doing retries. This happens because the RPC will use a resize/wsize/readdirsize that won't work for UDP and, as such, it will keep failing indefinitely. This patch returns an error for this case, to avoid the problem. A discussion on freebsd-fs@ seemed to indicate that returning an error was preferable to silently ignoring the "udp"/"mntudp" option. Could it wait for the old i/o to complete (and not start any new i/o?). This is little different from having to wait when changing from rw to ro. The latter is not easy, and at least the old nfs client seems to not even dream of it. ffs has always called a flushfiles() function, but until relatively recently had lots of bugs in this area. It now uses complicated suspension of i/o to prevent starting new i/o. It is still the only file system in FreeBSD that uses MNTK_SUSPEND* or vfs_write_suspend(). (geom journal also uses vfs_write_suspend(), but I think it only works with ffs. vfs_write_suspend() uses MNT_SUSPEND in its call to VFS_SYNC(), but ffs_sync() is the only sync function that references MNT_SUSPEND.) I wonder how zfs handles this. This problem was discovered while investigating a problem reported by pjd@ via email. This problem has annoyed me for years. I now know a workaround :-). It doesn't help that, at least without nmount(), you can't see any of the udp/tcp, rsize or wsize parameters. The behaviour of mount -u should probably be to not change anything that is not an explicit parameter, but this is not traditional (mount -u traditionally means mount -u -o rw...) and is impossible for at least mount() to determine the current parameters, so it was passed a complete set of defaults. So for mount -u, you have to tell it all the current parameters that are not the default unless you want them changed back to the default, and it is just as impossible for you as for mount() to tell what the current parameters are. You have to remember what you set them to. When you forgot what they were or mistype type, you sometimes switch tcp back to udp when you meant to keep tcp, and see the bug. The rsize and wsize parameters give the additional problem that when switching between udp and tcp, the defaults for the size parameters change, so you normally don't want to keep the old parameters; but when testing which combination works best, you need to control the new parameters; in particular, it is useful to know what the defaults are; but the defaults are of course only documented in the source code, and the source code that sets the defaults is very large. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230518 - stable/9/sys/fs/nfs
Author: rmacklem Date: Wed Jan 25 01:45:19 2012 New Revision: 230518 URL: http://svn.freebsd.org/changeset/base/230518 Log: MFC: r229956 jwd@ reported via email that the "CacheSize" field reported by "nfsstat -e -s" would go negative after using the "-z" option to zero out the stats. This patch fixes that by not zeroing out the srvcache_size field for "-z", since it is the size of the cache and not a counter Modified: stable/9/sys/fs/nfs/nfs_commonport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/fs/nfs/nfs_commonport.c == --- stable/9/sys/fs/nfs/nfs_commonport.cWed Jan 25 01:38:25 2012 (r230517) +++ stable/9/sys/fs/nfs/nfs_commonport.cWed Jan 25 01:45:19 2012 (r230518) @@ -483,7 +483,6 @@ nfssvc_call(struct thread *p, struct nfs newnfsstats.srvcache_nonidemdonehits = 0; newnfsstats.srvcache_misses = 0; newnfsstats.srvcache_tcppeak = 0; - newnfsstats.srvcache_size = 0; newnfsstats.srvclients = 0; newnfsstats.srvopenowners = 0; newnfsstats.srvopens = 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r230353 - head/usr.sbin/makefs
Andreas Tobler wrote in <4f1f3585.8060...@freebsd.org>: an> Hi Eitan, an> an> On 20.01.12 02:38, Eitan Adler wrote: an> > Author: eadler an> > Date: Fri Jan 20 01:38:21 2012 an> > New Revision: 230353 an> > URL: http://svn.freebsd.org/changeset/base/230353 an> > an> > Log: an> >Fix warning when compiling with gcc46: an> >error: variable 'temp' set but not used an> > an> >Approved by: dim an> >Approved by: cperciva (mentor, blanket for pre-mentorship an> >already-approved commits) an> >MFC after: 3 days an> an> I do not know which of the makefs commits it was: an> an> [andreast@neon] /export/home/andreast/> makefs -t cd9660 -o chrp-boot an> -o rockridge -o label=pseries -B4321 p.iso /data1/netboot/powerpc64/ an> Segmentation fault (core dumped) an> an> [neon:~] andreast% uname -ra an> FreeBSD neon.andreas.nets 10.0-CURRENT FreeBSD 10.0-CURRENT #11 an> r230469M: Mon Jan 23 02:53:05 CET 2012 an> andre...@neon.andreas.nets:/usr/obj/export/devel/fbsd/head/src/sys/NEON an> amd64 an> an> Reverting to 230352 lets me create an iso. an> an> I compile makefs with the base compiler. an> an> I'll do some more investigations tomorrow, late night here. I got the same symptom and am investigating it. Can you rebuild the binary with a debug option like this: % cd /usr/src/usr.sbin/makefs % make clean % make DEBUG_FLAGS=-g % make DEBUG_FLAGS=-g install and then send me the output of the following command? % printf "run -t cd9660 -o chrp-boot -o rockridge -o label=pseries -B4321 p.iso /data1/netboot/powerpc64/\nbt\nf 1\n f 2\n" | gdb -x /dev/stdin -batch /usr/sbin/makefs In my environment both the old and the new version could reproduce it. I am not sure if mine is the same as yours at this moment, though. -- Hiroki pgp8slgqlGTP0.pgp Description: PGP signature
svn commit: r230516 - in head/sys: fs/nfsclient nfsclient
Author: rmacklem Date: Wed Jan 25 00:22:53 2012 New Revision: 230516 URL: http://svn.freebsd.org/changeset/base/230516 Log: If a mount -u is done to either NFS client that switches it from TCP to UDP and the rsize/wsize/readdirsize is greater than NFS_MAXDGRAMDATA, it is possible for a thread doing an I/O RPC to get stuck repeatedly doing retries. This happens because the RPC will use a resize/wsize/readdirsize that won't work for UDP and, as such, it will keep failing indefinitely. This patch returns an error for this case, to avoid the problem. A discussion on freebsd-fs@ seemed to indicate that returning an error was preferable to silently ignoring the "udp"/"mntudp" option. This problem was discovered while investigating a problem reported by pjd@ via email. MFC after:2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/nfsclient/nfs_vfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c == --- head/sys/fs/nfsclient/nfs_clvfsops.cTue Jan 24 23:43:13 2012 (r230515) +++ head/sys/fs/nfsclient/nfs_clvfsops.cWed Jan 25 00:22:53 2012 (r230516) @@ -989,6 +989,23 @@ nfs_mount(struct mount *mp) error = EIO; goto out; } + + /* +* Cannot switch to UDP if current rsize/wsize/readdirsize is +* too large, since there may be an I/O RPC in progress that +* will get retried after the switch to the UDP socket. These +* retries will fail over and over and over again. +*/ + if (args.sotype == SOCK_DGRAM && + (nmp->nm_rsize > NFS_MAXDGRAMDATA || +nmp->nm_wsize > NFS_MAXDGRAMDATA || +nmp->nm_readdirsize > NFS_MAXDGRAMDATA)) { + vfs_mount_error(mp, + "old rsize/wsize/readdirsize greater than UDP max"); + error = EINVAL; + goto out; + } + /* * When doing an update, we can't change version, * security, switch lockd strategies or change cookie Modified: head/sys/nfsclient/nfs_vfsops.c == --- head/sys/nfsclient/nfs_vfsops.c Tue Jan 24 23:43:13 2012 (r230515) +++ head/sys/nfsclient/nfs_vfsops.c Wed Jan 25 00:22:53 2012 (r230516) @@ -1106,6 +1106,23 @@ nfs_mount(struct mount *mp) error = EIO; goto out; } + + /* +* Cannot switch to UDP if current rsize/wsize/readdirsize is +* too large, since there may be an I/O RPC in progress that +* will get retried after the switch to the UDP socket. These +* retries will fail over and over and over again. +*/ + if (args.sotype == SOCK_DGRAM && + (nmp->nm_rsize > NFS_MAXDGRAMDATA || +nmp->nm_wsize > NFS_MAXDGRAMDATA || +nmp->nm_readdirsize > NFS_MAXDGRAMDATA)) { + vfs_mount_error(mp, + "old rsize/wsize/readdirsize greater than UDP max"); + error = EINVAL; + goto out; + } + /* * When doing an update, we can't change from or to * v3, switch lockd strategies or change cookie translation ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r230353 - head/usr.sbin/makefs
On Tue, Jan 24, 2012 at 5:49 PM, Andreas Tobler wrote: > Hi Eitan, > I do not know which of the makefs commits it was: > > [andreast@neon] /export/home/andreast/> makefs -t cd9660 -o chrp-boot -o > rockridge -o label=pseries -B4321 p.iso /data1/netboot/powerpc64/ > Segmentation fault (core dumped) > > [neon:~] andreast% uname -ra > FreeBSD neon.andreas.nets 10.0-CURRENT FreeBSD 10.0-CURRENT #11 r230469M: > Mon Jan 23 02:53:05 CET 2012 > andre...@neon.andreas.nets:/usr/obj/export/devel/fbsd/head/src/sys/NEON > amd64 Thanks for the report! > Reverting to 230352 lets me create an iso. This is very strange - the change I made should have been idempotent at low levels of optimization and a no-op at higher levels of optimization. > I compile makefs with the base compiler. > > I'll do some more investigations tomorrow, late night here. I will not have access to my dev box for about 1 week so I won't be able to act on any information gathered for a bit. That said if my commit *did* break something I want to know :) > if you have an idea, would be great. If you can't investigate by the time I have access to my computer again I will take a look. Sorry for any trouble you had. -- Eitan Adler Source & Ports committer X11, Bugbusting teams ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230515 - head/sbin/hastd
Author: pjd Date: Tue Jan 24 23:43:13 2012 New Revision: 230515 URL: http://svn.freebsd.org/changeset/base/230515 Log: - Fix documentation to note that /etc/hast.conf is the default configuration file for hastd(8) and hastctl(8) and not hast.conf. - In copyright statement correct that this file is documentation, not software. - Bump date. MFC after:3 days Modified: head/sbin/hastd/hast.conf.5 Modified: head/sbin/hastd/hast.conf.5 == --- head/sbin/hastd/hast.conf.5 Tue Jan 24 23:09:54 2012(r230514) +++ head/sbin/hastd/hast.conf.5 Tue Jan 24 23:43:13 2012(r230515) @@ -1,8 +1,8 @@ .\" Copyright (c) 2010 The FreeBSD Foundation -.\" Copyright (c) 2010-2011 Pawel Jakub Dawidek +.\" Copyright (c) 2010-2012 Pawel Jakub Dawidek .\" All rights reserved. .\" -.\" This software was developed by Pawel Jakub Dawidek under sponsorship from +.\" This documentation was written by Pawel Jakub Dawidek under sponsorship from .\" the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 27, 2011 +.Dd January 25, 2012 .Dt HAST.CONF 5 .Os .Sh NAME @@ -389,7 +389,9 @@ statement. .Bl -tag -width ".Pa /var/run/hastctl" -compact .It Pa /etc/hast.conf The default -.Nm +.Xr hastctl 8 +and +.Xr hastd 8 configuration file. .It Pa /var/run/hastctl Control socket used by the ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230514 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys
Author: mm Date: Tue Jan 24 23:09:54 2012 New Revision: 230514 URL: http://svn.freebsd.org/changeset/base/230514 Log: Merge illumos revisions 13572, 13573, 13574: Rev. 13572: disk sync write perf regression when slog is used post oi_148 [1] Rev. 13573: crash during reguid causes stale config [2] allow and unallow missing from zpool history since removal of pyzfs [5] Rev. 13574: leaking a vdev when removing an l2cache device [3] memory leak when adding a file-based l2arc device [4] leak in ZFS from metaslab_group_create and zfs_ereport_checksum [6] References: https://www.illumos.org/issues/1909 [1] https://www.illumos.org/issues/1949 [2] https://www.illumos.org/issues/1951 [3] https://www.illumos.org/issues/1952 [4] https://www.illumos.org/issues/1953 [5] https://www.illumos.org/issues/1954 [6] Obtained from:illumos (issues #1909, #1949, #1951, #1952, #1953, #1954) MFC after:2 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c == --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.cTue Jan 24 22:40:24 2012(r230513) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.cTue Jan 24 23:09:54 2012(r230514) @@ -4213,7 +4213,7 @@ tryagain: (void) strlcpy(zc.zc_name, zhp->zfs_name, ZFS_MAXNAMELEN); - if (zfs_ioctl(hdl, ZFS_IOC_GET_FSACL, &zc) != 0) { + if (ioctl(hdl->libzfs_fd, ZFS_IOC_GET_FSACL, &zc) != 0) { (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot get permissions on '%s'"), zc.zc_name); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Tue Jan 24 22:40:24 2012(r230513) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Tue Jan 24 23:09:54 2012(r230514) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #include @@ -36,7 +36,7 @@ * avoid having to load lots of space_maps in a given txg. There are, * however, some cases where we want to avoid "fast" ganging and instead * we want to do an exhaustive search of all metaslabs on this device. - * Currently we don't allow any gang or dump device related allocations + * Currently we don't allow any gang, zil, or dump device related allocations * to "fast" gang. */ #defineCAN_FASTGANG(flags) \ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jan 24 22:40:24 2012(r230513) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Jan 24 23:09:54 2012(r230514) @@ -1073,8 +1073,10 @@ spa_unload(spa_t *spa) } spa->spa_spares.sav_count = 0; - for (i = 0; i < spa->spa_l2cache.sav_count; i++) + for (i = 0; i < spa->spa_l2cache.sav_count; i++) { + vdev_clear_stats(spa->spa_l2cache.sav_vdevs[i]); vdev_free(spa->spa_l2cache.sav_vdevs[i]); + } if (spa->spa_l2cache.sav_vdevs) { kmem_free(spa->spa_l2cache.sav_vdevs, spa->spa_l2cache.sav_count * sizeof (void *)); @@ -1302,11 +1304,13 @@ spa_load_l2cache(spa_t *spa) vd = oldvdevs[i]; if (vd != NULL) { + ASSERT(vd->vdev_isl2cache); + if (spa_l2cache_exists(vd->vdev_guid, &pool) && pool != 0ULL && l2arc_vdev_present(vd)) l2arc_remove_vdev(vd); - (void) vdev_close(vd); - spa_l2cache_remove(vd); + vdev_clear_stats(vd); + vdev_free(vd); } } @@ -1949,7 +1953,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_ */ if (type != SPA_IMPORT_ASSEMBLE) { spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); - error = vde
Re: svn commit: r230353 - head/usr.sbin/makefs
Hi Eitan, On 20.01.12 02:38, Eitan Adler wrote: Author: eadler Date: Fri Jan 20 01:38:21 2012 New Revision: 230353 URL: http://svn.freebsd.org/changeset/base/230353 Log: Fix warning when compiling with gcc46: error: variable 'temp' set but not used Approved by: dim Approved by: cperciva (mentor, blanket for pre-mentorship already-approved commits) MFC after: 3 days I do not know which of the makefs commits it was: [andreast@neon] /export/home/andreast/> makefs -t cd9660 -o chrp-boot -o rockridge -o label=pseries -B4321 p.iso /data1/netboot/powerpc64/ Segmentation fault (core dumped) [neon:~] andreast% uname -ra FreeBSD neon.andreas.nets 10.0-CURRENT FreeBSD 10.0-CURRENT #11 r230469M: Mon Jan 23 02:53:05 CET 2012 andre...@neon.andreas.nets:/usr/obj/export/devel/fbsd/head/src/sys/NEON amd64 Reverting to 230352 lets me create an iso. I compile makefs with the base compiler. I'll do some more investigations tomorrow, late night here. if you have an idea, would be great. Thanks, Andreas ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230513 - head/sys/dev/sound/pci/hda
Author: mav Date: Tue Jan 24 22:40:24 2012 New Revision: 230513 URL: http://svn.freebsd.org/changeset/base/230513 Log: In addition to r230511, allow 8 channel AC3 formats. Modified: head/sys/dev/sound/pci/hda/hdaa.c Modified: head/sys/dev/sound/pci/hda/hdaa.c == --- head/sys/dev/sound/pci/hda/hdaa.c Tue Jan 24 21:33:34 2012 (r230512) +++ head/sys/dev/sound/pci/hda/hdaa.c Tue Jan 24 22:40:24 2012 (r230513) @@ -4979,6 +4979,10 @@ hdaa_pcmchannel_setup(struct hdaa_chan * } if (HDA_PARAM_SUPP_STREAM_FORMATS_AC3(fmtcap)) { ch->fmtlist[i++] = SND_FORMAT(AFMT_AC3, 2, 0); + if (channels >= 8) { + ch->fmtlist[i++] = SND_FORMAT(AFMT_AC3, 8, 0); + ch->fmtlist[i++] = SND_FORMAT(AFMT_AC3, 8, 1); + } } ch->fmtlist[i] = 0; i = 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r229667 - head/usr.sbin/daemon
On 01/24/2012 07:34, Guy Helmer wrote: > On Jan 6, 2012, at 6:16 PM, Doug Barton wrote: > >> On 01/06/2012 08:18, Guy Helmer wrote: >>> On Jan 5, 2012, at 8:58 PM, Doug Barton wrote: >>> On 01/05/2012 14:48, Guy Helmer wrote: > Allow daemon(8) to run pidfile_open() before relenquishing > privileges so pid files can be written in /var/run when started > as root. I'm not sure how useful this is since when daemon is exiting it won't be able to remove the pid file (unless I'm missing something). Isn't it better to pre-create the pid file with the proper permissions for the unprivileged user? >>> >>> Would it be OK for daemon to hang around and wait for the child >>> process to exit, then remove the pid file? >> >> Without having given it any kind of careful thought, that sounds Ok ... >> but I don't understand how daemon could remove a pid file written as >> root after it's already dropped privileges. (IOW that's the same problem >> I was bringing up.) >> >>> The only other alternative I see would be to create a subdirectory >>> that is writable by the user so the child can create and delete the >>> pid file. >> >> That's functionally equivalent to pre-creating the pid file with the >> right permissions, so it would be Ok. Various ports use each of these >> approaches. I'm generally in favor of using the pid file only solution >> since rc.d/cleanvar will clean all that stuff up at boot, and it's >> preferable to not leave stale directories around for stuff that is no >> longer running and/or installed. > > Having thought about it for a while, I plan to revert the change to daemon.c > that was suggested in the PR, and instead add this note to the man page: I think that reverting it is a good idea. I would add something to the effect of what's below. I continue to maintain that pre-creating the file is preferable to using directories since we'd like to avoid leaving no-longer-relevant directories around if the thing is not in use any longer. Doug > Index: daemon.8 > === > --- daemon.8 (revision 230510) > +++ daemon.8 (working copy) > @@ -59,6 +59,10 @@ > using the > .Xr pidfile 3 > functionality. > +If the > +.Fl u > +option is used the pidfile must be pre-created with the proper > +permissions, or the directory to contain the pidfile must be writable > +by the specified user. > Note, that the file will be created shortly before the process is > actually executed, and will remain after the process exits (although > it will be removed if the execution fails). > > Guy > > > This message has been scanned by ComplianceSafe, powered by Palisade's > PacketSure. > -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230512 - head/usr.bin/sockstat
Author: jilles Date: Tue Jan 24 21:33:34 2012 New Revision: 230512 URL: http://svn.freebsd.org/changeset/base/230512 Log: sockstat: Also show sockets not associated with a file descriptor. Sockets not associated with a file descriptor include TCP TIME_WAIT states and sockets created via the socket(9) API such as from rpc.lockd and the NFS client. PR: bin/164081 MFC after:2 weeks No objection: des Modified: head/usr.bin/sockstat/sockstat.1 head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.1 == --- head/usr.bin/sockstat/sockstat.1Tue Jan 24 17:31:27 2012 (r230511) +++ head/usr.bin/sockstat/sockstat.1Tue Jan 24 21:33:34 2012 (r230512) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2009 +.Dd January 24, 2012 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -137,19 +137,10 @@ The address the foreign end of the socke .Xr getpeername 2 ) . .El .Pp -Note that TCP sockets in the -.Dv AF_INET -or -.Dv AF_INET6 -domains that are not in one of the -.Dv LISTEN , SYN_SENT , -or -.Dv ESTABLISHED -states may not be shown by -.Nm ; -use -.Xr netstat 1 -to examine them instead. +If a socket is associated with more than one file descriptor, +it is shown multiple times. +If a socket is not associated with any file descriptor, +the first four columns have no meaning. .Sh SEE ALSO .Xr fstat 1 , .Xr netstat 1 , @@ -167,10 +158,3 @@ The .Nm command and this manual page were written by .An Dag-Erling Sm\(/orgrav Aq d...@freebsd.org . -.Sh BUGS -Unlike -.Xr netstat 1 , -.Nm -lists sockets by walking file descriptor tables and will not output -the ones owned by the kernel, e.g. NLM sockets created by -.Xr rpc.lockd 8 . Modified: head/usr.bin/sockstat/sockstat.c == --- head/usr.bin/sockstat/sockstat.cTue Jan 24 17:31:27 2012 (r230511) +++ head/usr.bin/sockstat/sockstat.cTue Jan 24 21:33:34 2012 (r230512) @@ -86,6 +86,7 @@ static int*ports; struct sock { void *socket; void *pcb; + int shown; int vflag; int family; int proto; @@ -571,12 +572,67 @@ check_ports(struct sock *s) } static void +displaysock(struct sock *s, int pos) +{ + void *p; + int hash; + + while (pos < 29) + pos += xprintf(" "); + pos += xprintf("%s", s->protoname); + if (s->vflag & INP_IPV4) + pos += xprintf("4 "); + if (s->vflag & INP_IPV6) + pos += xprintf("6 "); + while (pos < 36) + pos += xprintf(" "); + switch (s->family) { + case AF_INET: + case AF_INET6: + pos += printaddr(s->family, &s->laddr); + if (s->family == AF_INET6 && pos >= 58) + pos += xprintf(" "); + while (pos < 58) + pos += xprintf(" "); + pos += printaddr(s->family, &s->faddr); + break; + case AF_UNIX: + /* server */ + if (s->laddr.ss_len > 0) { + pos += printaddr(s->family, &s->laddr); + break; + } + /* client */ + p = *(void **)&s->faddr; + if (p == NULL) { + pos += xprintf("(not connected)"); + break; + } + pos += xprintf("-> "); + for (hash = 0; hash < HASHSIZE; ++hash) { + for (s = sockhash[hash]; s != NULL; s = s->next) + if (s->pcb == p) + break; + if (s != NULL) + break; + } + if (s == NULL || s->laddr.ss_len == 0) + pos += xprintf("??"); + else + pos += printaddr(s->family, &s->laddr); + break; + default: + abort(); + } + xprintf("\n"); +} + +static void display(void) { struct passwd *pwd; struct xfile *xf; struct sock *s; - void *p; int hash, n, pos; printf("%-8s %-10s %-5s %-2s %-6s %-21s %-21s\n", @@ -594,6 +650,7 @@ display(void) continue; if (!check_ports(s)) continue; + s->shown = 1; pos = 0; if ((pwd = getpwuid(xf->xf_uid)) == NULL) pos += xprintf("%lu ", (u_long)xf->xf_uid); @@ -608,54 +665,19 @@ display(void) while (pos < 26) pos += xprintf(" "); pos += xprintf("%d ", xf->xf_fd); - while (pos < 29) - pos += xprintf(" "); - pos += xprintf("%s", s->protoname); -
svn commit: r230511 - head/sys/dev/sound/pci/hda
Author: mav Date: Tue Jan 24 17:31:27 2012 New Revision: 230511 URL: http://svn.freebsd.org/changeset/base/230511 Log: Enable High Bit Rate (HBR) Encoded Packet Type (EPT), if supported (HDMI and HBR bits set) and needed (AC3 format used with 8 channels). This should allow DTS-HD/TrueHD pass-through with rates above 6.144Mbps. MFC after:2 months Sponsored by: iXsystems, Inc. Modified: head/sys/dev/sound/pci/hda/hdaa.c Modified: head/sys/dev/sound/pci/hda/hdaa.c == --- head/sys/dev/sound/pci/hda/hdaa.c Tue Jan 24 15:20:31 2012 (r230510) +++ head/sys/dev/sound/pci/hda/hdaa.c Tue Jan 24 17:31:27 2012 (r230511) @@ -1506,6 +1506,21 @@ hdaa_audio_setup(struct hdaa_chan *ch) >> (k * 4)) & 0xf) << 4) | k)); } + /* +* Enable High Bit Rate (HBR) Encoded Packet Type +* (EPT), if supported and needed (8ch data). +*/ + if (HDA_PARAM_PIN_CAP_HDMI(wp->wclass.pin.cap) && + HDA_PARAM_PIN_CAP_HBR(wp->wclass.pin.cap)) { + wp->wclass.pin.ctrl &= + ~HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK; + if ((ch->fmt & AFMT_AC3) && (cchn == 8)) + wp->wclass.pin.ctrl |= 0x03; + hda_command(ch->devinfo->dev, + HDA_CMD_SET_PIN_WIDGET_CTRL(0, nid, + wp->wclass.pin.ctrl)); + } + /* Stop audio infoframe transmission. */ hda_command(ch->devinfo->dev, HDA_CMD_SET_HDMI_DIP_INDEX(0, nid, 0x00)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r229667 - head/usr.sbin/daemon
On Jan 6, 2012, at 6:16 PM, Doug Barton wrote: > On 01/06/2012 08:18, Guy Helmer wrote: >> On Jan 5, 2012, at 8:58 PM, Doug Barton wrote: >> >>> On 01/05/2012 14:48, Guy Helmer wrote: Allow daemon(8) to run pidfile_open() before relenquishing privileges so pid files can be written in /var/run when started as root. >>> >>> I'm not sure how useful this is since when daemon is exiting it >>> won't be able to remove the pid file (unless I'm missing >>> something). >>> >>> Isn't it better to pre-create the pid file with the proper >>> permissions for the unprivileged user? >>> >> >> Would it be OK for daemon to hang around and wait for the child >> process to exit, then remove the pid file? > > Without having given it any kind of careful thought, that sounds Ok ... > but I don't understand how daemon could remove a pid file written as > root after it's already dropped privileges. (IOW that's the same problem > I was bringing up.) > >> The only other alternative I see would be to create a subdirectory >> that is writable by the user so the child can create and delete the >> pid file. > > That's functionally equivalent to pre-creating the pid file with the > right permissions, so it would be Ok. Various ports use each of these > approaches. I'm generally in favor of using the pid file only solution > since rc.d/cleanvar will clean all that stuff up at boot, and it's > preferable to not leave stale directories around for stuff that is no > longer running and/or installed. Having thought about it for a while, I plan to revert the change to daemon.c that was suggested in the PR, and instead add this note to the man page: Index: daemon.8 === --- daemon.8(revision 230510) +++ daemon.8(working copy) @@ -59,6 +59,10 @@ using the .Xr pidfile 3 functionality. +If the +.Fl u +option is used, the directory to contain the pidfile must be writable +by the specified user. Note, that the file will be created shortly before the process is actually executed, and will remain after the process exits (although it will be removed if the execution fails). Guy This message has been scanned by ComplianceSafe, powered by Palisade's PacketSure. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r230509 - head/tools/kerneldoc/subsys
On 24. Jan 2012, at 15:13 , Alexander Leidinger wrote: > Author: netchild > Date: Tue Jan 24 15:13:55 2012 > New Revision: 230509 > URL: http://svn.freebsd.org/changeset/base/230509 > > Log: > Just define __FreeBSD__ to 1 instead of doing what the compiler does. > The kernel is supposed to DTRT based upon the __FreeBSD_version value, > not the value of __FreeBSD__. > > Discussed with: bz > > Modified: > head/tools/kerneldoc/subsys/common-Doxyfile > > Modified: head/tools/kerneldoc/subsys/common-Doxyfile > == > --- head/tools/kerneldoc/subsys/common-Doxyfile Tue Jan 24 14:27:14 > 2012(r230508) > +++ head/tools/kerneldoc/subsys/common-Doxyfile Tue Jan 24 15:13:55 > 2012(r230509) > @@ -230,8 +230,12 @@ SEARCH_INCLUDES= YES > INCLUDE_PATH = $(DOXYGEN_SRC_INCLUDE_PATH) \ > . > INCLUDE_FILE_PATTERNS = *.h > +# __FreeBSD__ is normally defined to the the major version number of > +# FreeBSD. In the kernel source it is just checked for != 0, and That's not what it is and not what I said. It's checked to be defined. Defining it to 0 or even nothing will still be perfectly ok. Try cpp on this: #define FOO #ifdef FOO #warning "It works" #endif #define BAR 0 #ifdef BAR #warning "It still works" #endif #define BAZ 42 #ifdef BAZ #warning "You guessed it. It still works" #endif #ifdef NOWAY #warning "You shall never see this" #endif > +# __FreeBSD_version is used for version dependend code. > +# To make live simple on major version bumps, just define __FreeBSD__ to 1. > PREDEFINED = _KERNEL \ > - __FreeBSD__=10 \ > + __FreeBSD__=1 \ > __${TARGET_ARCH}__=1 \ > __${TARGET_ARCH}=1 > EXPAND_AS_DEFINED = -- Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230510 - head/sys/net
Author: bz Date: Tue Jan 24 15:20:31 2012 New Revision: 230510 URL: http://svn.freebsd.org/changeset/base/230510 Log: Replace random ARIN direct assignment legacy IPs with proper RFC 5735 TEST-NET1 block for use in documentation and example code addresses. MFC after:3 days Modified: head/sys/net/route.c Modified: head/sys/net/route.c == --- head/sys/net/route.cTue Jan 24 15:13:55 2012(r230509) +++ head/sys/net/route.cTue Jan 24 15:20:31 2012(r230510) @@ -1498,10 +1498,10 @@ rtinit1(struct ifaddr *ifa, int cmd, int #ifdef RADIX_MPATH /* * in case address alias finds the first address -* e.g. ifconfig bge0 192.103.54.246/24 -* e.g. ifconfig bge0 192.103.54.247/24 -* the address set in the route is 192.103.54.246 -* so we need to replace it with 192.103.54.247 +* e.g. ifconfig bge0 192.0.2.246/24 +* e.g. ifconfig bge0 192.0.2.247/24 +* the address set in the route is 192.0.2.246 +* so we need to replace it with 192.0.2.247 */ if (memcmp(rt->rt_ifa->ifa_addr, ifa->ifa_addr, ifa->ifa_addr->sa_len)) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r230252 - head/sys/fs/tmpfs
On 2012-01-23, Mikolaj Golub wrote: > JH> Yes, the patch below does that. I suspect that flipping the MNT_RDONLY > JH> flag may be enough for tmpfs but I am not sure. > > I see two issues with this patch: > > 1) 'mount -u -o rw /mnt' does not upgrade to rw, although it returns success. Argh, this is another nmount(2) bug. The update mount code automatically sets the MNT_RDONLY flag but doesn't unset it. However the string option always gets updated causing string options and flags to get out of sync. Flags covered by MNT_UPDATEMASK are unset automatically. > I think when remounting ro you should call vflush(), something like below: Right. Thanks for looking at the patch! -- Jaakko ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230509 - head/tools/kerneldoc/subsys
Author: netchild Date: Tue Jan 24 15:13:55 2012 New Revision: 230509 URL: http://svn.freebsd.org/changeset/base/230509 Log: Just define __FreeBSD__ to 1 instead of doing what the compiler does. The kernel is supposed to DTRT based upon the __FreeBSD_version value, not the value of __FreeBSD__. Discussed with: bz Modified: head/tools/kerneldoc/subsys/common-Doxyfile Modified: head/tools/kerneldoc/subsys/common-Doxyfile == --- head/tools/kerneldoc/subsys/common-Doxyfile Tue Jan 24 14:27:14 2012 (r230508) +++ head/tools/kerneldoc/subsys/common-Doxyfile Tue Jan 24 15:13:55 2012 (r230509) @@ -230,8 +230,12 @@ SEARCH_INCLUDES= YES INCLUDE_PATH = $(DOXYGEN_SRC_INCLUDE_PATH) \ . INCLUDE_FILE_PATTERNS = *.h +# __FreeBSD__ is normally defined to the the major version number of +# FreeBSD. In the kernel source it is just checked for != 0, and +# __FreeBSD_version is used for version dependend code. +# To make live simple on major version bumps, just define __FreeBSD__ to 1. PREDEFINED = _KERNEL \ - __FreeBSD__=10 \ + __FreeBSD__=1 \ __${TARGET_ARCH}__=1 \ __${TARGET_ARCH}=1 EXPAND_AS_DEFINED = ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230508 - head/sys/netinet
Author: glebius Date: Tue Jan 24 14:27:14 2012 New Revision: 230508 URL: http://svn.freebsd.org/changeset/base/230508 Log: Remove unused variable. Modified: head/sys/netinet/in_mcast.c Modified: head/sys/netinet/in_mcast.c == --- head/sys/netinet/in_mcast.c Tue Jan 24 14:17:13 2012(r230507) +++ head/sys/netinet/in_mcast.c Tue Jan 24 14:27:14 2012(r230508) @@ -1178,11 +1178,8 @@ out_inm_release: int in_leavegroup(struct in_multi *inm, /*const*/ struct in_mfilter *imf) { - struct ifnet *ifp; int error; - ifp = inm->inm_ifp; - IN_MULTI_LOCK(); error = in_leavegroup_locked(inm, imf); IN_MULTI_UNLOCK(); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230507 - head/sys/dev/sound/pci/hda
Author: mav Date: Tue Jan 24 14:17:13 2012 New Revision: 230507 URL: http://svn.freebsd.org/changeset/base/230507 Log: HDMI and DisplayPort support can coexist in HDA CODEC. Report "HDMI/DP" in PCM device name if both supported. MFC after:2 months Sponsored by: iXsystems, Inc. Modified: head/sys/dev/sound/pci/hda/hdaa.c Modified: head/sys/dev/sound/pci/hda/hdaa.c == --- head/sys/dev/sound/pci/hda/hdaa.c Tue Jan 24 13:57:30 2012 (r230506) +++ head/sys/dev/sound/pci/hda/hdaa.c Tue Jan 24 14:17:13 2012 (r230507) @@ -2793,12 +2793,11 @@ hdaa_audio_as_parse(struct hdaa_devinfo as[cnt].enable = 0; } if (HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL(w->param.widget_cap)) { + as[cnt].digital |= 0x1; + if (HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap)) + as[cnt].digital |= 0x2; if (HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap)) - as[cnt].digital = 3; - else if (HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap)) - as[cnt].digital = 2; - else - as[cnt].digital = 1; + as[cnt].digital |= 0x4; } if (as[cnt].location == -1) { as[cnt].location = @@ -6514,9 +6513,10 @@ hdaa_pcm_probe(device_t dev) snprintf(buf, sizeof(buf), "%s PCM (%s%s%s%s%s%s%s)", device_get_desc(device_get_parent(device_get_parent(dev))), loc1 >= 0 ? HDA_LOCS[loc1] : "", loc1 >= 0 ? " " : "", - (pdevinfo->digital == 3)?"DisplayPort": - ((pdevinfo->digital == 2)?"HDMI": - ((pdevinfo->digital)?"Digital":"Analog")), + (pdevinfo->digital == 0x7)?"HDMI/DP": + ((pdevinfo->digital == 0x5)?"DisplayPort": + ((pdevinfo->digital == 0x3)?"HDMI": + ((pdevinfo->digital)?"Digital":"Analog"))), chans1[0] ? " " : "", chans1, chans2[0] ? "/" : "", chans2); device_set_desc_copy(dev, buf); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230506 - head/sys/netinet6
Author: bz Date: Tue Jan 24 13:57:30 2012 New Revision: 230506 URL: http://svn.freebsd.org/changeset/base/230506 Log: Plug a possible ifa_ref leak in case of premature return from in6_purgeaddr(). Reviewed by: rwatson MFC after:3 days Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Tue Jan 24 13:23:52 2012(r230505) +++ head/sys/netinet6/in6.c Tue Jan 24 13:57:30 2012(r230506) @@ -1477,6 +1477,8 @@ in6_purgeaddr(struct ifaddr *ifa) } cleanup: + if (ifa0 != NULL) + ifa_free(ifa0); plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */ if ((ia->ia_flags & IFA_ROUTE) && plen == 128) { @@ -1501,8 +1503,6 @@ cleanup: return; ia->ia_flags &= ~IFA_ROUTE; } - if (ifa0 != NULL) - ifa_free(ifa0); in6_unlink_ifa(ia, ifp); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230505 - head/tools/regression/mdconfig
Author: trasz Date: Tue Jan 24 13:23:52 2012 New Revision: 230505 URL: http://svn.freebsd.org/changeset/base/230505 Log: Add some basic regression tests for mdconfig(8). Added: head/tools/regression/mdconfig/ head/tools/regression/mdconfig/00.t (contents, props changed) head/tools/regression/mdconfig/mdconfig.test (contents, props changed) head/tools/regression/mdconfig/run (contents, props changed) Added: head/tools/regression/mdconfig/00.t == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/mdconfig/00.t Tue Jan 24 13:23:52 2012 (r230505) @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Copyright (c) 2012 Edward Tomasz Napierała +# 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. +# +# 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$ +# + +# This is a wrapper script to run mdconfig.test. + +echo "1..1" + +if [ `whoami` != "root" ]; then + echo "not ok 1 - you need to be root to run this test." + exit 1 +fi + +TESTDIR=$(dirname $(realpath $0)) + +perl $TESTDIR/run $TESTDIR/mdconfig.test > /dev/null + +if [ $? -eq 0 ]; then + echo "ok 1" +else + echo "not ok 1" +fi Added: head/tools/regression/mdconfig/mdconfig.test == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/mdconfig/mdconfig.testTue Jan 24 13:23:52 2012(r230505) @@ -0,0 +1,192 @@ +# Copyright (c) 2012 Edward Tomasz Napierała +# 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. +# +# 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$ +# + +# This is a test for mdconfig(8) functionality. Run it as root: +# +# /usr/src/tools/regression/mdconfig/run /usr/src/tools/regression/mdconfig/mdconfig.test +# +# WARNING: Creates files in unsafe way. + +$ whoami +> root +$ umask 022 +$ truncate -s 1gb xxx + +$ mdconfig -l + +$ mdconfig -af xxx +> md0 + +# This awk thing is to strip the file path. +$ mdconfig -lv | awk '{ print $1, $2, $3 }' +> md0 vnode 1024M + +$ diskinfo -v /dev/md0 | expand +> /dev/md0 +> 512 # sectorsize +> 1073741824 # mediasize in bytes (1.0G) +> 2097152 # mediasize in sectors +> 0 # stripesize +> 0 # stripeoffset +> + +$ mdconfig -du 0 + +# Check different valid syntax variations: implicit -a. + +$ mdconfig xxx +> md0 + +$ mdconfig -lv | awk '{ print $1, $2, $
svn commit: r230504 - in stable/9/sys: amd64/include i386/include
Author: kib Date: Tue Jan 24 11:48:06 2012 New Revision: 230504 URL: http://svn.freebsd.org/changeset/base/230504 Log: MFC r230270: Add definitions for the FPU extended state header, legacy extended state and AVX state. Modified: stable/9/sys/amd64/include/fpu.h stable/9/sys/i386/include/npx.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/include/fpu.h == --- stable/9/sys/amd64/include/fpu.hTue Jan 24 11:42:46 2012 (r230503) +++ stable/9/sys/amd64/include/fpu.hTue Jan 24 11:48:06 2012 (r230504) @@ -78,6 +78,28 @@ struct savefpu { uint8_t sv_pad[96]; } __aligned(16); +struct xstate_hdr { + uint64_t xstate_bv; + uint8_t xstate_rsrv0[16]; + uint8_t xstate_rsrv[40]; +}; + +struct savefpu_xstate { + struct xstate_hdr sx_hd; + struct ymmacc sx_ymm[16]; +}; + +struct savefpu_ymm { + struct envxmm sv_env; + struct { + struct fpacc87 fp_acc; + int8_t fp_pad[6]; /* padding */ + } sv_fp[8]; + struct xmmacc sv_xmm[16]; + uint8_t sv_pad[96]; + struct savefpu_xstate sv_xstate; +} __aligned(64); + #ifdef _KERNEL struct fpu_kern_ctx { struct savefpu hwstate; Modified: stable/9/sys/i386/include/npx.h == --- stable/9/sys/i386/include/npx.h Tue Jan 24 11:42:46 2012 (r230503) +++ stable/9/sys/i386/include/npx.h Tue Jan 24 11:48:06 2012 (r230504) @@ -101,6 +101,11 @@ struct xmmacc { u_char xmm_bytes[16]; }; +/* Contents of the upper 16 bytes of each AVX extended accumulator */ +struct ymmacc { + uint8_t ymm_bytes[16]; +}; + struct savexmm { struct envxmm sv_env; struct { @@ -116,6 +121,28 @@ union savefpu { struct savexmm sv_xmm; }; +struct xstate_hdr { + uint64_t xstate_bv; + uint8_t xstate_rsrv0[16]; + uint8_t xstate_rsrv[40]; +}; + +struct savexmm_xstate { + struct xstate_hdr sx_hd; + struct ymmacc sx_ymm[16]; +}; + +struct savexmm_ymm { + struct envxmm sv_env; + struct { + struct fpacc87 fp_acc; + int8_t fp_pad[6]; /* padding */ + } sv_fp[8]; + struct xmmacc sv_xmm[16]; + uint8_t sv_pad[96]; + struct savexmm_xstate sv_xstate; +} __aligned(64); + /* * The hardware default control word for i387's and later coprocessors is * 0x37F, giving: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230503 - stable/9/sys/amd64/include
Author: kib Date: Tue Jan 24 11:42:46 2012 New Revision: 230503 URL: http://svn.freebsd.org/changeset/base/230503 Log: MFC r230269: Modernize the fpusave structures definitions by using uint*_t types. Modified: stable/9/sys/amd64/include/fpu.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/include/fpu.h == --- stable/9/sys/amd64/include/fpu.hTue Jan 24 11:28:53 2012 (r230502) +++ stable/9/sys/amd64/include/fpu.hTue Jan 24 11:42:46 2012 (r230503) @@ -43,34 +43,39 @@ /* Contents of each x87 floating point accumulator */ struct fpacc87 { - u_char fp_bytes[10]; + uint8_t fp_bytes[10]; }; /* Contents of each SSE extended accumulator */ struct xmmacc { - u_char xmm_bytes[16]; + uint8_t xmm_bytes[16]; +}; + +/* Contents of the upper 16 bytes of each AVX extended accumulator */ +struct ymmacc { + uint8_t ymm_bytes[16]; }; struct envxmm { - u_int16_t en_cw; /* control word (16bits) */ - u_int16_t en_sw; /* status word (16bits) */ - u_int8_ten_tw; /* tag word (8bits) */ - u_int8_ten_zero; - u_int16_t en_opcode; /* opcode last executed (11 bits ) */ - u_int64_t en_rip; /* floating point instruction pointer */ - u_int64_t en_rdp; /* floating operand pointer */ - u_int32_t en_mxcsr; /* SSE sontorol/status register */ - u_int32_t en_mxcsr_mask; /* valid bits in mxcsr */ + uint16_ten_cw; /* control word (16bits) */ + uint16_ten_sw; /* status word (16bits) */ + uint8_t en_tw; /* tag word (8bits) */ + uint8_t en_zero; + uint16_ten_opcode; /* opcode last executed (11 bits ) */ + uint64_ten_rip; /* floating point instruction pointer */ + uint64_ten_rdp; /* floating operand pointer */ + uint32_ten_mxcsr; /* SSE sontorol/status register */ + uint32_ten_mxcsr_mask; /* valid bits in mxcsr */ }; struct savefpu { struct envxmm sv_env; struct { struct fpacc87 fp_acc; - u_char fp_pad[6]; /* padding */ + uint8_t fp_pad[6]; /* padding */ } sv_fp[8]; struct xmmacc sv_xmm[16]; - u_char sv_pad[96]; + uint8_t sv_pad[96]; } __aligned(16); #ifdef _KERNEL ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230502 - stable/9/sys/amd64/include
Author: kib Date: Tue Jan 24 11:28:53 2012 New Revision: 230502 URL: http://svn.freebsd.org/changeset/base/230502 Log: MFC r230262: Implement xsetbv(), xsave() and xrstor(). Modified: stable/9/sys/amd64/include/cpufunc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/include/cpufunc.h == --- stable/9/sys/amd64/include/cpufunc.hTue Jan 24 11:10:32 2012 (r230501) +++ stable/9/sys/amd64/include/cpufunc.hTue Jan 24 11:28:53 2012 (r230502) @@ -669,6 +669,41 @@ intr_restore(register_t rflags) write_rflags(rflags); } +static __inline void +xsetbv(uint32_t reg, uint64_t val) +{ + uint32_t low, hi; + + low = val; + hi = val >> 32; + __asm __volatile(".byte 0x0f,0x01,0xd1" : : + "c" (reg), "a" (low), "d" (hi)); +} + +static __inline void +xsave(char *addr, uint64_t mask) +{ + uint32_t low, hi; + + low = mask; + hi = mask >> 32; + /* xsave (%rdi) */ + __asm __volatile(".byte 0x0f,0xae,0x27" : : + "a" (low), "d" (hi), "D" (addr) : "memory"); +} + +static __inline void +xrstor(char *addr, uint64_t mask) +{ + uint32_t low, hi; + + low = mask; + hi = mask >> 32; + /* xrstor (%rdi) */ + __asm __volatile(".byte 0x0f,0xae,0x2f" : : + "a" (low), "d" (hi), "D" (addr)); +} + #else /* !(__GNUCLIKE_ASM && __CC_SUPPORTS___INLINE) */ intbreakpoint(void); @@ -733,6 +768,9 @@ u_int rgs(void); void wbinvd(void); void write_rflags(u_int rf); void wrmsr(u_int msr, uint64_t newval); +void xsetbv(uint32_t reg, uint64_t val); +void xsave(char *addr, uint64_t mask); +void xrstor(char *addr, uint64_t mask); #endif /* __GNUCLIKE_ASM && __CC_SUPPORTS___INLINE */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230501 - in stable/9/sys: amd64/include i386/include
Author: kib Date: Tue Jan 24 11:10:32 2012 New Revision: 230501 URL: http://svn.freebsd.org/changeset/base/230501 Log: MFC r230261: Add definitions related to XCR0. Modified: stable/9/sys/amd64/include/specialreg.h stable/9/sys/i386/include/specialreg.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/include/specialreg.h == --- stable/9/sys/amd64/include/specialreg.h Tue Jan 24 11:06:22 2012 (r230500) +++ stable/9/sys/amd64/include/specialreg.h Tue Jan 24 11:10:32 2012 (r230501) @@ -66,6 +66,7 @@ #defineCR4_PCE 0x0100 /* Performance monitoring counter enable */ #defineCR4_FXSR 0x0200 /* Fast FPU save/restore used by OS */ #defineCR4_XMM 0x0400 /* enable SIMD/MMX2 to use except 16 */ +#defineCR4_XSAVE 0x0004/* XSETBV/XGETBV */ /* * Bits in AMD64 special registers. EFER is 64 bits wide. @@ -76,6 +77,18 @@ #defineEFER_NXE 0x00800/* PTE No-Execute bit enable (R/W) */ /* + * Intel Extended Features registers + */ +#defineXCR00 /* XFEATURE_ENABLED_MASK register */ + +#defineXFEATURE_ENABLED_X870x0001 +#defineXFEATURE_ENABLED_SSE0x0002 +#defineXFEATURE_ENABLED_AVX0x0004 + +#defineXFEATURE_AVX\ +(XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE | XFEATURE_ENABLED_AVX) + +/* * CPUID instruction features register */ #defineCPUID_FPU 0x0001 Modified: stable/9/sys/i386/include/specialreg.h == --- stable/9/sys/i386/include/specialreg.h Tue Jan 24 11:06:22 2012 (r230500) +++ stable/9/sys/i386/include/specialreg.h Tue Jan 24 11:10:32 2012 (r230501) @@ -66,6 +66,7 @@ #defineCR4_PCE 0x0100 /* Performance monitoring counter enable */ #defineCR4_FXSR 0x0200 /* Fast FPU save/restore used by OS */ #defineCR4_XMM 0x0400 /* enable SIMD/MMX2 to use except 16 */ +#defineCR4_XSAVE 0x0004/* XSETBV/XGETBV */ /* * Bits in AMD64 special registers. EFER is 64 bits wide. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230500 - head/tools/kerneldoc/subsys
Author: netchild Date: Tue Jan 24 11:06:22 2012 New Revision: 230500 URL: http://svn.freebsd.org/changeset/base/230500 Log: We are in FreeBSD 10 now: define __FreeBSD__ to 10. Modified: head/tools/kerneldoc/subsys/common-Doxyfile Modified: head/tools/kerneldoc/subsys/common-Doxyfile == --- head/tools/kerneldoc/subsys/common-Doxyfile Tue Jan 24 10:56:40 2012 (r230499) +++ head/tools/kerneldoc/subsys/common-Doxyfile Tue Jan 24 11:06:22 2012 (r230500) @@ -231,7 +231,7 @@ INCLUDE_PATH = $(DOXYGEN_SRC_I . INCLUDE_FILE_PATTERNS = *.h PREDEFINED = _KERNEL \ - __FreeBSD__=9 \ + __FreeBSD__=10 \ __${TARGET_ARCH}__=1 \ __${TARGET_ARCH}=1 EXPAND_AS_DEFINED = ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230499 - stable/9/sys/amd64/include
Author: kib Date: Tue Jan 24 10:56:40 2012 New Revision: 230499 URL: http://svn.freebsd.org/changeset/base/230499 Log: MFC r230260: Add macro IS_BSP() to check whether the current CPU is BSP. Modified: stable/9/sys/amd64/include/pcpu.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/include/pcpu.h == --- stable/9/sys/amd64/include/pcpu.h Tue Jan 24 10:32:02 2012 (r230498) +++ stable/9/sys/amd64/include/pcpu.h Tue Jan 24 10:56:40 2012 (r230499) @@ -226,6 +226,8 @@ __curthread(void) } #definecurthread (__curthread()) +#defineIS_BSP()(PCPU_GET(cpuid) == 0) + #else /* !lint || defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE___TYPEOF) */ #error "this file needs to be ported to your compiler" ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230498 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: pluknet Date: Tue Jan 24 10:32:02 2012 New Revision: 230498 URL: http://svn.freebsd.org/changeset/base/230498 Log: MFC r230256: Fix the "lock &zrl->zr_mtx already initialized" assertion by initializing the allocated memory before calling mtx_init(9) on mtx pointing to it. Otherwize, random contents of uninitialized memory might occasionally trigger the assertion. Reported by: Pavel Polyakov Reviewed by: pjd Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Tue Jan 24 10:28:19 2012(r230497) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Tue Jan 24 10:32:02 2012(r230498) @@ -1077,7 +1077,7 @@ dnode_hold_impl(objset_t *os, uint64_t o if (children_dnodes == NULL) { int i; dnode_children_t *winner; - children_dnodes = kmem_alloc(sizeof (dnode_children_t) + + children_dnodes = kmem_zalloc(sizeof (dnode_children_t) + (epb - 1) * sizeof (dnode_handle_t), KM_SLEEP); children_dnodes->dnc_count = epb; dnh = &children_dnodes->dnc_children[0]; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230497 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: pluknet Date: Tue Jan 24 10:28:19 2012 New Revision: 230497 URL: http://svn.freebsd.org/changeset/base/230497 Log: MFC r230256: Fix the "lock &zrl->zr_mtx already initialized" assertion by initializing the allocated memory before calling mtx_init(9) on mtx pointing to it. Otherwize, random contents of uninitialized memory might occasionally trigger the assertion. Reported by: Pavel Polyakov Reviewed by: pjd Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Tue Jan 24 09:51:42 2012(r230496) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Tue Jan 24 10:28:19 2012(r230497) @@ -1077,7 +1077,7 @@ dnode_hold_impl(objset_t *os, uint64_t o if (children_dnodes == NULL) { int i; dnode_children_t *winner; - children_dnodes = kmem_alloc(sizeof (dnode_children_t) + + children_dnodes = kmem_zalloc(sizeof (dnode_children_t) + (epb - 1) * sizeof (dnode_handle_t), KM_SLEEP); children_dnodes->dnc_count = epb; dnh = &children_dnodes->dnc_children[0]; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r230252 - head/sys/fs/tmpfs
On Mon, Jan 23, 2012 at 11:05:42PM +0200, Mikolaj Golub wrote: > > On Mon, 23 Jan 2012 17:34:57 +0200 Jaakko Heinonen wrote: > > JH> On 2012-01-22, Mikolaj Golub wrote: > >> Also, may be we should allow remounting ro (and may be some othe options) > for > >> tmpfs? > > JH> Yes, the patch below does that. I suspect that flipping the MNT_RDONLY > JH> flag may be enough for tmpfs but I am not sure. > > I see two issues with this patch: > > 1) 'mount -u -o rw /mnt' does not upgrade to rw, although it returns success. > > 2) if you have a file open for write, after remounting ro you still can write > to the file. The expected behaviour: remount fails with EBUSY if force option > is not specified; after remounting with force writing to the fail fails with > EIO. > > I think when remounting ro you should call vflush(), something like below: > > flags = WRITECLOSE; > if (mp->mnt_flag & MNT_FORCE) > flags |= FORCECLOSE; > error = vflush(mp, 0, flags, curthread); > if (error != 0) > return (error); > MNT_ILOCK(mp); > mp->mnt_flag |= MNT_RDONLY; > MNT_IUNLOCK(mp); > > and when upgrading to rw reset MNT_RDONLY flag: > > MNT_ILOCK(mp); > mp->mnt_flag &= ~MNT_RDONLY; > MNT_IUNLOCK(mp); > > I have no idea if something else is needed for tmpfs. Yes, this is needed but not enough. Since other writeable opens may happen during the vflush(), you might still end up with the mount point which is not safe to set MNT_RDONLY flag. FFS suspends the writes on the mp while doing remount. Other filesystems like tmpfs and nfs could also perform suspend during remounts and unmounts, but the complications are the atime and deferred inactivations. See ufs/ffs/ffs_snapshot.c:process_deferred_inactive(), the handling of IN_LAZYACCESS and ufs_inactive(). pgpEFP461j04d.pgp Description: PGP signature
Re: svn commit: r228424 - in head/sys: kern sys
On 23 January 2012 23:53, Florian Smeets wrote: > which creates a database work set of ~1.5GB. Max throughput was achieved > at 20 Clients. > At 40 threads the results varied between 43000 - 76500 across reboots. > Attilio suspects that this can be caused by the kernel memory layout > changing under the woods creating cache effects difficult to control, > therefor the scaling factor was reduced to 10 (~150MB work set) and the > numbers got deterministic across reboot. Or possibly NUMA? Though 40 processes and 1.5 GB seem too low for NUMA effects to be so noticable... Was the round-robin allocator talked about in here: http://lists.freebsd.org/pipermail/freebsd-hackers/2011-October/036525.html ever actually committed? I seem to remember some other thread which said it wasn't yet but can't find it now, and I also cannot find the commit. AFAIK the current state of NUMA is still described in http://svn.freebsd.org/changeset/base/210550 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230496 - head/sys/netinet6
Author: pluknet Date: Tue Jan 24 09:51:42 2012 New Revision: 230496 URL: http://svn.freebsd.org/changeset/base/230496 Log: Remove the stale XXX rt_newaddrmsg comment. A routing socket message is generated since r192282. Reviewed by: bz MFC after:3 days Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Tue Jan 24 08:04:38 2012(r230495) +++ head/sys/netinet6/in6.c Tue Jan 24 09:51:42 2012(r230496) @@ -154,10 +154,6 @@ in6_ifaddloop(struct ifaddr *ifa) ifp = ifa->ifa_ifp; IF_AFDATA_LOCK(ifp); ifa->ifa_rtrequest = nd6_rtrequest; - - /* XXX QL -* we need to report rt_newaddrmsg -*/ ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | LLE_EXCLUSIVE), (struct sockaddr *)&ia->ia_addr); IF_AFDATA_UNLOCK(ifp); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r230495 - head/usr.sbin/jail
Author: mm Date: Tue Jan 24 08:04:38 2012 New Revision: 230495 URL: http://svn.freebsd.org/changeset/base/230495 Log: Try resolving jail path with realpath(3). jail(8) does a chdir(2) to the given path argument. Kernel evaluates the jail path from the new cwd and not from the original cwd, which leads to undesired behavior if given a relative path. Reviewed by: jamie MFC after:2 weeks Modified: head/usr.sbin/jail/jail.c Modified: head/usr.sbin/jail/jail.c == --- head/usr.sbin/jail/jail.c Tue Jan 24 06:21:38 2012(r230494) +++ head/usr.sbin/jail/jail.c Tue Jan 24 08:04:38 2012(r230495) @@ -508,6 +508,7 @@ static void set_param(const char *name, char *value) { struct jailparam *param; + char path[PATH_MAX]; int i; static int paramlistsize; @@ -520,8 +521,13 @@ set_param(const char *name, char *value) } /* jail_set won't chdir along with its chroot, so do it here. */ - if (!strcmp(name, "path") && chdir(value) < 0) - err(1, "chdir: %s", value); + if (!strcmp(name, "path")) { + /* resolve the path with realpath(3) */ + if (realpath(value, path) != NULL) + value = path; + if (chdir(value) < 0) + err(1, "chdir: %s", value); + } /* Check for repeat parameters */ for (i = 0; i < nparams; i++) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"