Re: svn commit: r294470 - head/libexec/rtld-elf
On Thu, Jan 21, 2016 at 11:36 PM, Alexander Kabaevwrote: > On Thu, 21 Jan 2016 22:20:12 +0100 > Antoine Brodin wrote: > >> On Thu, Jan 21, 2016 at 12:26 AM, Alexander Kabaev >> wrote: >> > Author: kan >> > Date: Wed Jan 20 23:26:35 2016 >> > New Revision: 294470 >> > URL: https://svnweb.freebsd.org/changeset/base/294470 >> > >> > Log: >> > Fix initlist_add_object invocation parameters. >> > >> > The tail parameter should point to the last object for >> > which dependencies should be processed. In most cases, >> > this is the object itself. >> > >> > Modified: >> > head/libexec/rtld-elf/rtld.c >> >> Hi, >> >> It seems there are still some hangs after this fix (seen on the -head >> package builders, tar -xf hanging for instance). >> >> Cheers, >> >> Antoine > > I've seen hangs _before_ this fix but none after. You'd have to collect > some backtraces and share with me and kib@. False alarm, for unknown reasons java/eclipse eats all CPU on head and other ports were starving. Cheers, Antoine ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r294627 - head/share/man/man5
On 23/01/2016 11:25 PM, Edward Tomasz Napierala wrote: > Author: trasz > Date: Sat Jan 23 12:25:24 2016 > New Revision: 294627 > URL: https://svnweb.freebsd.org/changeset/base/294627 > > Log: > Advertise support for ext3 and ext4. > > MFC after: 1 month > Sponsored by: The FreeBSD Foundation > > Modified: > head/share/man/man5/ext2fs.5 > > Modified: head/share/man/man5/ext2fs.5 > == > --- head/share/man/man5/ext2fs.5 Sat Jan 23 12:19:37 2016 > (r294626) > +++ head/share/man/man5/ext2fs.5 Sat Jan 23 12:25:24 2016 > (r294627) > @@ -26,12 +26,12 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd October 1, 2013 > +.Dd January 23, 2016 > .Dt EXT2FS 5 > .Os > .Sh NAME > .Nm ext2fs > -.Nd "Ext2fs file system" > +.Nd "ext2/ext3/ext4 file system" > .Sh SYNOPSIS > To link into the kernel: > .Bd -ragged -offset indent > @@ -47,8 +47,14 @@ The > driver will permit the > .Fx > kernel to access > -.Tn Ext2 > +.Tn ext2 , > +.Tn ext3 , > +and > +.Tn ext4 > file systems. > +The > +.Tn ext4 > +support is read-only. > .Sh EXAMPLES > To mount a > .Nm Thanks for this :) Thoughts on renaming the module to something less specific than ext2, like extfs? Does anyone remember this question coming up before? If I had a dollar for every user I've helped find this, that has replied 'oh! I thought that was only ext2', I'd have like $43. Also, any reason why we don't have a mount_extfs(8) command? Can we also have (man,mount) aliases for each of extN that is supported? Asking for a friend (the community) ./koobs ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294625 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: trasz Date: Sat Jan 23 12:13:09 2016 New Revision: 294625 URL: https://svnweb.freebsd.org/changeset/base/294625 Log: Fix ru_oublocks accounting for ZFS. There are two code paths that can be called from zfs_write() - one of them, through dmu_write(), was handled correctly; the other wasn't. Reviewed by: avg@ MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D4923 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sat Jan 23 12:10:16 2016(r294624) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sat Jan 23 12:13:09 2016(r294625) @@ -1420,6 +1420,9 @@ dmu_assign_arcbuf(dmu_buf_t *handle, uin */ if (offset == db->db.db_offset && blksz == db->db.db_size && DBUF_GET_BUFC_TYPE(db) == ARC_BUFC_DATA) { +#ifdef _KERNEL + curthread->td_ru.ru_oublock++; +#endif dbuf_assign_arcbuf(db, buf, tx); dbuf_rele(db, FTAG); } else { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294632 - head/sys/dev/sound/pci
Author: br Date: Sat Jan 23 13:34:55 2016 New Revision: 294632 URL: https://svnweb.freebsd.org/changeset/base/294632 Log: o Add gain-level control registers. o Fix style. Sponsored by: Machdep, Inc. Modified: head/sys/dev/sound/pci/hdspe.h Modified: head/sys/dev/sound/pci/hdspe.h == --- head/sys/dev/sound/pci/hdspe.h Sat Jan 23 12:56:28 2016 (r294631) +++ head/sys/dev/sound/pci/hdspe.h Sat Jan 23 13:34:55 2016 (r294632) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012 Ruslan Bukin+ * Copyright (c) 2012-2016 Ruslan Bukin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,71 +26,97 @@ * $FreeBSD$ */ -#define PCI_VENDOR_XILINX 0x10ee -#define PCI_DEVICE_XILINX_HDSPE0x3fc6 /* AIO, MADI, AES, RayDAT */ -#define PCI_CLASS_REVISION 0x08 -#define PCI_REVISION_AIO 212 -#define PCI_REVISION_RAYDAT211 +#definePCI_VENDOR_XILINX 0x10ee +#definePCI_DEVICE_XILINX_HDSPE 0x3fc6 /* AIO, MADI, AES, RayDAT */ +#definePCI_CLASS_REVISION 0x08 +#definePCI_REVISION_AIO212 +#definePCI_REVISION_RAYDAT 211 -#define AIO0 -#define RAYDAT 1 +#defineAIO 0 +#defineRAYDAT 1 /* Hardware mixer */ -#define HDSPE_OUT_ENABLE_BASE 512 -#define HDSPE_IN_ENABLE_BASE 768 -#define HDSPE_MIXER_BASE 32768 -#define HDSPE_MAX_GAIN 32768 +#defineHDSPE_OUT_ENABLE_BASE 512 +#defineHDSPE_IN_ENABLE_BASE768 +#defineHDSPE_MIXER_BASE32768 +#defineHDSPE_MAX_GAIN 32768 /* Buffer */ -#define HDSPE_PAGE_ADDR_BUF_OUT8192 -#define HDSPE_PAGE_ADDR_BUF_IN (HDSPE_PAGE_ADDR_BUF_OUT + 64 * 16 * 4) -#define HDSPE_BUF_POSITION_MASK0x000FFC0 +#defineHDSPE_PAGE_ADDR_BUF_OUT 8192 +#defineHDSPE_PAGE_ADDR_BUF_IN (HDSPE_PAGE_ADDR_BUF_OUT + 64 * 16 * 4) +#defineHDSPE_BUF_POSITION_MASK 0x000FFC0 /* Frequency */ -#define HDSPE_FREQ_0 (1<<6) -#define HDSPE_FREQ_1 (1<<7) -#define HDSPE_FREQ_DOUBLE (1<<8) -#define HDSPE_FREQ_QUAD(1<<31) - -#define HDSPE_FREQ_32000 HDSPE_FREQ_0 -#define HDSPE_FREQ_44100 HDSPE_FREQ_1 -#define HDSPE_FREQ_48000 (HDSPE_FREQ_0 | HDSPE_FREQ_1) -#define HDSPE_FREQ_MASK(HDSPE_FREQ_0 | HDSPE_FREQ_1 | \ +#defineHDSPE_FREQ_0(1 << 6) +#defineHDSPE_FREQ_1(1 << 7) +#defineHDSPE_FREQ_DOUBLE (1 << 8) +#defineHDSPE_FREQ_QUAD (1 << 31) + +#defineHDSPE_FREQ_32000HDSPE_FREQ_0 +#defineHDSPE_FREQ_44100HDSPE_FREQ_1 +#defineHDSPE_FREQ_48000(HDSPE_FREQ_0 | HDSPE_FREQ_1) +#defineHDSPE_FREQ_MASK (HDSPE_FREQ_0 | HDSPE_FREQ_1 | \ HDSPE_FREQ_DOUBLE | HDSPE_FREQ_QUAD) -#define HDSPE_FREQ_MASK_DEFAULTHDSPE_FREQ_48000 -#define HDSPE_FREQ_REG 256 -#define HDSPE_FREQ_AIO 1048576ULL +#defineHDSPE_FREQ_MASK_DEFAULT HDSPE_FREQ_48000 +#defineHDSPE_FREQ_REG 256 +#defineHDSPE_FREQ_AIO 1048576ULL -#define HDSPE_SPEED_DEFAULT48000 +#defineHDSPE_SPEED_DEFAULT 48000 /* Latency */ -#define HDSPE_LAT_0(1<<1) -#define HDSPE_LAT_1(1<<2) -#define HDSPE_LAT_2(1<<3) -#define HDSPE_LAT_MASK (HDSPE_LAT_0 | HDSPE_LAT_1 | HDSPE_LAT_2) -#define HDSPE_LAT_BYTES_MAX(4096 * 4) -#define HDSPE_LAT_BYTES_MIN(32 * 4) -#define hdspe_encode_latency(x)(((x)<<1) & HDSPE_LAT_MASK) +#defineHDSPE_LAT_0 (1 << 1) +#defineHDSPE_LAT_1 (1 << 2) +#defineHDSPE_LAT_2 (1 << 3) +#defineHDSPE_LAT_MASK (HDSPE_LAT_0 | HDSPE_LAT_1 | HDSPE_LAT_2) +#defineHDSPE_LAT_BYTES_MAX (4096 * 4) +#defineHDSPE_LAT_BYTES_MIN (32 * 4) +#definehdspe_encode_latency(x) (((x)<<1) & HDSPE_LAT_MASK) + +/* Gain */ +#defineHDSP_ADGain0(1 << 25) +#defineHDSP_ADGain1(1 << 26) +#defineHDSP_DAGain0(1 << 27) +#defineHDSP_DAGain1
svn commit: r294623 - head/libexec/rtld-elf/riscv
Author: br Date: Sat Jan 23 11:46:52 2016 New Revision: 294623 URL: https://svnweb.freebsd.org/changeset/base/294623 Log: Follow r293066 adding a generalized exec hook for RISC-V as well. Modified: head/libexec/rtld-elf/riscv/rtld_machdep.h Modified: head/libexec/rtld-elf/riscv/rtld_machdep.h == --- head/libexec/rtld-elf/riscv/rtld_machdep.h Sat Jan 23 11:05:13 2016 (r294622) +++ head/libexec/rtld-elf/riscv/rtld_machdep.h Sat Jan 23 11:46:52 2016 (r294623) @@ -108,4 +108,6 @@ extern void *__tls_get_addr(tls_index* t #defineRTLD_DEFAULT_STACK_PF_EXEC PF_X #defineRTLD_DEFAULT_STACK_EXEC PROT_EXEC +#definemd_abi_variant_hook(x) + #endif ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294627 - head/share/man/man5
Author: trasz Date: Sat Jan 23 12:25:24 2016 New Revision: 294627 URL: https://svnweb.freebsd.org/changeset/base/294627 Log: Advertise support for ext3 and ext4. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/share/man/man5/ext2fs.5 Modified: head/share/man/man5/ext2fs.5 == --- head/share/man/man5/ext2fs.5Sat Jan 23 12:19:37 2016 (r294626) +++ head/share/man/man5/ext2fs.5Sat Jan 23 12:25:24 2016 (r294627) @@ -26,12 +26,12 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd January 23, 2016 .Dt EXT2FS 5 .Os .Sh NAME .Nm ext2fs -.Nd "Ext2fs file system" +.Nd "ext2/ext3/ext4 file system" .Sh SYNOPSIS To link into the kernel: .Bd -ragged -offset indent @@ -47,8 +47,14 @@ The driver will permit the .Fx kernel to access -.Tn Ext2 +.Tn ext2 , +.Tn ext3 , +and +.Tn ext4 file systems. +The +.Tn ext4 +support is read-only. .Sh EXAMPLES To mount a .Nm ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294620 - head/sys/amd64/linux
Author: dchagin Date: Sat Jan 23 08:04:29 2016 New Revision: 294620 URL: https://svnweb.freebsd.org/changeset/base/294620 Log: Fix a typo. MFC after:3 days Modified: head/sys/amd64/linux/linux.h Modified: head/sys/amd64/linux/linux.h == --- head/sys/amd64/linux/linux.hSat Jan 23 07:35:29 2016 (r294619) +++ head/sys/amd64/linux/linux.hSat Jan 23 08:04:29 2016 (r294620) @@ -530,8 +530,8 @@ struct l_pollfd { #define LINUX_ARCH_SET_GS 0x1001 #define LINUX_ARCH_SET_FS 0x1002 -#define LINUX_ARCH_GET_GS 0x1003 -#define LINUX_ARCH_GET_FS 0x1004 +#define LINUX_ARCH_GET_FS 0x1003 +#define LINUX_ARCH_GET_GS 0x1004 #definelinux_copyout_rusage(r, u) copyout(r, u, sizeof(*r)) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294626 - head/bin/setfacl
Author: trasz Date: Sat Jan 23 12:19:37 2016 New Revision: 294626 URL: https://svnweb.freebsd.org/changeset/base/294626 Log: Don't mention the "canonical six" in setfacl(1); it describes semantics that's long gone. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/bin/setfacl/setfacl.1 Modified: head/bin/setfacl/setfacl.1 == --- head/bin/setfacl/setfacl.1 Sat Jan 23 12:13:09 2016(r294625) +++ head/bin/setfacl/setfacl.1 Sat Jan 23 12:19:37 2016(r294626) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 4, 2015 +.Dd January 23, 2016 .Dt SETFACL 1 .Os .Sh NAME @@ -62,8 +62,9 @@ starting at position counting from zero. This option is only applicable to NFSv4 ACLs. .It Fl b -Remove all ACL entries except for the three required entries -(POSIX.1e ACLs) or six "canonical" entries (NFSv4 ACLs). +Remove all ACL entries except for the ones synthesized +from the file mode - the three mandatory entries in case +of POSIX.1e ACL. If the POSIX.1e ACL contains a .Dq Li mask entry, the permissions of the ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294621 - head/sys/amd64/linux
Author: dchagin Date: Sat Jan 23 08:08:06 2016 New Revision: 294621 URL: https://svnweb.freebsd.org/changeset/base/294621 Log: Remove obsolete comment. MFC after:3 days Modified: head/sys/amd64/linux/linux_machdep.c Modified: head/sys/amd64/linux/linux_machdep.c == --- head/sys/amd64/linux/linux_machdep.cSat Jan 23 08:04:29 2016 (r294620) +++ head/sys/amd64/linux/linux_machdep.cSat Jan 23 08:08:06 2016 (r294621) @@ -383,7 +383,6 @@ linux_sigaltstack(struct thread *td, str return (error); } -/* XXX do all */ int linux_arch_prctl(struct thread *td, struct linux_arch_prctl_args *args) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294624 - head/sbin/kldstat
Author: trasz Date: Sat Jan 23 12:10:16 2016 New Revision: 294624 URL: https://svnweb.freebsd.org/changeset/base/294624 Log: Add "kldstat -h"; showing module sizes in hex is rather weird. Reviewed by: emaste@ (earlier version) MFC after:1 month Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D4969 Modified: head/sbin/kldstat/Makefile head/sbin/kldstat/kldstat.8 head/sbin/kldstat/kldstat.c Modified: head/sbin/kldstat/Makefile == --- head/sbin/kldstat/Makefile Sat Jan 23 11:46:52 2016(r294623) +++ head/sbin/kldstat/Makefile Sat Jan 23 12:10:16 2016(r294624) @@ -29,4 +29,6 @@ PROG= kldstat MAN= kldstat.8 +LIBADD=util + .include Modified: head/sbin/kldstat/kldstat.8 == --- head/sbin/kldstat/kldstat.8 Sat Jan 23 11:46:52 2016(r294623) +++ head/sbin/kldstat/kldstat.8 Sat Jan 23 12:10:16 2016(r294624) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 22, 2014 +.Dd January 19, 2016 .Dt KLDSTAT 8 .Os .Sh NAME @@ -33,6 +33,7 @@ .Nd display status of dynamic kernel linker .Sh SYNOPSIS .Nm +.Op Fl h .Op Fl q .Op Fl v .Op Fl i Ar id @@ -48,6 +49,9 @@ kernel. .Pp The following options are available: .Bl -tag -width indentXX +.It Fl h +Display the size field in a human-readable form, using unit suffixes +instead of hex values. .It Fl v Be more verbose. .It Fl i Ar id Modified: head/sbin/kldstat/kldstat.c == --- head/sbin/kldstat/kldstat.c Sat Jan 23 11:46:52 2016(r294623) +++ head/sbin/kldstat/kldstat.c Sat Jan 23 12:10:16 2016(r294624) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -51,18 +52,27 @@ printmod(int modid) } static void -printfile(int fileid, int verbose) +printfile(int fileid, int verbose, int humanized) { struct kld_file_stat stat; int modid; +char buf[5]; stat.version = sizeof(struct kld_file_stat); -if (kldstat(fileid, ) < 0) +if (kldstat(fileid, ) < 0) { err(1, "can't stat file id %d", fileid); -else - printf("%2d %4d %p %-8zx %s", - stat.id, stat.refs, stat.address, stat.size, - stat.name); +} else { + if (humanized) { + humanize_number(buf, sizeof(buf), stat.size, + "", HN_AUTOSCALE, HN_DECIMAL | HN_NOSPACE); + + printf("%2d %4d %p %5s %s", + stat.id, stat.refs, stat.address, buf, stat.name); + } else { + printf("%2d %4d %p %-8zx %s", + stat.id, stat.refs, stat.address, stat.size, stat.name); + } +} if (verbose) { printf(" (%s)\n", stat.pathname); @@ -78,7 +88,7 @@ printfile(int fileid, int verbose) static void usage(void) { -fprintf(stderr, "usage: kldstat [-q] [-v] [-i id] [-n filename]\n"); +fprintf(stderr, "usage: kldstat [-h] [-q] [-v] [-i id] [-n filename]\n"); fprintf(stderr, " kldstat [-q] [-m modname]\n"); exit(1); } @@ -87,6 +97,7 @@ int main(int argc, char** argv) { int c; +int humanized = 0; int verbose = 0; int fileid = 0; int quiet = 0; @@ -94,8 +105,11 @@ main(int argc, char** argv) char* modname = NULL; char* p; -while ((c = getopt(argc, argv, "i:m:n:qv")) != -1) +while ((c = getopt(argc, argv, "hi:m:n:qv")) != -1) switch (c) { + case 'h': + humanized = 1; + break; case 'i': fileid = (int)strtoul(optarg, , 10); if (*p != '\0') @@ -155,12 +169,15 @@ main(int argc, char** argv) } } -printf("Id Refs Address%*c Size Name\n", POINTER_WIDTH - 7, ' '); +if (humanized) + printf("Id Refs Address%*c Size Name\n", POINTER_WIDTH - 7, ' '); +else + printf("Id Refs Address%*c Size Name\n", POINTER_WIDTH - 7, ' '); if (fileid != 0) - printfile(fileid, verbose); + printfile(fileid, verbose, humanized); else for (fileid = kldnext(0); fileid > 0; fileid = kldnext(fileid)) - printfile(fileid, verbose); + printfile(fileid, verbose, humanized); return 0; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294638 - head/share/man/man9
Author: bjk (doc committer) Date: Sat Jan 23 20:01:46 2016 New Revision: 294638 URL: https://svnweb.freebsd.org/changeset/base/294638 Log: Document that hashinit(9) can wait for memory to be available Also tweak nearby grammar while here. Submitted by: Daniel O'Connor (original version) Modified: head/share/man/man9/hashinit.9 Modified: head/share/man/man9/hashinit.9 == --- head/share/man/man9/hashinit.9 Sat Jan 23 19:13:48 2016 (r294637) +++ head/share/man/man9/hashinit.9 Sat Jan 23 20:01:46 2016 (r294638) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 10, 2004 +.Dd January 23, 2016 .Dt HASHINIT 9 .Os .Sh NAME @@ -102,9 +102,11 @@ Any malloc performed by the .Fn hashinit_flags function will not be allowed to wait, and therefore may fail. .It Dv HASH_WAITOK -Any malloc performed by the +Any malloc performed by .Fn hashinit_flags function is allowed to wait for memory. +This is also the behavior of +.Fn hashinit . .El .Sh IMPLEMENTATION NOTES The largest prime hash value chosen by ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294635 - stable/10/usr.bin/iscsictl
Author: trasz Date: Sat Jan 23 15:48:14 2016 New Revision: 294635 URL: https://svnweb.freebsd.org/changeset/base/294635 Log: MFC r289453: Add -w flag to iscsictl(8) utility, to make it wait for successfull session establishment. Scripting is kind of hard without it. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/iscsictl/iscsictl.8 stable/10/usr.bin/iscsictl/iscsictl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/iscsictl/iscsictl.8 == --- stable/10/usr.bin/iscsictl/iscsictl.8 Sat Jan 23 15:33:11 2016 (r294634) +++ stable/10/usr.bin/iscsictl/iscsictl.8 Sat Jan 23 15:48:14 2016 (r294635) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 2014 +.Dd October 17, 2015 .Dt ISCSICTL 8 .Os .Sh NAME @@ -36,7 +36,9 @@ .Sh SYNOPSIS .Nm .Fl A -.Fl p Ar portal Fl t Ar target Op Fl u Ar user Fl s Ar secret +.Fl p Ar portal Fl t Ar target +.Op Fl u Ar user Fl s Ar secret +.Op Fl w Ar timeout .Nm .Fl A .Fl d Ar discovery-host Op Fl u Ar user Fl s Ar secret @@ -70,6 +72,7 @@ .Nm .Fl L .Op Fl v +.Op Fl w Ar timeout .Sh DESCRIPTION The .Nm @@ -113,6 +116,10 @@ Target name. CHAP login. .It Fl v Verbose mode. +.It Fl w +Instead of returning immediately, wait up to +.Ar timeout +seconds until all configured sessions are successfully established. .El .Pp Certain parameters are necessary when adding a session. @@ -132,9 +139,11 @@ via configuration file. .Pp Since connecting to the target is performed in background, non-zero exit status does not mean that the session was successfully established. -Use +Use either .Nm Fl L -to check the connection status. +to check the connection status, or the +.Fl w +flag to wait for session establishment. .Pp Note that in order for the iSCSI initiator to be able to connect to a target, the Modified: stable/10/usr.bin/iscsictl/iscsictl.c == --- stable/10/usr.bin/iscsictl/iscsictl.c Sat Jan 23 15:33:11 2016 (r294634) +++ stable/10/usr.bin/iscsictl/iscsictl.c Sat Jan 23 15:48:14 2016 (r294635) @@ -550,12 +550,70 @@ kernel_list(int iscsi_fd, const struct t return (0); } +static int +kernel_wait(int iscsi_fd, int timeout) +{ + struct iscsi_session_state *states = NULL; + const struct iscsi_session_state *state; + const struct iscsi_session_conf *conf; + struct iscsi_session_list isl; + unsigned int i, nentries = 1; + bool all_connected; + int error; + + for (;;) { + for (;;) { + states = realloc(states, + nentries * sizeof(struct iscsi_session_state)); + if (states == NULL) + err(1, "realloc"); + + memset(, 0, sizeof(isl)); + isl.isl_nentries = nentries; + isl.isl_pstates = states; + + error = ioctl(iscsi_fd, ISCSISLIST, ); + if (error != 0 && errno == EMSGSIZE) { + nentries *= 4; + continue; + } + break; + } + if (error != 0) { + warn("ISCSISLIST"); + return (error); + } + + all_connected = true; + for (i = 0; i < isl.isl_nentries; i++) { + state = [i]; + conf = >iss_conf; + + if (!state->iss_connected) { + all_connected = false; + break; + } + } + + if (all_connected) + return (0); + + sleep(1); + + if (timeout > 0) { + timeout--; + if (timeout == 0) + return (1); + } + } +} + static void usage(void) { fprintf(stderr, "usage: iscsictl -A -p portal -t target " - "[-u user -s secret]\n"); + "[-u user -s secret] [-w timeout]\n"); fprintf(stderr, " iscsictl -A -d discovery-host " "[-u user -s secret]\n"); fprintf(stderr, " iscsictl -A -a [-c path]\n"); @@ -567,7 +625,7 @@ usage(void) fprintf(stderr, " iscsictl -R [-p portal] [-t target]\n"); fprintf(stderr, " iscsictl -R -a\n"); fprintf(stderr, " iscsictl -R -n nickname [-c path]\n"); - fprintf(stderr, " iscsictl -L [-v]\n"); + fprintf(stderr, " iscsictl -L [-v] [-w timeout]\n"); exit(1); } @@ -589,6 +647,7 @@ main(int argc, char **argv) const char *conf_path =
Re: svn commit: r293857 - stable/10/sys/dev/drm2/i915
On Wed, Jan 13, 2016 at 09:56:49PM +, Jean-Sébastien Pédron wrote: > Author: dumbbell > Date: Wed Jan 13 21:56:48 2016 > New Revision: 293857 > URL: https://svnweb.freebsd.org/changeset/base/293857 > > Log: > drm/i915: Remove "Attempting to unbind pinned buffer" message > > This error message is removed in later versions of Linux and currently, > it spams users. > > PR: 200712 > MFC of: r289109 > > Modified: > stable/10/sys/dev/drm2/i915/i915_gem.c > Directory Properties: > stable/10/ (props changed) Accelerating still not workin on 915GM. [ 11608.722] (EE) intel(0): Detected a hung GPU, disabling acceleration. [ 11608.722] (EE) intel(0): When reporting this, please include i915_error_state from debugfs and the full dmesg. Can you fix this? This bug about year old. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294634 - head/contrib/gcc/config/riscv64
Author: br Date: Sat Jan 23 15:33:11 2016 New Revision: 294634 URL: https://svnweb.freebsd.org/changeset/base/294634 Log: Add a minimal gcc config for RISC-V. This is required to build csu. Reviewed by: andrew Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision:https://reviews.freebsd.org/D5039 Added: head/contrib/gcc/config/riscv64/ head/contrib/gcc/config/riscv64/freebsd.h (contents, props changed) head/contrib/gcc/config/riscv64/riscv64.h (contents, props changed) Added: head/contrib/gcc/config/riscv64/freebsd.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcc/config/riscv64/freebsd.h Sat Jan 23 15:33:11 2016 (r294634) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ + +#undef INIT_SECTION_ASM_OP +#undef FINI_SECTION_ASM_OP +#define INIT_ARRAY_SECTION_ASM_OP "\t.section\t.init_array,\"aw\",%init_array" +#define FINI_ARRAY_SECTION_ASM_OP "\t.section\t.fini_array,\"aw\",%fini_array" Added: head/contrib/gcc/config/riscv64/riscv64.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcc/config/riscv64/riscv64.h Sat Jan 23 15:33:11 2016 (r294634) @@ -0,0 +1 @@ +/* $FreeBSD$ */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294636 - in stable: 10/sys/ofed/include/linux 9/sys/ofed/include/linux
Author: jhb Date: Sat Jan 23 17:08:17 2016 New Revision: 294636 URL: https://svnweb.freebsd.org/changeset/base/294636 Log: MFC 294366: Initialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0. If a driver's Linux mmap callback passed vm_page_prot through unchanged, then linux_dev_mmap_single() would try to apply whatever VM_MEMATTR_xxx value 0 is to the mapping. On x86, VM_MEMATTR_DEFAULT is the PAT value for write-back (WB) which is 6, while 0 maps to the PAT value for uncacheable (UC). Thus, any mmap request that did not explicitly set page_prot was tried to map memory as UC triggering the warning in sg_pager_getpages(). Sponsored by: Chelsio Communications Modified: stable/9/sys/ofed/include/linux/linux_compat.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/ofed/include/linux/linux_compat.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/ofed/include/linux/linux_compat.c == --- stable/9/sys/ofed/include/linux/linux_compat.c Sat Jan 23 15:48:14 2016(r294635) +++ stable/9/sys/ofed/include/linux/linux_compat.c Sat Jan 23 17:08:17 2016(r294636) @@ -434,7 +434,7 @@ linux_dev_mmap_single(struct cdev *dev, vma.vm_end = size; vma.vm_pgoff = *offset / PAGE_SIZE; vma.vm_pfn = 0; - vma.vm_page_prot = 0; + vma.vm_page_prot = VM_MEMATTR_DEFAULT; if (filp->f_op->mmap) { error = -filp->f_op->mmap(filp, ); if (error == 0) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294636 - in stable: 10/sys/ofed/include/linux 9/sys/ofed/include/linux
Author: jhb Date: Sat Jan 23 17:08:17 2016 New Revision: 294636 URL: https://svnweb.freebsd.org/changeset/base/294636 Log: MFC 294366: Initialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0. If a driver's Linux mmap callback passed vm_page_prot through unchanged, then linux_dev_mmap_single() would try to apply whatever VM_MEMATTR_xxx value 0 is to the mapping. On x86, VM_MEMATTR_DEFAULT is the PAT value for write-back (WB) which is 6, while 0 maps to the PAT value for uncacheable (UC). Thus, any mmap request that did not explicitly set page_prot was tried to map memory as UC triggering the warning in sg_pager_getpages(). Sponsored by: Chelsio Communications Modified: stable/10/sys/ofed/include/linux/linux_compat.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/ofed/include/linux/linux_compat.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/ofed/include/linux/linux_compat.c == --- stable/10/sys/ofed/include/linux/linux_compat.c Sat Jan 23 15:48:14 2016(r294635) +++ stable/10/sys/ofed/include/linux/linux_compat.c Sat Jan 23 17:08:17 2016(r294636) @@ -480,7 +480,7 @@ linux_dev_mmap_single(struct cdev *dev, vma.vm_end = size; vma.vm_pgoff = *offset / PAGE_SIZE; vma.vm_pfn = 0; - vma.vm_page_prot = 0; + vma.vm_page_prot = VM_MEMATTR_DEFAULT; if (filp->f_op->mmap) { error = -filp->f_op->mmap(filp, ); if (error == 0) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r294627 - head/share/man/man5
El 23/01/2016 a las 07:34, Kubilay Kocak escribió: On 23/01/2016 11:25 PM, Edward Tomasz Napierala wrote: Author: trasz Date: Sat Jan 23 12:25:24 2016 New Revision: 294627 URL: https://svnweb.freebsd.org/changeset/base/294627 Log: Advertise support for ext3 and ext4. MFC after: 1 month Sponsored by:The FreeBSD Foundation Modified: head/share/man/man5/ext2fs.5 Modified: head/share/man/man5/ext2fs.5 == --- head/share/man/man5/ext2fs.5Sat Jan 23 12:19:37 2016 (r294626) +++ head/share/man/man5/ext2fs.5Sat Jan 23 12:25:24 2016 (r294627) @@ -26,12 +26,12 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd January 23, 2016 .Dt EXT2FS 5 .Os .Sh NAME .Nm ext2fs -.Nd "Ext2fs file system" +.Nd "ext2/ext3/ext4 file system" .Sh SYNOPSIS To link into the kernel: .Bd -ragged -offset indent @@ -47,8 +47,14 @@ The driver will permit the .Fx kernel to access -.Tn Ext2 +.Tn ext2 , +.Tn ext3 , +and +.Tn ext4 file systems. +The +.Tn ext4 +support is read-only. .Sh EXAMPLES To mount a .Nm Thanks for this :) Yeah, thanks .. we have been very lazy about documenting ext2/3/4 and the supported features. Thoughts on renaming the module to something less specific than ext2, like extfs? Does anyone remember this question coming up before? No, the ext2 naming is rather historical in that it corresponds to the design, not really the format. The upstream userland tools are still called e2fsprogs [1]. Also the ext4 driver in linux now also handles ext3 and ext2. If I had a dollar for every user I've helped find this, that has replied 'oh! I thought that was only ext2', I'd have like $43. Also, any reason why we don't have a mount_extfs(8) command? Can we also have (man,mount) aliases for each of extN that is supported? I recall there was once a mount_ext2fs manpage. I think it was removed because the ext2 driver doesn't have the "old" mount interface. Asking for a friend (the community) ./koobs Pedro. [1] http://e2fsprogs.sourceforge.net/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294637 - stable/10/sys/dev/usb/serial
Author: ian Date: Sat Jan 23 19:13:48 2016 New Revision: 294637 URL: https://svnweb.freebsd.org/changeset/base/294637 Log: MFC r294235: Make PPS ASSERT/CLEAR events match the RS-232 signal levels as per RFC 2783. Previously the polarity was for TTL levels, which are the reverse of RS-232. Also add handling of the UART_PPS_INVERT_PULSE option bit in the sysctl value, the same as was recently added to uart(4), so that people using TTL level connections can request a logical inverting of the signal. Use the named constants from the new dev/uart/uart_ppstypes.h for the pps capture modes and option bits. Modified: stable/10/sys/dev/usb/serial/usb_serial.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/usb_serial.c == --- stable/10/sys/dev/usb/serial/usb_serial.c Sat Jan 23 17:08:17 2016 (r294636) +++ stable/10/sys/dev/usb/serial/usb_serial.c Sat Jan 23 19:13:48 2016 (r294637) @@ -81,6 +81,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include @@ -99,7 +101,8 @@ static SYSCTL_NODE(_hw_usb, OID_AUTO, uc static int ucom_pps_mode; SYSCTL_INT(_hw_usb_ucom, OID_AUTO, pps_mode, CTLFLAG_RWTUN, -_pps_mode, 0, "pulse capturing mode - 0/1/2 - disabled/CTS/DCD"); +_pps_mode, 0, +"pulse capture mode: 0/1/2=disabled/CTS/DCD; add 0x10 to invert"); #ifdef USB_DEBUG static int ucom_debug = 0; @@ -1074,10 +1077,12 @@ ucom_cfg_status_change(struct usb_proc_m (struct ucom_cfg_task *)_task; struct ucom_softc *sc = task->sc; struct tty *tp; + int onoff; uint8_t new_msr; uint8_t new_lsr; uint8_t msr_delta; uint8_t lsr_delta; + uint8_t pps_signal; tp = sc->sc_tty; @@ -1107,35 +1112,33 @@ ucom_cfg_status_change(struct usb_proc_m sc->sc_lsr = new_lsr; /* -* Time pulse counting support. Note that both CTS and DCD are -* active-low signals. The status bit is high to indicate that -* the signal on the line is low, which corresponds to a PPS -* clear event. +* Time pulse counting support. */ - switch(ucom_pps_mode) { - case 1: - if ((sc->sc_pps.ppsparam.mode & PPS_CAPTUREBOTH) && - (msr_delta & SER_CTS)) { - pps_capture(>sc_pps); - pps_event(>sc_pps, (sc->sc_msr & SER_CTS) ? - PPS_CAPTURECLEAR : PPS_CAPTUREASSERT); - } + switch(ucom_pps_mode & UART_PPS_SIGNAL_MASK) { + case UART_PPS_CTS: + pps_signal = SER_CTS; break; - case 2: - if ((sc->sc_pps.ppsparam.mode & PPS_CAPTUREBOTH) && - (msr_delta & SER_DCD)) { - pps_capture(>sc_pps); - pps_event(>sc_pps, (sc->sc_msr & SER_DCD) ? - PPS_CAPTURECLEAR : PPS_CAPTUREASSERT); - } + case UART_PPS_DCD: + pps_signal = SER_DCD; break; default: + pps_signal = 0; break; } + if ((sc->sc_pps.ppsparam.mode & PPS_CAPTUREBOTH) && + (msr_delta & pps_signal)) { + pps_capture(>sc_pps); + onoff = (sc->sc_msr & pps_signal) ? 1 : 0; + if (ucom_pps_mode & UART_PPS_INVERT_PULSE) + onoff = !onoff; + pps_event(>sc_pps, onoff ? PPS_CAPTUREASSERT : + PPS_CAPTURECLEAR); + } + if (msr_delta & SER_DCD) { - int onoff = (sc->sc_msr & SER_DCD) ? 1 : 0; + onoff = (sc->sc_msr & SER_DCD) ? 1 : 0; DPRINTF("DCD changed to %d\n", onoff); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294647 - head/tools/regression/sockets/zerosend
Author: ngie Date: Sat Jan 23 22:51:22 2016 New Revision: 294647 URL: https://svnweb.freebsd.org/changeset/base/294647 Log: Use different ports in the TCP/UDP testcases with the first set and the second set (increment the original ports by 10) This avoids issues where the first listening socket might not be torn down by the time it makes it to the second set of testcases. The sockets should likely only be setup once, but this keeps in the spirit of the original testcases, so this will be easier to backport to ^/stable/9 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/zerosend/zerosend.c Directory Properties: head/ (props changed) Modified: head/tools/regression/sockets/zerosend/zerosend.c == --- head/tools/regression/sockets/zerosend/zerosend.c Sat Jan 23 22:49:13 2016(r294646) +++ head/tools/regression/sockets/zerosend/zerosend.c Sat Jan 23 22:51:22 2016(r294647) @@ -74,7 +74,7 @@ try_0write(const char *test, int fd) } static void -setup_udp(const char *test, int *fdp) +setup_udp(const char *test, int *fdp, int port1, int port2) { struct sockaddr_in sin; int sock1, sock2; @@ -84,14 +84,14 @@ setup_udp(const char *test, int *fdp) sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - sin.sin_port = htons(PORT1); + sin.sin_port = htons(port1); sock1 = socket(PF_INET, SOCK_DGRAM, 0); if (sock1 < 0) err(1, "%s: setup_udp: socket", test); if (bind(sock1, (struct sockaddr *), sizeof(sin)) < 0) err(1, "%s: setup_udp: bind(%s, %d)", test, inet_ntoa(sin.sin_addr), PORT1); - sin.sin_port = htons(PORT2); + sin.sin_port = htons(port2); if (connect(sock1, (struct sockaddr *), sizeof(sin)) < 0) err(1, "%s: setup_udp: connect(%s, %d)", test, inet_ntoa(sin.sin_addr), PORT2); @@ -102,7 +102,7 @@ setup_udp(const char *test, int *fdp) if (bind(sock2, (struct sockaddr *), sizeof(sin)) < 0) err(1, "%s: setup_udp: bind(%s, %d)", test, inet_ntoa(sin.sin_addr), PORT2); - sin.sin_port = htons(PORT1); + sin.sin_port = htons(port1); if (connect(sock2, (struct sockaddr *), sizeof(sin)) < 0) err(1, "%s: setup_udp: connect(%s, %d)", test, inet_ntoa(sin.sin_addr), PORT1); @@ -112,7 +112,7 @@ setup_udp(const char *test, int *fdp) } static void -setup_tcp(const char *test, int *fdp) +setup_tcp(const char *test, int *fdp, int port) { fd_set writefds, exceptfds; struct sockaddr_in sin; @@ -127,7 +127,7 @@ setup_tcp(const char *test, int *fdp) /* * First set up the listen socket. */ - sin.sin_port = htons(PORT1); + sin.sin_port = htons(port); sock1 = socket(PF_INET, SOCK_STREAM, 0); if (sock1 < 0) err(1, "%s: setup_tcp: socket", test); @@ -246,19 +246,19 @@ main(void) { int fd[2]; - setup_udp("udp_0send", fd); + setup_udp("udp_0send", fd, PORT1, PORT2); try_0send("udp_0send", fd[0]); close_both(fd); - setup_udp("udp_0write", fd); + setup_udp("udp_0write", fd, PORT1 + 10, PORT2 + 10); try_0write("udp_0write", fd[0]); close_both(fd); - setup_tcp("tcp_0send", fd); + setup_tcp("tcp_0send", fd, PORT1); try_0send("tcp_0send", fd[0]); close_both(fd); - setup_tcp("tcp_0write", fd); + setup_tcp("tcp_0write", fd, PORT1 + 10); try_0write("tcp_0write", fd[0]); close_both(fd); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294641 - in stable/10/tools/regression/sockets: rtsocket unix_socket
Author: ngie Date: Sat Jan 23 21:04:34 2016 New Revision: 294641 URL: https://svnweb.freebsd.org/changeset/base/294641 Log: MFC r294125: Test for EPROTOTYPE not EPROTONOSUPPORT - `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4) - localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so the prototype is invalid (this isn't explicitly documented anywhere I could find) Modified: stable/10/tools/regression/sockets/rtsocket/rtsocket.c stable/10/tools/regression/sockets/unix_socket/unix_socket.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/sockets/rtsocket/rtsocket.c == --- stable/10/tools/regression/sockets/rtsocket/rtsocket.c Sat Jan 23 20:51:57 2016(r294640) +++ stable/10/tools/regression/sockets/rtsocket/rtsocket.c Sat Jan 23 21:04:34 2016(r294641) @@ -52,7 +52,7 @@ main(void) sock); } - if (errno != EPROTONOSUPPORT) + if (errno != EPROTOTYPE) err(-1, "socket(PF_ROUTE, SOCK_STREAM, 0)"); sock = socket(PF_ROUTE, SOCK_DGRAM, 0); @@ -62,7 +62,7 @@ main(void) sock); } - if (errno != EPROTONOSUPPORT) + if (errno != EPROTOTYPE) err(-1, "socket(PF_ROUTE, SOCK_DGRAM, 0)"); sock = socket(PF_ROUTE, SOCK_RAW, 0); @@ -77,7 +77,7 @@ main(void) "socketpair(PF_ROUTE, SOCK_STREAM, 0, socks) success"); } - if (errno != EPROTONOSUPPORT) + if (errno != EPROTOTYPE) err(-1, "socketpair(PF_ROUTE, SOCK_STREAM, 0, socks)"); if (socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks) == 0) { @@ -87,7 +87,7 @@ main(void) "socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks) success"); } - if (errno != EPROTONOSUPPORT) + if (errno != EPROTOTYPE) err(-1, "socketpair(PF_ROUTE, SOCK_DGRAM, 0, socks)"); if (socketpair(PF_ROUTE, SOCK_RAW, 0, socks) == 0) { Modified: stable/10/tools/regression/sockets/unix_socket/unix_socket.c == --- stable/10/tools/regression/sockets/unix_socket/unix_socket.cSat Jan 23 20:51:57 2016(r294640) +++ stable/10/tools/regression/sockets/unix_socket/unix_socket.cSat Jan 23 21:04:34 2016(r294641) @@ -59,7 +59,7 @@ main(void) close(sock); errx(-1, "socket(PF_LOCAL, SOCK_RAW, 0) returned %d", sock); } - if (errno != EPROTONOSUPPORT) + if (errno != EPROTOTYPE) err(-1, "socket(PF_LOCAL, SOCK_RAW, 0)"); if (socketpair(PF_LOCAL, SOCK_STREAM, 0, socks) < 0) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294649 - head/bin/sh
Author: jilles Date: Sat Jan 23 23:00:38 2016 New Revision: 294649 URL: https://svnweb.freebsd.org/changeset/base/294649 Log: sh: Use OLDPWD shell variable for 'cd -'. Per POSIX, 'cd -' should use the OLDPWD shell variable, not internal state. This variable is normally exported. Also, if OLDPWD is not set, fail 'cd -' instead of changing to the current directory. Modified: head/bin/sh/cd.c Modified: head/bin/sh/cd.c == --- head/bin/sh/cd.cSat Jan 23 22:56:26 2016(r294648) +++ head/bin/sh/cd.cSat Jan 23 23:00:38 2016(r294649) @@ -75,7 +75,6 @@ static char *getpwd(void); static char *getpwd2(void); static char *curdir = NULL;/* current working directory */ -static char *prevdir; /* previous working directory */ static char *cdcomppath; int @@ -112,11 +111,10 @@ cdcmd(int argc __unused, char **argv __u if (*dest == '\0') dest = "."; if (dest[0] == '-' && dest[1] == '\0') { - dest = prevdir ? prevdir : curdir; - if (dest) - print = 1; - else - dest = "."; + dest = bltinlookup("OLDPWD", 1); + if (dest == NULL) + error("OLDPWD not set"); + print = 1; } if (dest[0] == '/' || (dest[0] == '.' && (dest[1] == '/' || dest[1] == '\0')) || @@ -311,14 +309,15 @@ findcwd(char *dir) static void updatepwd(char *dir) { + char *prevdir; + hashcd(); /* update command hash table */ - if (prevdir) - ckfree(prevdir); + setvar("PWD", dir, VEXPORT); + setvar("OLDPWD", curdir, VEXPORT); prevdir = curdir; curdir = dir ? savestr(dir) : NULL; - setvar("PWD", curdir, VEXPORT); - setvar("OLDPWD", prevdir, VEXPORT); + ckfree(prevdir); } int ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294652 - head/sys/fs/ext2fs
Author: pfg Date: Sun Jan 24 02:25:41 2016 New Revision: 294652 URL: https://svnweb.freebsd.org/changeset/base/294652 Log: ext2: Initialize i_flag after allocation. We use i_flag to carry some flags like IN_E4INDEX which newer ext2fs variants uses internally. fsck.ext3 rightfully complains after our implementation tags non-directory inodes with INDEX_FL. Initializing i_flag during allocation removes the noise factor and quiets down fsck. Patch from: Damjan Jovanovic PR: 206530 Modified: head/sys/fs/ext2fs/ext2_alloc.c Modified: head/sys/fs/ext2fs/ext2_alloc.c == --- head/sys/fs/ext2fs/ext2_alloc.c Sun Jan 24 02:10:05 2016 (r294651) +++ head/sys/fs/ext2fs/ext2_alloc.c Sun Jan 24 02:25:41 2016 (r294652) @@ -393,6 +393,7 @@ ext2_valloc(struct vnode *pvp, int mode, * Linux doesn't read the old inode in when it is allocating a * new one. I will set at least i_size and i_blocks to zero. */ + ip->i_flag = 0; ip->i_size = 0; ip->i_blocks = 0; ip->i_mode = 0; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r294464 - in head: crypto/openssh crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/openssh/openbsd-compat crypto/openssh/regress crypto/openssh/regress/unittests crypto
Craig Rodrigueswrites: > clang is emitting a new warning on this file: > > https://jenkins.freebsd.org/job/FreeBSD_HEAD/62/warnings7Result/new/ > > Is it a legitimate problem which needs to be fixed upstream, or is it > a non-issue? The warning is technically correct, but the error is harmless since the source and destination are fixed buffers of identical size. The code was fixed upstream in October, after 7.1 was released. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294639 - stable/10/lib/libthr/thread
Author: vangyzen Date: Sat Jan 23 20:49:52 2016 New Revision: 294639 URL: https://svnweb.freebsd.org/changeset/base/294639 Log: MFC r293858 libthr: const-ify two variables Make the default umutex and urwlock initializers const, because they can be, and as a microoptimization. Sponsored by: Dell Inc. Modified: stable/10/lib/libthr/thread/thr_umtx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/thread/thr_umtx.c == --- stable/10/lib/libthr/thread/thr_umtx.c Sat Jan 23 20:01:46 2016 (r294638) +++ stable/10/lib/libthr/thread/thr_umtx.c Sat Jan 23 20:49:52 2016 (r294639) @@ -42,7 +42,7 @@ int _umtx_op_err(void *obj, int op, u_lo void _thr_umutex_init(struct umutex *mtx) { - static struct umutex default_mtx = DEFAULT_UMUTEX; + static const struct umutex default_mtx = DEFAULT_UMUTEX; *mtx = default_mtx; } @@ -50,7 +50,8 @@ _thr_umutex_init(struct umutex *mtx) void _thr_urwlock_init(struct urwlock *rwl) { - static struct urwlock default_rwl = DEFAULT_URWLOCK; + static const struct urwlock default_rwl = DEFAULT_URWLOCK; + *rwl = default_rwl; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294642 - stable/10/usr.sbin/bsdinstall/scripts
Author: allanjude Date: Sat Jan 23 22:13:31 2016 New Revision: 294642 URL: https://svnweb.freebsd.org/changeset/base/294642 Log: MFC: r285732 Add the Dell E7240 laptop and Intel DP965LT motherboard to the list for the GPT active workaround MFC: r287843 Add the HP ProBook 4330s, Intel DP965LT, D510MO, and Acer Veriton M6630G to the GPT workaround list Sponsored by: ScaleEngine Inc. Modified: stable/10/usr.sbin/bsdinstall/scripts/auto Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/auto == --- stable/10/usr.sbin/bsdinstall/scripts/auto Sat Jan 23 21:04:34 2016 (r294641) +++ stable/10/usr.sbin/bsdinstall/scripts/auto Sat Jan 23 22:13:31 2016 (r294642) @@ -53,7 +53,7 @@ error() { } hline_arrows_tab_enter="Press arrows, TAB or ENTER" -msg_gpt_active_fix="Your hardware is known to have issues booting in BIOS mode from GPT partitions that are not set active. Would you like the installer to apply this workaround for you?" +msg_gpt_active_fix="Your hardware is known to have issues booting in CSM/Legacy/BIOS mode from GPT partitions that are not set active. Would you like the installer to apply this workaround for you?" msg_lenovo_fix="Your model of Lenovo is known to have a BIOS bug that prevents it booting from GPT partitions without UEFI. Would you like the installer to apply a workaround for you?" msg_no="NO" msg_yes="YES" @@ -166,6 +166,14 @@ if f_interactive; then f_dprintf "smbios.system.product=[%s]" "$sys_model" sys_version=$( kenv -q smbios.system.version ) f_dprintf "smbios.system.version=[%s]" "$sys_version" + sys_mb_maker=$( kenv -q smbios.planar.maker ) + f_dprintf "smbios.planar.maker=[%s]" "$sys_mb_maker" + sys_mb_product=$( kenv -q smbios.planar.product ) + f_dprintf "smbios.planar.product=[%s]" "$sys_mb_product" + + # + # Laptop Models + # case "$sys_maker" in "LENOVO") case "$sys_version" in @@ -182,7 +190,51 @@ if f_interactive; then ;; "Dell Inc.") case "$sys_model" in - "Latitude E7440") + "Latitude E7440"|"Latitude E7240") + dialog_workaround "$msg_gpt_active_fix" + retval=$? + f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" + if [ $retval -eq $DIALOG_OK ]; then + export ZFSBOOT_PARTITION_SCHEME="GPT + Active" + export WORKAROUND_GPTACTIVE=1 + fi + ;; + esac + ;; + "Hewlett-Packard") + case "$sys_model" in + "HP ProBook 4330s") + dialog_workaround "$msg_gpt_active_fix" + retval=$? + f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" + if [ $retval -eq $DIALOG_OK ]; then + export ZFSBOOT_PARTITION_SCHEME="GPT + Active" + export WORKAROUND_GPTACTIVE=1 + fi + ;; + esac + ;; + esac + # + # Motherboard Models + # + case "$sys_mb_maker" in + "Intel Corporation") + case "$sys_mb_product" in + "DP965LT"|"D510MO") + dialog_workaround "$msg_gpt_active_fix" + retval=$? + f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" + if [ $retval -eq $DIALOG_OK ]; then + export ZFSBOOT_PARTITION_SCHEME="GPT + Active" + export WORKAROUND_GPTACTIVE=1 + fi + ;; + esac + ;; + "Acer") + case "$sys_mb_product" in + "Veriton M6630G") dialog_workaround "$msg_gpt_active_fix" retval=$? f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294646 - head/tools/regression/sockets/unix_cmsg
Author: ngie Date: Sat Jan 23 22:49:13 2016 New Revision: 294646 URL: https://svnweb.freebsd.org/changeset/base/294646 Log: Don't run the t_cmsg_len testcase on 64-bit architectures It always fails when trying to send through the sendit(9) private KPI in the kernel due to a size mismatch between the msghdr and data being sent [*], which suspiciously seems like it's related to sizeof pointers instead of scalars, or something of that ilk MFC after: 1 week PR: 206543, 206544 [*] Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Directory Properties: head/ (props changed) Modified: head/tools/regression/sockets/unix_cmsg/unix_cmsg.c == --- head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Sat Jan 23 22:44:00 2016(r294645) +++ head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Sat Jan 23 22:49:13 2016(r294646) @@ -83,7 +83,13 @@ static int t_sockcred_2(void); static int t_cmsgcred_sockcred(void); static int t_timeval(void); static int t_bintime(void); +/* + * The testcase fails on 64-bit architectures (amd64), but passes on 32-bit + * architectures (i386); see bug 206543 + */ +#ifndef __LP64__ static int t_cmsg_len(void); +#endif static int t_peercred(void); struct test_func { @@ -120,10 +126,12 @@ static const struct test_func test_strea .func = t_bintime, .desc = "Sending, receiving bintime" }, +#ifndef __LP64__ { .func = t_cmsg_len, .desc = "Check cmsghdr.cmsg_len" }, +#endif { .func = t_peercred, .desc = "Check LOCAL_PEERCRED socket option" @@ -158,10 +166,12 @@ static const struct test_func test_dgram .func = t_bintime, .desc = "Sending, receiving bintime" }, +#ifndef __LP64__ { .func = t_cmsg_len, .desc = "Check cmsghdr.cmsg_len" } +#endif }; #define TEST_DGRAM_TBL_SIZE \ @@ -1829,6 +1839,7 @@ t_bintime(void) return (t_generic(t_bintime_client, t_bintime_server)); } +#ifndef __LP64__ static int t_cmsg_len_client(int fd) { @@ -1921,6 +1932,7 @@ t_cmsg_len(void) { return (t_generic(t_cmsg_len_client, t_cmsg_len_server)); } +#endif static int t_peercred_client(int fd) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294654 - head/sys/fs/ext2fs
Author: pfg Date: Sun Jan 24 02:44:00 2016 New Revision: 294654 URL: https://svnweb.freebsd.org/changeset/base/294654 Log: Fix comment. Modified: head/sys/fs/ext2fs/ext2_dinode.h Modified: head/sys/fs/ext2fs/ext2_dinode.h == --- head/sys/fs/ext2fs/ext2_dinode.hSun Jan 24 02:41:49 2016 (r294653) +++ head/sys/fs/ext2fs/ext2_dinode.hSun Jan 24 02:44:00 2016 (r294654) @@ -52,7 +52,7 @@ * Inode flags * The system supports EXT2_IMMUTABLE, EXT2_APPEND and EXT2_NODUMP flags. * The current implementation also uses EXT3_INDEX, EXT4_EXTENTS and - * EXT4_HUGE_FILE with some restrictions, imposed the lack of write + * EXT4_HUGE_FILE with some restrictions imposed by the lack of write * support. */ #defineEXT2_SECRM 0x0001 /* Secure deletion */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294640 - stable/9/lib/libthr/thread
Author: vangyzen Date: Sat Jan 23 20:51:57 2016 New Revision: 294640 URL: https://svnweb.freebsd.org/changeset/base/294640 Log: MFC r293858 libthr: const-ify two variables Make the default umutex and urwlock initializers const, because they can be, and as a microoptimization. Sponsored by: Dell Inc. Modified: stable/9/lib/libthr/thread/thr_umtx.c Directory Properties: stable/9/lib/libthr/ (props changed) Modified: stable/9/lib/libthr/thread/thr_umtx.c == --- stable/9/lib/libthr/thread/thr_umtx.c Sat Jan 23 20:49:52 2016 (r294639) +++ stable/9/lib/libthr/thread/thr_umtx.c Sat Jan 23 20:51:57 2016 (r294640) @@ -42,7 +42,7 @@ int _umtx_op_err(void *obj, int op, u_lo void _thr_umutex_init(struct umutex *mtx) { - static struct umutex default_mtx = DEFAULT_UMUTEX; + static const struct umutex default_mtx = DEFAULT_UMUTEX; *mtx = default_mtx; } @@ -50,7 +50,8 @@ _thr_umutex_init(struct umutex *mtx) void _thr_urwlock_init(struct urwlock *rwl) { - static struct urwlock default_rwl = DEFAULT_URWLOCK; + static const struct urwlock default_rwl = DEFAULT_URWLOCK; + *rwl = default_rwl; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294645 - head/tools/regression/sockets/unix_cmsg
Author: ngie Date: Sat Jan 23 22:44:00 2016 New Revision: 294645 URL: https://svnweb.freebsd.org/changeset/base/294645 Log: - Don't return immediately in check_xucred, check_scm_creds_cmsgcred, and check_scm_creds_sockcred after initial != NULL checks have been done for debugging purposes - Use more terse names for bintime (bt), cmesgcred (cmcred), sockcred (sc), and timeval (tv) [*] - Add some debug messages to better understand some of the flow of the test program MFC after: 1 week Requested by: bde [*] Use of the word "terse" (^.^) corrected by: jhb, rpokala [*] Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Directory Properties: head/ (props changed) Modified: head/tools/regression/sockets/unix_cmsg/unix_cmsg.c == --- head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Sat Jan 23 22:26:51 2016(r294644) +++ head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Sat Jan 23 22:44:00 2016(r294645) @@ -980,6 +980,8 @@ check_groups(const char *gid_arr_str, co static int check_xucred(const struct xucred *xucred, socklen_t len) { + int rc; + if (len != sizeof(*xucred)) { logmsgx("option value size %zu != %zu", (size_t)len, sizeof(*xucred)); @@ -990,170 +992,178 @@ check_xucred(const struct xucred *xucred dbgmsg("xucred.cr_uid %lu", (u_long)xucred->cr_uid); dbgmsg("xucred.cr_ngroups %d", xucred->cr_ngroups); + rc = 0; + if (xucred->cr_version != XUCRED_VERSION) { logmsgx("xucred.cr_version %u != %d", xucred->cr_version, XUCRED_VERSION); - return (-1); + rc = -1; } if (xucred->cr_uid != proc_cred.euid) { logmsgx("xucred.cr_uid %lu != %lu (EUID)", (u_long)xucred->cr_uid, (u_long)proc_cred.euid); - return (-1); + rc = -1; } if (xucred->cr_ngroups == 0) { logmsgx("xucred.cr_ngroups == 0"); - return (-1); + rc = -1; } if (xucred->cr_ngroups < 0) { logmsgx("xucred.cr_ngroups < 0"); - return (-1); + rc = -1; } if (xucred->cr_ngroups > XU_NGROUPS) { logmsgx("xucred.cr_ngroups %hu > %u (max)", xucred->cr_ngroups, XU_NGROUPS); - return (-1); + rc = -1; } if (xucred->cr_groups[0] != proc_cred.egid) { logmsgx("xucred.cr_groups[0] %lu != %lu (EGID)", (u_long)xucred->cr_groups[0], (u_long)proc_cred.egid); - return (-1); + rc = -1; } if (check_groups("xucred.cr_groups", xucred->cr_groups, "xucred.cr_ngroups", xucred->cr_ngroups, false) < 0) - return (-1); - return (0); + rc = -1; + return (rc); } static int check_scm_creds_cmsgcred(struct cmsghdr *cmsghdr) { - const struct cmsgcred *cmsgcred; + const struct cmsgcred *cmcred; + int rc; - if (check_cmsghdr(cmsghdr, SCM_CREDS, sizeof(*cmsgcred)) < 0) + if (check_cmsghdr(cmsghdr, SCM_CREDS, sizeof(struct cmsgcred)) < 0) return (-1); - cmsgcred = (struct cmsgcred *)CMSG_DATA(cmsghdr); + cmcred = (struct cmsgcred *)CMSG_DATA(cmsghdr); - dbgmsg("cmsgcred.cmcred_pid %ld", (long)cmsgcred->cmcred_pid); - dbgmsg("cmsgcred.cmcred_uid %lu", (u_long)cmsgcred->cmcred_uid); - dbgmsg("cmsgcred.cmcred_euid %lu", (u_long)cmsgcred->cmcred_euid); - dbgmsg("cmsgcred.cmcred_gid %lu", (u_long)cmsgcred->cmcred_gid); - dbgmsg("cmsgcred.cmcred_ngroups %d", cmsgcred->cmcred_ngroups); + dbgmsg("cmsgcred.cmcred_pid %ld", (long)cmcred->cmcred_pid); + dbgmsg("cmsgcred.cmcred_uid %lu", (u_long)cmcred->cmcred_uid); + dbgmsg("cmsgcred.cmcred_euid %lu", (u_long)cmcred->cmcred_euid); + dbgmsg("cmsgcred.cmcred_gid %lu", (u_long)cmcred->cmcred_gid); + dbgmsg("cmsgcred.cmcred_ngroups %d", cmcred->cmcred_ngroups); - if (cmsgcred->cmcred_pid != client_pid) { + rc = 0; + + if (cmcred->cmcred_pid != client_pid) { logmsgx("cmsgcred.cmcred_pid %ld != %ld", - (long)cmsgcred->cmcred_pid, (long)client_pid); - return (-1); + (long)cmcred->cmcred_pid, (long)client_pid); + rc = -1; } - if (cmsgcred->cmcred_uid != proc_cred.uid) { + if (cmcred->cmcred_uid != proc_cred.uid) { logmsgx("cmsgcred.cmcred_uid %lu != %lu", - (u_long)cmsgcred->cmcred_uid, (u_long)proc_cred.uid); - return (-1); + (u_long)cmcred->cmcred_uid, (u_long)proc_cred.uid); + rc = -1;
svn commit: r294651 - stable/10/usr.sbin/bsdinstall/scripts
Author: vangyzen Date: Sun Jan 24 02:10:05 2016 New Revision: 294651 URL: https://svnweb.freebsd.org/changeset/base/294651 Log: MFC r293860 bsdinstall: Suggest the GPT+Active workaround on Dell T5810 The Dell Precision Tower 5810 fails to boot from GPT in Legacy/BIOS mode without the Active flag in the Protective MBR. Suggest the workaround during installation. Since an increasing number of Dell systems exhibit this behavior, I imagine all Dells past a certain date will do so. I would like to suggest the workaround for all Dells with a BIOS date of, say, 2014 or later, but I would need to test a variety of systems before committing such a change. Relnotes: We should probably suggest using GPT+Active on "recent" Dells. Sponsored by: Dell Inc. Modified: stable/10/usr.sbin/bsdinstall/scripts/auto Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/auto == --- stable/10/usr.sbin/bsdinstall/scripts/auto Sun Jan 24 00:26:45 2016 (r294650) +++ stable/10/usr.sbin/bsdinstall/scripts/auto Sun Jan 24 02:10:05 2016 (r294651) @@ -190,7 +190,7 @@ if f_interactive; then ;; "Dell Inc.") case "$sys_model" in - "Latitude E7440"|"Latitude E7240") + "Latitude E7440"|"Latitude E7240"|"Precision Tower 5810") dialog_workaround "$msg_gpt_active_fix" retval=$? f_dprintf "gpt_active_fix_prompt=[%s]" "$retval" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r294464 - in head: crypto/openssh crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/openssh/openbsd-compat crypto/openssh/regress crypto/openssh/regress/unittests crypto
On Wed, Jan 20, 2016 at 2:57 PM, Dag-Erling Smørgravwrote: > Author: des > Date: Wed Jan 20 22:57:10 2016 > New Revision: 294464 > URL: https://svnweb.freebsd.org/changeset/base/294464 > > Log: > Upgrade to OpenSSH 7.0p1. > > Modified: > head/crypto/openssh/openbsd-compat/realpath.c > clang is emitting a new warning on this file: https://jenkins.freebsd.org/job/FreeBSD_HEAD/62/warnings7Result/new/ Is it a legitimate problem which needs to be fixed upstream, or is it a non-issue? -- Craig ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294653 - head/sys/fs/ext2fs
Author: pfg Date: Sun Jan 24 02:41:49 2016 New Revision: 294653 URL: https://svnweb.freebsd.org/changeset/base/294653 Log: Rename some directory index constants. Directory index was introduced in ext3. We don't always use the prefix to denote the ext2 variant they belong to but when we do we should try to be accurate. Modified: head/sys/fs/ext2fs/ext2_dinode.h head/sys/fs/ext2fs/ext2_htree.c head/sys/fs/ext2fs/ext2_inode_cnv.c head/sys/fs/ext2fs/ext2_lookup.c Modified: head/sys/fs/ext2fs/ext2_dinode.h == --- head/sys/fs/ext2fs/ext2_dinode.hSun Jan 24 02:25:41 2016 (r294652) +++ head/sys/fs/ext2fs/ext2_dinode.hSun Jan 24 02:41:49 2016 (r294653) @@ -51,7 +51,7 @@ /* * Inode flags * The system supports EXT2_IMMUTABLE, EXT2_APPEND and EXT2_NODUMP flags. - * The current implementation also uses EXT4_INDEX, EXT4_EXTENTS and + * The current implementation also uses EXT3_INDEX, EXT4_EXTENTS and * EXT4_HUGE_FILE with some restrictions, imposed the lack of write * support. */ @@ -63,7 +63,7 @@ #defineEXT2_APPEND 0x0020 /* Writes to file may only append */ #defineEXT2_NODUMP 0x0040 /* Do not dump file */ #defineEXT2_NOATIME0x0080 /* Do not update atime */ -#defineEXT4_INDEX 0x1000 /* Hash-indexed directory */ +#defineEXT3_INDEX 0x1000 /* Hash-indexed directory */ #defineEXT4_IMAGIC 0x2000 /* AFS directory */ #defineEXT4_JOURNAL_DATA 0x4000 /* File data should be journaled */ #defineEXT4_NOTAIL 0x8000 /* File tail should not be merged */ Modified: head/sys/fs/ext2fs/ext2_htree.c == --- head/sys/fs/ext2fs/ext2_htree.c Sun Jan 24 02:25:41 2016 (r294652) +++ head/sys/fs/ext2fs/ext2_htree.c Sun Jan 24 02:41:49 2016 (r294653) @@ -90,7 +90,7 @@ int ext2_htree_has_idx(struct inode *ip) { if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && - ip->i_flag & IN_E4INDEX) + ip->i_flag & IN_E3INDEX) return (1); else return (0); @@ -653,7 +653,7 @@ ext2_htree_create_index(struct vnode *vp ((char *)ep + ep->e2d_reclen); ep->e2d_reclen = buf1 + blksize - (char *)ep; - dp->i_flag |= IN_E4INDEX; + dp->i_flag |= IN_E3INDEX; /* * Initialize index root. Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c == --- head/sys/fs/ext2fs/ext2_inode_cnv.c Sun Jan 24 02:25:41 2016 (r294652) +++ head/sys/fs/ext2fs/ext2_inode_cnv.c Sun Jan 24 02:41:49 2016 (r294653) @@ -110,7 +110,7 @@ ext2_ei2i(struct ext2fs_dinode *ei, stru ip->i_flags |= (ei->e2di_flags & EXT2_APPEND) ? SF_APPEND : 0; ip->i_flags |= (ei->e2di_flags & EXT2_IMMUTABLE) ? SF_IMMUTABLE : 0; ip->i_flags |= (ei->e2di_flags & EXT2_NODUMP) ? UF_NODUMP : 0; - ip->i_flag |= (ei->e2di_flags & EXT4_INDEX) ? IN_E4INDEX : 0; + ip->i_flag |= (ei->e2di_flags & EXT3_INDEX) ? IN_E3INDEX : 0; ip->i_flag |= (ei->e2di_flags & EXT4_EXTENTS) ? IN_E4EXTENTS : 0; ip->i_blocks = ei->e2di_nblock; if (E2DI_HAS_HUGE_FILE(ip)) { @@ -160,7 +160,7 @@ ext2_i2ei(struct inode *ip, struct ext2f ei->e2di_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND: 0; ei->e2di_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE: 0; ei->e2di_flags |= (ip->i_flags & UF_NODUMP) ? EXT2_NODUMP: 0; - ei->e2di_flags |= (ip->i_flag & IN_E4INDEX) ? EXT4_INDEX: 0; + ei->e2di_flags |= (ip->i_flag & IN_E3INDEX) ? EXT3_INDEX: 0; ei->e2di_flags |= (ip->i_flag & IN_E4EXTENTS) ? EXT4_EXTENTS: 0; ei->e2di_nblock = ip->i_blocks & 0x; ei->e2di_nblock_high = ip->i_blocks >> 32 & 0x; Modified: head/sys/fs/ext2fs/ext2_lookup.c == --- head/sys/fs/ext2fs/ext2_lookup.cSun Jan 24 02:25:41 2016 (r294652) +++ head/sys/fs/ext2fs/ext2_lookup.cSun Jan 24 02:41:49 2016 (r294653) @@ -888,7 +888,7 @@ ext2_direnter(struct inode *ip, struct v if (ext2_htree_has_idx(dp)) { error = ext2_htree_add_entry(dvp, , cnp); if (error) { - dp->i_flag &= ~IN_E4INDEX; + dp->i_flag &= ~IN_E3INDEX; dp->i_flag |= IN_CHANGE | IN_UPDATE; } return (error); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to
svn commit: r294655 - head/sys/fs/ext2fs
Author: pfg Date: Sun Jan 24 04:30:30 2016 New Revision: 294655 URL: https://svnweb.freebsd.org/changeset/base/294655 Log: ext2: rename some directory index constants. Missed from r294653. Pointyhat:me Modified: head/sys/fs/ext2fs/inode.h Modified: head/sys/fs/ext2fs/inode.h == --- head/sys/fs/ext2fs/inode.h Sun Jan 24 02:44:00 2016(r294654) +++ head/sys/fs/ext2fs/inode.h Sun Jan 24 04:30:30 2016(r294655) @@ -157,7 +157,7 @@ struct inode { * These are translation flags for some attributes that Ext4 * passes as inode flags but that we cannot pass directly. */ -#defineIN_E4INDEX 0x01 +#defineIN_E3INDEX 0x01 #defineIN_E4EXTENTS0x02 #define i_devvp i_ump->um_devvp ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r294536 - head/sys/netinet
Lawrence, On Sat, Jan 23, 2016 at 06:09:19PM +1100, Lawrence Stewart wrote: L> > Is that the race you refer to? L> L> No, the TCP_CONGESTION refactoring i.e. this commit, introduced races in L> the get and set cases. I guess I didn't provide enough context in L> Crucible, so here goes... L> L> The post refactoring get code is now: L> L> case TCP_CONGESTION: L> INP_WUNLOCK(inp); L> error = sooptcopyout(sopt, CC_ALGO(tp)->name, TCP_CA_NAME_MAX); L> break; L> L> Consider that tp is using cc_blah and that the cc_blah module is L> unloaded as the copy out is happening. By not holding the INP lock, the L> CC module unload code is able to walk the list of active connections, L> find this connection is using cc_blah, acquire the INP lock, switch this L> connection to cc_newreno, release the lock and finally unload the L> cc_blah module, rendering the pointer passed in to sooptcopyout garbage. L> See cc_deregister_algo() in cc.c and tcp_ccalgounload() in tcp_subr.c L> for details related to CC module unload. Understood. Can you please review this patch? It basicly shifts INP_WLOCK earlier in the SOPT_SET case, and reverts to old code the SOPT_GET case. It returns back the stack based string buffer. -- Totus tuus, Glebius. Index: tcp_usrreq.c === --- tcp_usrreq.c (revision 294658) +++ tcp_usrreq.c (working copy) @@ -1479,7 +1479,7 @@ tcp_default_ctloutput(struct socket *so, struct so u_int ui; struct tcp_info ti; struct cc_algo *algo; - char *buf; + char *pbuf, buf[TCP_CA_NAME_MAX]; /* * For TCP_CCALGOOPT forward the control to CC module, for both @@ -1488,22 +1488,22 @@ tcp_default_ctloutput(struct socket *so, struct so switch (sopt->sopt_name) { case TCP_CCALGOOPT: INP_WUNLOCK(inp); - buf = malloc(sopt->sopt_valsize, M_TEMP, M_WAITOK | M_ZERO); - error = sooptcopyin(sopt, buf, sopt->sopt_valsize, + pbuf = malloc(sopt->sopt_valsize, M_TEMP, M_WAITOK | M_ZERO); + error = sooptcopyin(sopt, pbuf, sopt->sopt_valsize, sopt->sopt_valsize); if (error) { - free(buf, M_TEMP); + free(pbuf, M_TEMP); return (error); } INP_WLOCK_RECHECK(inp); if (CC_ALGO(tp)->ctl_output != NULL) - error = CC_ALGO(tp)->ctl_output(tp->ccv, sopt, buf); + error = CC_ALGO(tp)->ctl_output(tp->ccv, sopt, pbuf); else error = ENOENT; INP_WUNLOCK(inp); if (error == 0 && sopt->sopt_dir == SOPT_GET) - error = sooptcopyout(sopt, buf, sopt->sopt_valsize); - free(buf, M_TEMP); + error = sooptcopyout(sopt, pbuf, sopt->sopt_valsize); + free(pbuf, M_TEMP); return (error); } @@ -1600,12 +1600,10 @@ unlock_and_done: case TCP_CONGESTION: INP_WUNLOCK(inp); - buf = malloc(TCP_CA_NAME_MAX, M_TEMP, M_WAITOK|M_ZERO); error = sooptcopyin(sopt, buf, TCP_CA_NAME_MAX, 1); - if (error) { -free(buf, M_TEMP); + if (error) break; - } + INP_WLOCK_RECHECK(inp); CC_LIST_RLOCK(); STAILQ_FOREACH(algo, _list, entries) if (strncmp(buf, algo->name, @@ -1612,12 +1610,11 @@ unlock_and_done: TCP_CA_NAME_MAX) == 0) break; CC_LIST_RUNLOCK(); - free(buf, M_TEMP); if (algo == NULL) { +INP_WUNLOCK(inp); error = EINVAL; break; } - INP_WLOCK_RECHECK(inp); /* * We hold a write lock over the tcb so it's safe to * do these things without ordering concerns. @@ -1786,9 +1783,10 @@ unlock_and_done: error = sooptcopyout(sopt, , sizeof ti); break; case TCP_CONGESTION: + bzero(buf, sizeof(buf)); + strlcpy(buf, CC_ALGO(tp)->name, TCP_CA_NAME_MAX); INP_WUNLOCK(inp); - error = sooptcopyout(sopt, CC_ALGO(tp)->name, - TCP_CA_NAME_MAX); + error = sooptcopyout(sopt, buf, TCP_CA_NAME_MAX); break; case TCP_KEEPIDLE: case TCP_KEEPINTVL: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294657 - stable/10/tools/regression/geom_mirror
Author: ngie Date: Sun Jan 24 06:19:49 2016 New Revision: 294657 URL: https://svnweb.freebsd.org/changeset/base/294657 Log: MFC r293073: - Use attach_md instead of hardcoding md(4) provider unit numbers - Implement a gmirror_test_cleanup function, which in turn calls geom_test_cleanup to clean up all md(4) providers allocated in the test run. - Remove duplicate logic in test scripts for removing md(4) providers. - Don't create files in /tmp (outside the kyua sandbox); use the current directory instead Modified: stable/10/tools/regression/geom_mirror/conf.sh stable/10/tools/regression/geom_mirror/test-1.t stable/10/tools/regression/geom_mirror/test-2.t stable/10/tools/regression/geom_mirror/test-3.t stable/10/tools/regression/geom_mirror/test-4.t stable/10/tools/regression/geom_mirror/test-5.t stable/10/tools/regression/geom_mirror/test-6.t stable/10/tools/regression/geom_mirror/test-7.t Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/geom_mirror/conf.sh == --- stable/10/tools/regression/geom_mirror/conf.sh Sun Jan 24 06:04:38 2016(r294656) +++ stable/10/tools/regression/geom_mirror/conf.sh Sun Jan 24 06:19:49 2016(r294657) @@ -5,4 +5,11 @@ name="$(mktemp -u mirror.XX)" class="mirror" base=`basename $0` +gmirror_test_cleanup() +{ + [ -c /dev/$class/$name ] && gmirror destroy $name + geom_test_cleanup +} +trap gmirror_test_cleanup ABRT EXIT INT TERM + . `dirname $0`/../geom_subr.sh Modified: stable/10/tools/regression/geom_mirror/test-1.t == --- stable/10/tools/regression/geom_mirror/test-1.t Sun Jan 24 06:04:38 2016(r294656) +++ stable/10/tools/regression/geom_mirror/test-1.t Sun Jan 24 06:19:49 2016(r294657) @@ -5,15 +5,11 @@ echo "1..1" -us0=45 -us1=`expr $us0 + 1` -us2=`expr $us0 + 2` - -mdconfig -a -t malloc -s 1M -u $us0 || exit 1 -mdconfig -a -t malloc -s 2M -u $us1 || exit 1 -mdconfig -a -t malloc -s 3M -u $us2 || exit 1 +us0=$(attach_md -t malloc -s 1M) || exit 1 +us1=$(attach_md -t malloc -s 2M) || exit 1 +us2=$(attach_md -t malloc -s 3M) || exit 1 -gmirror label $name /dev/md${us0} /dev/md${us1} /dev/md${us2} || exit 1 +gmirror label $name /dev/$us0 /dev/$us1 /dev/$us2 || exit 1 devwait # Size of created device should be 1MB - 512b. @@ -25,10 +21,3 @@ if [ $size -eq 1048064 ]; then else echo "not ok 1" fi - -gmirror remove $name md${us0} -gmirror remove $name md${us1} -gmirror remove $name md${us2} -mdconfig -d -u $us0 -mdconfig -d -u $us1 -mdconfig -d -u $us2 Modified: stable/10/tools/regression/geom_mirror/test-2.t == --- stable/10/tools/regression/geom_mirror/test-2.t Sun Jan 24 06:04:38 2016(r294656) +++ stable/10/tools/regression/geom_mirror/test-2.t Sun Jan 24 06:19:49 2016(r294657) @@ -6,22 +6,19 @@ echo "1..4" balance="round-robin" -us0=45 -us1=`expr $us0 + 1` -us2=`expr $us0 + 2` ddbs=2048 nblocks1=1024 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp /tmp/$base.XX` || exit 1 -dst=`mktemp /tmp/$base.XX` || exit 1 +src=`mktemp $base.XX` || exit 1 +dst=`mktemp $base.XX` || exit 1 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -mdconfig -a -t malloc -s `expr $nblocks1 + 1` -u $us0 || exit 1 -mdconfig -a -t malloc -s `expr $nblocks1 + 1` -u $us1 || exit 1 -mdconfig -a -t malloc -s `expr $nblocks1 + 1` -u $us2 || exit 1 +us0=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 +us1=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 +us2=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -gmirror label -b $balance $name /dev/md${us0} /dev/md${us1} /dev/md${us2} || exit 1 +gmirror label -b $balance $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 devwait dd if=${src} of=/dev/mirror/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 @@ -32,28 +29,24 @@ if [ `md5 -q ${src}` != `md5 -q ${dst}` else echo "ok 1" fi -dd if=/dev/md${us0} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 +dd if=/dev/${us0} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then echo "not ok 2" else echo "ok 2" fi -dd if=/dev/md${us1} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 +dd if=/dev/${us1} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then echo "not ok 3" else echo "ok 3" fi -dd if=/dev/md${us2} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 +dd if=/dev/${us2} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then echo "not ok 4" else echo "ok 4" fi -gmirror remove $name md${us0}
svn commit: r294658 - stable/9/tools/regression/geom_mirror
Author: ngie Date: Sun Jan 24 06:20:57 2016 New Revision: 294658 URL: https://svnweb.freebsd.org/changeset/base/294658 Log: MFstable/10 r294657: MFC r293073: - Use attach_md instead of hardcoding md(4) provider unit numbers - Implement a gmirror_test_cleanup function, which in turn calls geom_test_cleanup to clean up all md(4) providers allocated in the test run. - Remove duplicate logic in test scripts for removing md(4) providers. - Don't create files in /tmp (outside the kyua sandbox); use the current directory instead Modified: stable/9/tools/regression/geom_mirror/conf.sh stable/9/tools/regression/geom_mirror/test-1.t stable/9/tools/regression/geom_mirror/test-2.t stable/9/tools/regression/geom_mirror/test-3.t stable/9/tools/regression/geom_mirror/test-4.t stable/9/tools/regression/geom_mirror/test-5.t stable/9/tools/regression/geom_mirror/test-6.t stable/9/tools/regression/geom_mirror/test-7.t Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) Modified: stable/9/tools/regression/geom_mirror/conf.sh == --- stable/9/tools/regression/geom_mirror/conf.sh Sun Jan 24 06:19:49 2016(r294657) +++ stable/9/tools/regression/geom_mirror/conf.sh Sun Jan 24 06:20:57 2016(r294658) @@ -5,4 +5,11 @@ name="$(mktemp -u mirror.XX)" class="mirror" base=`basename $0` +gmirror_test_cleanup() +{ + [ -c /dev/$class/$name ] && gmirror destroy $name + geom_test_cleanup +} +trap gmirror_test_cleanup ABRT EXIT INT TERM + . `dirname $0`/../geom_subr.sh Modified: stable/9/tools/regression/geom_mirror/test-1.t == --- stable/9/tools/regression/geom_mirror/test-1.t Sun Jan 24 06:19:49 2016(r294657) +++ stable/9/tools/regression/geom_mirror/test-1.t Sun Jan 24 06:20:57 2016(r294658) @@ -5,15 +5,11 @@ echo "1..1" -us0=45 -us1=`expr $us0 + 1` -us2=`expr $us0 + 2` - -mdconfig -a -t malloc -s 1M -u $us0 || exit 1 -mdconfig -a -t malloc -s 2M -u $us1 || exit 1 -mdconfig -a -t malloc -s 3M -u $us2 || exit 1 +us0=$(attach_md -t malloc -s 1M) || exit 1 +us1=$(attach_md -t malloc -s 2M) || exit 1 +us2=$(attach_md -t malloc -s 3M) || exit 1 -gmirror label $name /dev/md${us0} /dev/md${us1} /dev/md${us2} || exit 1 +gmirror label $name /dev/$us0 /dev/$us1 /dev/$us2 || exit 1 devwait # Size of created device should be 1MB - 512b. @@ -25,10 +21,3 @@ if [ $size -eq 1048064 ]; then else echo "not ok 1" fi - -gmirror remove $name md${us0} -gmirror remove $name md${us1} -gmirror remove $name md${us2} -mdconfig -d -u $us0 -mdconfig -d -u $us1 -mdconfig -d -u $us2 Modified: stable/9/tools/regression/geom_mirror/test-2.t == --- stable/9/tools/regression/geom_mirror/test-2.t Sun Jan 24 06:19:49 2016(r294657) +++ stable/9/tools/regression/geom_mirror/test-2.t Sun Jan 24 06:20:57 2016(r294658) @@ -6,22 +6,19 @@ echo "1..4" balance="round-robin" -us0=45 -us1=`expr $us0 + 1` -us2=`expr $us0 + 2` ddbs=2048 nblocks1=1024 nblocks2=`expr $nblocks1 / \( $ddbs / 512 \)` -src=`mktemp /tmp/$base.XX` || exit 1 -dst=`mktemp /tmp/$base.XX` || exit 1 +src=`mktemp $base.XX` || exit 1 +dst=`mktemp $base.XX` || exit 1 dd if=/dev/random of=${src} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 -mdconfig -a -t malloc -s `expr $nblocks1 + 1` -u $us0 || exit 1 -mdconfig -a -t malloc -s `expr $nblocks1 + 1` -u $us1 || exit 1 -mdconfig -a -t malloc -s `expr $nblocks1 + 1` -u $us2 || exit 1 +us0=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 +us1=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 +us2=$(attach_md -t malloc -s `expr $nblocks1 + 1`) || exit 1 -gmirror label -b $balance $name /dev/md${us0} /dev/md${us1} /dev/md${us2} || exit 1 +gmirror label -b $balance $name /dev/${us0} /dev/${us1} /dev/${us2} || exit 1 devwait dd if=${src} of=/dev/mirror/${name} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 @@ -32,28 +29,24 @@ if [ `md5 -q ${src}` != `md5 -q ${dst}` else echo "ok 1" fi -dd if=/dev/md${us0} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 +dd if=/dev/${us0} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then echo "not ok 2" else echo "ok 2" fi -dd if=/dev/md${us1} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 +dd if=/dev/${us1} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 if [ `md5 -q ${src}` != `md5 -q ${dst}` ]; then echo "not ok 3" else echo "ok 3" fi -dd if=/dev/md${us2} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 +dd if=/dev/${us2} of=${dst} bs=$ddbs count=$nblocks2 >/dev/null 2>&1 if [ `md5 -q ${src}` != `md5 -q ${dst}` ];