svn commit: r265311 - stable/10/sys/vm
Author: kib Date: Sun May 4 07:19:37 2014 New Revision: 265311 URL: http://svnweb.freebsd.org/changeset/base/265311 Log: MFC r265002: Fix vm_fault_copy_entry() operation on upgrade; allow it to find the pages in the shadowed objects. Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c == --- stable/10/sys/vm/vm_fault.c Sun May 4 04:01:26 2014(r265310) +++ stable/10/sys/vm/vm_fault.c Sun May 4 07:19:37 2014(r265311) @@ -1229,7 +1229,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm vm_offset_t vaddr; vm_page_t dst_m; vm_page_t src_m; - boolean_t src_readonly, upgrade; + boolean_t upgrade; #ifdef lint src_map++; @@ -1239,7 +1239,6 @@ vm_fault_copy_entry(vm_map_t dst_map, vm src_object = src_entry->object.vm_object; src_pindex = OFF_TO_IDX(src_entry->offset); - src_readonly = (src_entry->protection & VM_PROT_WRITE) == 0; /* * Create the top-level object for the destination entry. (Doesn't @@ -1310,25 +1309,33 @@ vm_fault_copy_entry(vm_map_t dst_map, vm /* * Find the page in the source object, and copy it in. -* (Because the source is wired down, the page will be in -* memory.) +* Because the source is wired down, the page will be +* in memory. */ VM_OBJECT_RLOCK(src_object); object = src_object; pindex = src_pindex + dst_pindex; while ((src_m = vm_page_lookup(object, pindex)) == NULL && - src_readonly && (backing_object = object->backing_object) != NULL) { /* -* Allow fallback to backing objects if we are reading. +* Unless the source mapping is read-only or +* it is presently being upgraded from +* read-only, the first object in the shadow +* chain should provide all of the pages. In +* other words, this loop body should never be +* executed when the source mapping is already +* read/write. */ + KASSERT((src_entry->protection & VM_PROT_WRITE) == 0 || + upgrade, + ("vm_fault_copy_entry: main object missing page")); + VM_OBJECT_RLOCK(backing_object); pindex += OFF_TO_IDX(object->backing_object_offset); VM_OBJECT_RUNLOCK(object); object = backing_object; } - if (src_m == NULL) - panic("vm_fault_copy_wired: page missing"); + KASSERT(src_m != NULL, ("vm_fault_copy_entry: page missing")); pmap_copy_page(src_m, dst_m); VM_OBJECT_RUNLOCK(object); dst_m->valid = VM_PAGE_BITS_ALL; ___ 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: r265312 - stable/10/sys/amd64/amd64
Author: kib Date: Sun May 4 07:22:51 2014 New Revision: 265312 URL: http://svnweb.freebsd.org/changeset/base/265312 Log: MFC r265004: Same as it was done in r263878 for invlrng_handler(), fix order of checks for special pcid values in invlpg_pcid_handler(). Modified: stable/10/sys/amd64/amd64/mp_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/mp_machdep.c == --- stable/10/sys/amd64/amd64/mp_machdep.c Sun May 4 07:19:37 2014 (r265311) +++ stable/10/sys/amd64/amd64/mp_machdep.c Sun May 4 07:22:51 2014 (r265312) @@ -1567,6 +1567,7 @@ invlpg_handler(void) void invlpg_pcid_handler(void) { + uint64_t cr3; #ifdef COUNT_XINVLTLB_HITS xhits_pg[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -1574,15 +1575,13 @@ invlpg_pcid_handler(void) (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - if (invpcid_works) { - invpcid(&smp_tlb_invpcid, INVPCID_ADDR); + if (smp_tlb_invpcid.pcid == (uint64_t)-1) { + invltlb_globpcid(); } else if (smp_tlb_invpcid.pcid == 0) { invlpg(smp_tlb_invpcid.addr); - } else if (smp_tlb_invpcid.pcid == (uint64_t)-1) { - invltlb_globpcid(); + } else if (invpcid_works) { + invpcid(&smp_tlb_invpcid, INVPCID_ADDR); } else { - uint64_t cr3; - /* * PCID supported, but INVPCID is not. * Temporarily switch to the target address ___ 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: r265313 - stable/10/secure/usr.sbin/sshd
Author: kib Date: Sun May 4 07:28:26 2014 New Revision: 265313 URL: http://svnweb.freebsd.org/changeset/base/265313 Log: MFC r265003: Fix order of libthr and libc in the global dso list for sshd. Modified: stable/10/secure/usr.sbin/sshd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/secure/usr.sbin/sshd/Makefile == --- stable/10/secure/usr.sbin/sshd/Makefile Sun May 4 07:22:51 2014 (r265312) +++ stable/10/secure/usr.sbin/sshd/Makefile Sun May 4 07:28:26 2014 (r265313) @@ -57,6 +57,16 @@ CFLAGS+= -DNONE_CIPHER_ENABLED DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} LDADD+= -lcrypt -lcrypto -lz +# Fix the order of NEEDED entries for libthr and libc. The libthr +# needs to interpose libc symbols, leaving the libthr loading as +# dependency of krb causes reversed order and broken interposing. Put +# the threading library last on the linker command line, just before +# the -lc added by a compiler driver. +.if ${MK_KERBEROS_SUPPORT} != "no" +DPADD+= ${LIBPTHREAD} +LDADD+= -lpthread +.endif + .if defined(LOCALBASE) CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\" .endif ___ 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: r265314 - stable/9/secure/usr.sbin/sshd
Author: kib Date: Sun May 4 07:57:20 2014 New Revision: 265314 URL: http://svnweb.freebsd.org/changeset/base/265314 Log: MFC r265003: Fix order of libthr and libc in the global dso list for sshd. Modified: stable/9/secure/usr.sbin/sshd/Makefile Directory Properties: stable/9/secure/usr.sbin/sshd/ (props changed) Modified: stable/9/secure/usr.sbin/sshd/Makefile == --- stable/9/secure/usr.sbin/sshd/Makefile Sun May 4 07:28:26 2014 (r265313) +++ stable/9/secure/usr.sbin/sshd/Makefile Sun May 4 07:57:20 2014 (r265314) @@ -50,6 +50,16 @@ CFLAGS+= -DNONE_CIPHER_ENABLED DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ} LDADD+= -lcrypt -lcrypto -lz +# Fix the order of NEEDED entries for libthr and libc. The libthr +# needs to interpose libc symbols, leaving the libthr loading as +# dependency of krb causes reversed order and broken interposing. Put +# the threading library last on the linker command line, just before +# the -lc added by a compiler driver. +.if ${MK_KERBEROS_SUPPORT} != "no" +DPADD+= ${LIBPTHREAD} +LDADD+= -lpthread +.endif + .if defined(LOCALBASE) CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin/xauth\" .endif ___ 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: r265315 - stable/9/sys/vm
Author: kib Date: Sun May 4 08:00:07 2014 New Revision: 265315 URL: http://svnweb.freebsd.org/changeset/base/265315 Log: MFC r265002: Fix vm_fault_copy_entry() operation on upgrade; allow it to find the pages in the shadowed objects. Modified: stable/9/sys/vm/vm_fault.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_fault.c == --- stable/9/sys/vm/vm_fault.c Sun May 4 07:57:20 2014(r265314) +++ stable/9/sys/vm/vm_fault.c Sun May 4 08:00:07 2014(r265315) @@ -1271,7 +1271,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm vm_offset_t vaddr; vm_page_t dst_m; vm_page_t src_m; - boolean_t src_readonly, upgrade; + boolean_t upgrade; #ifdef lint src_map++; @@ -1281,7 +1281,6 @@ vm_fault_copy_entry(vm_map_t dst_map, vm src_object = src_entry->object.vm_object; src_pindex = OFF_TO_IDX(src_entry->offset); - src_readonly = (src_entry->protection & VM_PROT_WRITE) == 0; /* * Create the top-level object for the destination entry. (Doesn't @@ -1352,25 +1351,33 @@ vm_fault_copy_entry(vm_map_t dst_map, vm /* * Find the page in the source object, and copy it in. -* (Because the source is wired down, the page will be in -* memory.) +* Because the source is wired down, the page will be +* in memory. */ VM_OBJECT_LOCK(src_object); object = src_object; pindex = src_pindex + dst_pindex; while ((src_m = vm_page_lookup(object, pindex)) == NULL && - src_readonly && (backing_object = object->backing_object) != NULL) { /* -* Allow fallback to backing objects if we are reading. +* Unless the source mapping is read-only or +* it is presently being upgraded from +* read-only, the first object in the shadow +* chain should provide all of the pages. In +* other words, this loop body should never be +* executed when the source mapping is already +* read/write. */ + KASSERT((src_entry->protection & VM_PROT_WRITE) == 0 || + upgrade, + ("vm_fault_copy_entry: main object missing page")); + VM_OBJECT_LOCK(backing_object); pindex += OFF_TO_IDX(object->backing_object_offset); VM_OBJECT_UNLOCK(object); object = backing_object; } - if (src_m == NULL) - panic("vm_fault_copy_wired: page missing"); + KASSERT(src_m != NULL, ("vm_fault_copy_entry: page missing")); pmap_copy_page(src_m, dst_m); VM_OBJECT_UNLOCK(object); dst_m->valid = VM_PAGE_BITS_ALL; ___ 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: r265318 - head/sys/geom/part
Author: ae Date: Sun May 4 10:14:25 2014 New Revision: 265318 URL: http://svnweb.freebsd.org/changeset/base/265318 Log: For schemes that do an automatic partition aligning move this code to separate function. MFC after:1 week Modified: head/sys/geom/part/g_part_ebr.c head/sys/geom/part/g_part_mbr.c head/sys/geom/part/g_part_pc98.c head/sys/geom/part/g_part_vtoc8.c Modified: head/sys/geom/part/g_part_ebr.c == --- head/sys/geom/part/g_part_ebr.c Sun May 4 09:07:45 2014 (r265317) +++ head/sys/geom/part/g_part_ebr.c Sun May 4 10:14:25 2014 (r265318) @@ -220,47 +220,54 @@ ebr_set_chs(struct g_part_table *table, } static int +ebr_align(struct g_part_table *basetable, uint32_t *start, uint32_t *size) +{ + uint32_t sectors; + + sectors = basetable->gpt_sectors; + if (*size < 2 * sectors) + return (EINVAL); + if (*start % sectors) { + *size += (*start % sectors) - sectors; + *start -= (*start % sectors) - sectors; + } + if (*size % sectors) + *size -= (*size % sectors); + if (*size < 2 * sectors) + return (EINVAL); + return (0); +} + + +static int g_part_ebr_add(struct g_part_table *basetable, struct g_part_entry *baseentry, struct g_part_parms *gpp) { - struct g_geom *gp; struct g_provider *pp; struct g_part_ebr_entry *entry; - uint32_t start, size, sectors; + uint32_t start, size; if (gpp->gpp_parms & G_PART_PARM_LABEL) return (EINVAL); - gp = basetable->gpt_gp; - pp = LIST_FIRST(&gp->consumer)->provider; - sectors = basetable->gpt_sectors; - + pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; entry = (struct g_part_ebr_entry *)baseentry; - start = gpp->gpp_start; size = gpp->gpp_size; - if (size < 2 * sectors) - return (EINVAL); - if (start % sectors) { - size = size - sectors + (start % sectors); - start = start - (start % sectors) + sectors; - } - if (size % sectors) - size = size - (size % sectors); - if (size < 2 * sectors) + if (ebr_align(basetable, &start, &size) != 0) return (EINVAL); - if (baseentry->gpe_deleted) bzero(&entry->ent, sizeof(entry->ent)); KASSERT(baseentry->gpe_start <= start, ("%s", __func__)); KASSERT(baseentry->gpe_end >= start + size - 1, ("%s", __func__)); - baseentry->gpe_index = (start / sectors) + 1; - baseentry->gpe_offset = (off_t)(start + sectors) * pp->sectorsize; + baseentry->gpe_index = (start / basetable->gpt_sectors) + 1; + baseentry->gpe_offset = + (off_t)(start + basetable->gpt_sectors) * pp->sectorsize; baseentry->gpe_start = start; baseentry->gpe_end = start + size - 1; - entry->ent.dp_start = sectors; - entry->ent.dp_size = size - sectors; + entry->ent.dp_start = basetable->gpt_sectors; + entry->ent.dp_size = size - basetable->gpt_sectors; ebr_set_chs(basetable, entry->ent.dp_start, &entry->ent.dp_scyl, &entry->ent.dp_shd, &entry->ent.dp_ssect); ebr_set_chs(basetable, baseentry->gpe_end, &entry->ent.dp_ecyl, Modified: head/sys/geom/part/g_part_mbr.c == --- head/sys/geom/part/g_part_mbr.c Sun May 4 09:07:45 2014 (r265317) +++ head/sys/geom/part/g_part_mbr.c Sun May 4 10:14:25 2014 (r265318) @@ -195,34 +195,39 @@ mbr_set_chs(struct g_part_table *table, } static int +mbr_align(struct g_part_table *basetable, uint32_t *start, uint32_t *size) +{ + uint32_t sectors; + + sectors = basetable->gpt_sectors; + if (*size < sectors) + return (EINVAL); + if (start != NULL && (*start % sectors)) { + *size += (*start % sectors) - sectors; + *start -= (*start % sectors) - sectors; + } + if (*size % sectors) + *size -= (*size % sectors); + if (*size < sectors) + return (EINVAL); + return (0); +} + +static int g_part_mbr_add(struct g_part_table *basetable, struct g_part_entry *baseentry, struct g_part_parms *gpp) { struct g_part_mbr_entry *entry; - struct g_part_mbr_table *table; - uint32_t start, size, sectors; + uint32_t start, size; if (gpp->gpp_parms & G_PART_PARM_LABEL) return (EINVAL); - sectors = basetable->gpt_sectors; - entry = (struct g_part_mbr_entry *)baseentry; - table = (struct g_part_mbr_table *)basetable; - start = gpp->gpp_start; size = gpp->gpp_size; - if (size < sectors) - return (EINVAL); - if (start % sectors) {
svn commit: r265319 - head/usr.bin/nl
Author: pluknet Date: Sun May 4 12:20:40 2014 New Revision: 265319 URL: http://svnweb.freebsd.org/changeset/base/265319 Log: Treat the '-' as meaning standard input. Obtained from:NetBSD Modified: head/usr.bin/nl/nl.1 head/usr.bin/nl/nl.c Modified: head/usr.bin/nl/nl.1 == --- head/usr.bin/nl/nl.1Sun May 4 10:14:25 2014(r265318) +++ head/usr.bin/nl/nl.1Sun May 4 12:20:40 2014(r265319) @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 26, 2005 +.Dd May 4, 2014 .Dt NL 1 .Os .Sh NAME @@ -71,12 +71,16 @@ The .Nm utility reads lines from the named +.Ar file , +applies a configurable line numbering filter operation, +and writes the result to the standard output. +If .Ar file -or the standard input if the -.Ar file -argument is omitted, -applies a configurable line numbering filter operation and writes the result -to the standard output. +is a single dash +.Pq Sq Fl +or absent, +.Nm +reads from the standard input. .Pp The .Nm Modified: head/usr.bin/nl/nl.c == --- head/usr.bin/nl/nl.cSun May 4 10:14:25 2014(r265318) +++ head/usr.bin/nl/nl.cSun May 4 12:20:40 2014(r265319) @@ -242,7 +242,8 @@ main(int argc, char *argv[]) case 0: break; case 1: - if (freopen(argv[0], "r", stdin) == NULL) + if (strcmp(argv[0], "-") != 0 && + freopen(argv[0], "r", stdin) == NULL) err(EXIT_FAILURE, "%s", argv[0]); break; default: ___ 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: r265320 - head/share/man/man9
Author: pluknet Date: Sun May 4 12:32:37 2014 New Revision: 265320 URL: http://svnweb.freebsd.org/changeset/base/265320 Log: Expand PGET_WANTREAD. Language fixes. Submitted by: jmg Modified: head/share/man/man9/pget.9 Modified: head/share/man/man9/pget.9 == --- head/share/man/man9/pget.9 Sun May 4 12:20:40 2014(r265319) +++ head/share/man/man9/pget.9 Sun May 4 12:32:37 2014(r265320) @@ -46,13 +46,13 @@ and fills a pointer to the structure in .Fa *pp . In the latter case, a process owning the specified thread is looked for. -The actual operation is performed by invoking the +The operation is performed by invoking the .Xr pfind 9 function. The found process is returned locked. -Only for +For the .Dv PGET_HOLD -case it is returned unlocked (but held). +case, it is returned unlocked (but held). The .Fn pget function can @@ -65,7 +65,7 @@ The argument is the logical OR of some subset of: .Bl -tag -width ".Dv PGET_NOTINEXEC" .It Dv PGET_HOLD -If set, the found process will be referenced and unlocked. +If set, the found process will be held and unlocked. .It Dv PGET_CANSEE If set, the found process will be checked for its visibility. See @@ -93,6 +93,8 @@ If set, is not assumed as a thread id for values larger than .Dv PID_MAX . .It Dv PGET_WANTREAD +If set, the found process will be checked that the caller may get +a read access to its structure. A shorthand for .Pq Dv PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT . .El ___ 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: r265321 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: smh Date: Sun May 4 14:05:14 2014 New Revision: 265321 URL: http://svnweb.freebsd.org/changeset/base/265321 Log: Use a zio flag to prevent recursion of vdev_queue_io_done which can cause stack overflow for IO's which return ZIO_PIPELINE_CONTINUE from the zio_vdev_io_start stage and hence don't suspend and complete in a different thread. This prevents double fault panic on slow machines running ZFS on GELI volumes which return EOPNOTSUPP directly to BIO_DELETE requests. MFC after:1 month X-MFC-With: r265152 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Sun May 4 12:32:37 2014(r265320) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Sun May 4 14:05:14 2014(r265321) @@ -196,6 +196,7 @@ enum zio_flag { ZIO_FLAG_NOPWRITE = 1 << 25, ZIO_FLAG_REEXECUTED = 1 << 26, ZIO_FLAG_DELEGATED = 1 << 27, + ZIO_FLAG_QUEUE_IO_DONE = 1 << 28, }; #defineZIO_FLAG_MUSTSUCCEED0 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.cSun May 4 12:32:37 2014(r265320) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.cSun May 4 14:05:14 2014(r265321) @@ -796,14 +796,25 @@ vdev_queue_io_done(zio_t *zio) vq->vq_io_complete_ts = gethrtime(); + if (zio->io_flags & ZIO_FLAG_QUEUE_IO_DONE) { + /* +* Executing from a previous vdev_queue_io_done so +* to avoid recursion we just unlock and return. +*/ + mutex_exit(&vq->vq_lock); + return; + } + while ((nio = vdev_queue_io_to_issue(vq)) != NULL) { mutex_exit(&vq->vq_lock); + nio->io_flags |= ZIO_FLAG_QUEUE_IO_DONE; if (nio->io_done == vdev_queue_agg_io_done) { zio_nowait(nio); } else { zio_vdev_io_reissue(nio); zio_execute(nio); } + nio->io_flags &= ~ZIO_FLAG_QUEUE_IO_DONE; mutex_enter(&vq->vq_lock); } ___ 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: r265323 - head/sys/cam/ctl
Author: trasz Date: Sun May 4 15:35:04 2014 New Revision: 265323 URL: http://svnweb.freebsd.org/changeset/base/265323 Log: Provide better descriptions for 'struct ctl_scsiio' fields; based mostly on emails from ken@. Modified: head/sys/cam/ctl/ctl_io.h Modified: head/sys/cam/ctl/ctl_io.h == --- head/sys/cam/ctl/ctl_io.h Sun May 4 15:05:53 2014(r265322) +++ head/sys/cam/ctl/ctl_io.h Sun May 4 15:35:04 2014(r265323) @@ -293,21 +293,60 @@ union ctl_io; */ struct ctl_scsiio { struct ctl_io_hdr io_hdr; /* common to all I/O types */ + + /* +* The ext_* fields are generally intended for frontend use; CTL itself +* doesn't modify or use them. +*/ uint32_t ext_sg_entries; /* 0 = no S/G list, > 0 = num entries */ uint8_t*ext_data_ptr; /* data buffer or S/G list */ uint32_t ext_data_len;/* Data transfer length */ uint32_t ext_data_filled; /* Amount of data filled so far */ - uint32_t kern_sg_entries; /* 0 = no S/G list, > 0 = num entries */ - uint32_t rem_sg_entries; /* 0 = no S/G list, > 0 = num entries */ - uint8_t*kern_data_ptr; /* data buffer or S/G list */ - uint32_t kern_data_len; /* Length of this S/G list/buffer */ - uint32_t kern_total_len; /* Total length of this transaction */ - uint32_t kern_data_resid; /* Length left to transfer after this*/ - uint32_t kern_rel_offset; /* Byte Offset of this transfer */ + + /* +* The number of scatter/gather entries in the list pointed to +* by kern_data_ptr. 0 means there is no list, just a data pointer. +*/ + uint32_t kern_sg_entries; + + uint32_t rem_sg_entries; /* Unused. */ + + /* +* The data pointer or a pointer to the scatter/gather list. +*/ + uint8_t*kern_data_ptr; + + /* +* Length of the data buffer or scatter/gather list. It's also +* the length of this particular piece of the data transfer, +* ie. number of bytes expected to be transferred by the current +* invocation of frontend's datamove() callback. It's always +* less than or equal to kern_total_len. +*/ + uint32_t kern_data_len; + + /* +* Total length of data to be transferred during this particular +* SCSI command, as decoded from SCSI CDB. +*/ + uint32_t kern_total_len; + + /* +* Amount of data left after the current data transfer. +*/ + uint32_t kern_data_resid; + + /* +* Byte offset of this transfer, equal to the amount of data +* already transferred for this SCSI command during previous +* datamove() invocations. +*/ + uint32_t kern_rel_offset; + struct scsi_sense_data sense_data; /* sense data */ uint8_tsense_len; /* Returned sense length */ uint8_tscsi_status; /* SCSI status byte */ - uint8_tsense_residual; /* sense residual length */ + uint8_tsense_residual; /* Unused. */ uint32_t residual;/* data residual length */ uint32_t tag_num; /* tag number */ ctl_tag_type tag_type; /* simple, ordered, head of queue,etc.*/ ___ 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: r265329 - in head/sys: amd64/conf i386/conf
Author: nwhitehorn Date: Sun May 4 16:38:21 2014 New Revision: 265329 URL: http://svnweb.freebsd.org/changeset/base/265329 Log: Disable ACPI and P4TCC throttling by default, following discussion on freebsd-current. These CPU speed control techniques are usually unhelpful at best. For now, continue building the relevant code into GENERIC so that it can trivially be re-enabled at runtime if anyone wants it. MFC after:1 month Modified: head/sys/amd64/conf/GENERIC.hints head/sys/i386/conf/GENERIC.hints Modified: head/sys/amd64/conf/GENERIC.hints == --- head/sys/amd64/conf/GENERIC.hints Sun May 4 16:00:59 2014 (r265328) +++ head/sys/amd64/conf/GENERIC.hints Sun May 4 16:38:21 2014 (r265329) @@ -31,3 +31,5 @@ hint.attimer.0.at="isa" hint.attimer.0.port="0x40" hint.attimer.0.irq="0" hint.wbwd.0.at="isa" +hint.acpi_throttle.0.disabled="1" +hint.p4tcc.0.disabled="1" Modified: head/sys/i386/conf/GENERIC.hints == --- head/sys/i386/conf/GENERIC.hintsSun May 4 16:00:59 2014 (r265328) +++ head/sys/i386/conf/GENERIC.hintsSun May 4 16:38:21 2014 (r265329) @@ -39,3 +39,5 @@ hint.attimer.0.at="isa" hint.attimer.0.port="0x40" hint.attimer.0.irq="0" hint.wbwd.0.at="isa" +hint.acpi_throttle.0.disabled="1" +hint.p4tcc.0.disabled="1" ___ 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: r265331 - head/sys/geom/part
Author: ae Date: Sun May 4 16:43:57 2014 New Revision: 265331 URL: http://svnweb.freebsd.org/changeset/base/265331 Log: Prevent an unexpected shrinking on resizing due to alignment for MBR, PC98 and VTOC8 schemes. Reported by: jmg MFC after:1 week Modified: head/sys/geom/part/g_part_mbr.c head/sys/geom/part/g_part_pc98.c head/sys/geom/part/g_part_vtoc8.c Modified: head/sys/geom/part/g_part_mbr.c == --- head/sys/geom/part/g_part_mbr.c Sun May 4 16:39:18 2014 (r265330) +++ head/sys/geom/part/g_part_mbr.c Sun May 4 16:43:57 2014 (r265331) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -353,7 +354,11 @@ g_part_mbr_resize(struct g_part_table *b size = gpp->gpp_size; if (mbr_align(basetable, NULL, &size) != 0) return (EINVAL); - + /* XXX: prevent unexpected shrinking. */ + pp = baseentry->gpe_pp; + if ((g_debugflags & 16) == 0 && size < gpp->gpp_size && + (pp->acr > 0 || pp->acw > 0 || pp->ace > 0)) + return (EBUSY); entry = (struct g_part_mbr_entry *)baseentry; baseentry->gpe_end = baseentry->gpe_start + size - 1; entry->ent.dp_size = size; Modified: head/sys/geom/part/g_part_pc98.c == --- head/sys/geom/part/g_part_pc98.cSun May 4 16:39:18 2014 (r265330) +++ head/sys/geom/part/g_part_pc98.cSun May 4 16:43:57 2014 (r265331) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -360,7 +361,11 @@ g_part_pc98_resize(struct g_part_table * size = gpp->gpp_size; if (pc98_align(basetable, NULL, &size) != 0) return (EINVAL); - + /* XXX: prevent unexpected shrinking. */ + pp = baseentry->gpe_pp; + if ((g_debugflags & 0x10) == 0 && size < gpp->gpp_size && + (pp->acr > 0 || pp->acw > 0 || pp->ace > 0)) + return (EBUSY); entry = (struct g_part_pc98_entry *)baseentry; baseentry->gpe_end = baseentry->gpe_start + size - 1; pc98_set_chs(basetable, baseentry->gpe_end, &entry->ent.dp_ecyl, Modified: head/sys/geom/part/g_part_vtoc8.c == --- head/sys/geom/part/g_part_vtoc8.c Sun May 4 16:39:18 2014 (r265330) +++ head/sys/geom/part/g_part_vtoc8.c Sun May 4 16:43:57 2014 (r265331) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "g_part_if.h" @@ -367,7 +368,11 @@ g_part_vtoc8_resize(struct g_part_table size = gpp->gpp_size; if (vtoc8_align(table, NULL, &size) != 0) return (EINVAL); - + /* XXX: prevent unexpected shrinking. */ + pp = entry->gpe_pp; + if ((g_debugflags & 0x10) == 0 && size < gpp->gpp_size && + (pp->acr > 0 || pp->acw > 0 || pp->ace > 0)) + return (EBUSY); entry->gpe_end = entry->gpe_start + size - 1; be32enc(&table->vtoc.map[entry->gpe_index - 1].nblks, size); ___ 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: r265333 - head/sys/geom/part
Author: ae Date: Sun May 4 16:55:51 2014 New Revision: 265333 URL: http://svnweb.freebsd.org/changeset/base/265333 Log: Add better error description for case when we are doing resize and scheme-specific method returns EBUSY. MFC after:1 week Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c == --- head/sys/geom/part/g_part.c Sun May 4 16:55:27 2014(r265332) +++ head/sys/geom/part/g_part.c Sun May 4 16:55:51 2014(r265333) @@ -1316,7 +1316,9 @@ g_part_ctl_resize(struct gctl_req *req, error = G_PART_RESIZE(table, entry, gpp); if (error) { - gctl_error(req, "%d", error); + gctl_error(req, "%d%s", error, error != EBUSY ? "": + " resizing will lead to unexpected shrinking" + " due to alignment"); return (error); } ___ 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: r265334 - head/release/doc/en_US.ISO8859-1/relnotes
Author: gjb Date: Sun May 4 17:53:01 2014 New Revision: 265334 URL: http://svnweb.freebsd.org/changeset/base/265334 Log: Fix typo: s/null/full Spotted by: jilles Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml == --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun May 4 16:55:51 2014(r265333) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun May 4 17:53:01 2014(r265334) @@ -107,7 +107,7 @@ The &man.full.4; device has been added, and the lindev(4) device has been removed. Prior to this change, lindev(4) provided only - the /dev/null character device, returning + the /dev/full character device, returning ENOSPC on write attempts. As this device is not specific to &linux;, a native &os; version has been added. ___ 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: r265336 - head/sys/geom/part
Author: ae Date: Sun May 4 20:00:08 2014 New Revision: 265336 URL: http://svnweb.freebsd.org/changeset/base/265336 Log: Add an advice what to do when partition was automatically resized. X-MFC after: r256690 Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c == --- head/sys/geom/part/g_part.c Sun May 4 18:15:07 2014(r265335) +++ head/sys/geom/part/g_part.c Sun May 4 20:00:08 2014(r265336) @@ -2065,8 +2065,10 @@ g_part_resize(struct g_consumer *cp) table->gpt_opened = 1; } if (G_PART_RESIZE(table, NULL, NULL) == 0) - printf("GEOM_PART: %s was automatically resized\n", - cp->geom->name); + printf("GEOM_PART: %s was automatically resized.\n" + " Use `gpart commit %s` to save changes or " + "`gpart undo %s` to revert them.\n", cp->geom->name, + cp->geom->name, cp->geom->name); if (g_part_check_integrity(table, cp) != 0) { g_access(cp, -1, -1, -1); table->gpt_opened = 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: r265329 - in head/sys: amd64/conf i386/conf
.. and much cheering was had. :) -a On 4 May 2014 09:38, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Sun May 4 16:38:21 2014 > New Revision: 265329 > URL: http://svnweb.freebsd.org/changeset/base/265329 > > Log: > Disable ACPI and P4TCC throttling by default, following discussion on > freebsd-current. These CPU speed control techniques are usually unhelpful > at best. For now, continue building the relevant code into GENERIC so that > it can trivially be re-enabled at runtime if anyone wants it. > > MFC after:1 month > > Modified: > head/sys/amd64/conf/GENERIC.hints > head/sys/i386/conf/GENERIC.hints > > Modified: head/sys/amd64/conf/GENERIC.hints > == > --- head/sys/amd64/conf/GENERIC.hints Sun May 4 16:00:59 2014 > (r265328) > +++ head/sys/amd64/conf/GENERIC.hints Sun May 4 16:38:21 2014 > (r265329) > @@ -31,3 +31,5 @@ hint.attimer.0.at="isa" > hint.attimer.0.port="0x40" > hint.attimer.0.irq="0" > hint.wbwd.0.at="isa" > +hint.acpi_throttle.0.disabled="1" > +hint.p4tcc.0.disabled="1" > > Modified: head/sys/i386/conf/GENERIC.hints > == > --- head/sys/i386/conf/GENERIC.hintsSun May 4 16:00:59 2014 > (r265328) > +++ head/sys/i386/conf/GENERIC.hintsSun May 4 16:38:21 2014 > (r265329) > @@ -39,3 +39,5 @@ hint.attimer.0.at="isa" > hint.attimer.0.port="0x40" > hint.attimer.0.irq="0" > hint.wbwd.0.at="isa" > +hint.acpi_throttle.0.disabled="1" > +hint.p4tcc.0.disabled="1" > ___ 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: r265338 - in head/sys: netinet sys
Author: glebius Date: Sun May 4 23:25:32 2014 New Revision: 265338 URL: http://svnweb.freebsd.org/changeset/base/265338 Log: The FreeBSD-SA-14:08.tcp was a lesson on not doing acrobatics with mixing on stack memory and UMA memory in one linked list. Thus, rewrite TCP reassembly code in terms of memory usage. The algorithm remains unchanged. We actually do not need extra memory to build a reassembly queue. Arriving mbufs are always packet header mbufs. So we got the length of data as pkthdr.len. We got m_nextpkt for linkage. And we need only one pointer to point at the tcphdr, use PH_loc for that. In tcpcb the t_segq fields becomes mbuf pointer. The t_segqlen field now counts not packets, but bytes in the queue. This gives us more precision when comparing to socket buffer limits. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/sys/sys/mbuf.h Modified: head/sys/netinet/tcp_input.c == --- head/sys/netinet/tcp_input.cSun May 4 20:21:41 2014 (r265337) +++ head/sys/netinet/tcp_input.cSun May 4 23:25:32 2014 (r265338) @@ -1639,8 +1639,7 @@ tcp_do_segment(struct mbuf *m, struct tc tp->snd_nxt == tp->snd_max && tiwin && tiwin == tp->snd_wnd && ((tp->t_flags & (TF_NEEDSYN|TF_NEEDFIN)) == 0) && - LIST_EMPTY(&tp->t_segq) && - ((to.to_flags & TOF_TS) == 0 || + tp->t_segq == NULL && ((to.to_flags & TOF_TS) == 0 || TSTMP_GEQ(to.to_tsval, tp->ts_recent)) ) { /* @@ -2908,8 +2907,7 @@ dodata: /* XXX */ * immediately when segments are out of order (so * fast retransmit can work). */ - if (th->th_seq == tp->rcv_nxt && - LIST_EMPTY(&tp->t_segq) && + if (th->th_seq == tp->rcv_nxt && tp->t_segq == NULL && TCPS_HAVEESTABLISHED(tp->t_state)) { if (DELAY_ACK(tp, tlen)) tp->t_flags |= TF_DELACK; Modified: head/sys/netinet/tcp_reass.c == --- head/sys/netinet/tcp_reass.cSun May 4 20:21:41 2014 (r265337) +++ head/sys/netinet/tcp_reass.cSun May 4 23:25:32 2014 (r265338) @@ -71,19 +71,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef TCPDEBUG -#include -#endif /* TCPDEBUG */ static SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, "TCP Segment Reassembly Queue"); -static VNET_DEFINE(int, tcp_reass_maxseg) = 0; -#defineV_tcp_reass_maxseg VNET(tcp_reass_maxseg) -SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_RDTUN, -&VNET_NAME(tcp_reass_maxseg), 0, -"Global maximum number of TCP Segments in Reassembly Queue"); - static VNET_DEFINE(int, tcp_reass_overflows) = 0; #defineV_tcp_reass_overflows VNET(tcp_reass_overflows) SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, overflows, @@ -91,78 +82,32 @@ SYSCTL_VNET_INT(_net_inet_tcp_reass, OID &VNET_NAME(tcp_reass_overflows), 0, "Global number of TCP Segment Reassembly Queue Overflows"); -static VNET_DEFINE(uma_zone_t, tcp_reass_zone); -#defineV_tcp_reass_zoneVNET(tcp_reass_zone) -SYSCTL_UMA_CUR(_net_inet_tcp_reass, OID_AUTO, cursegments, CTLFLAG_VNET, -&VNET_NAME(tcp_reass_zone), -"Global number of TCP Segments currently in Reassembly Queue"); - -/* Initialize TCP reassembly queue */ -static void -tcp_reass_zone_change(void *tag) -{ - - /* Set the zone limit and read back the effective value. */ - V_tcp_reass_maxseg = nmbclusters / 16; - V_tcp_reass_maxseg = uma_zone_set_max(V_tcp_reass_zone, - V_tcp_reass_maxseg); -} - -void -tcp_reass_init(void) -{ - - V_tcp_reass_maxseg = nmbclusters / 16; - TUNABLE_INT_FETCH("net.inet.tcp.reass.maxsegments", - &V_tcp_reass_maxseg); - V_tcp_reass_zone = uma_zcreate("tcpreass", sizeof (struct tseg_qent), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); - /* Set the zone limit and read back the effective value. */ - V_tcp_reass_maxseg = uma_zone_set_max(V_tcp_reass_zone, - V_tcp_reass_maxseg); - EVENTHANDLER_REGISTER(nmbclusters_change, - tcp_reass_zone_change, NULL, EVENTHANDLER_PRI_ANY); -} - -#ifdef VIMAGE -void -tcp_reass_destroy(void) -{ - - uma_zdestroy(V_tcp_reass_zone); -} -#endif - void tcp_reass_flush(struct tcpcb *tp) { - struct tseg_qent *qe; + struct mbuf *m; INP_WLOCK_ASSERT(tp->t_inpcb); - while ((qe = LIST_F
Re: svn commit: r262957 - in head/etc: etc.arm etc.ia64 etc.mips etc.powerpc etc.sparc64
On Apr 29, 2014, at 10:44 PM, Nathan Whitehorn wrote: > On 03/09/14 14:06, Marcel Moolenaar wrote: >> Author: marcel >> Date: Sun Mar 9 21:06:22 2014 >> New Revision: 262957 >> URL: http://svnweb.freebsd.org/changeset/base/262957 >> >> Log: >> Change the terminal type/class for enabled serial lines to 3wire. This >> allows us to change the uart(4) driver to not hardcode specific line >> settings for the serial console. >> A terminal type of 3wire makes sure the console still works when no DCD >> signal is present, which preserves behviour. When it is known that the >> terminal server (or DCE in general) provides DCD, a terminal type/class >> of std can be used. This has the effect of being logged out when one >> disconnects from the console -- improving security overall. >> Likewise, when uart(4) does not fixate the baudrate, one can change >> the terminal type/class to set a specific baudrate. An operator can use >> this to change the console speed mid-flight, without needing a reboot. >> Of course it helps in this respect if and when the firmware can be >> configured from the OS. >> The above mentioned capabilities depend on uart(4) being changed, which >> is to happen next. >> > > Should we set onifconsole for x86 UARTs as well? That enables them if they > are the kernel console and is probably a user friendliness improvement. Sorry for the delay... I think that's a very good idea. I wasn't even aware of this flag. We could mark all ttyu# lines as onifconsole by default across all architectures and if that unifies the contents of the /etc/ttys file, revert back to a single one... -- Marcel Moolenaar mar...@xcllnt.net signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r262957 - in head/etc: etc.arm etc.ia64 etc.mips etc.powerpc etc.sparc64
On 05/04/14 16:42, Marcel Moolenaar wrote: On Apr 29, 2014, at 10:44 PM, Nathan Whitehorn wrote: On 03/09/14 14:06, Marcel Moolenaar wrote: Author: marcel Date: Sun Mar 9 21:06:22 2014 New Revision: 262957 URL: http://svnweb.freebsd.org/changeset/base/262957 Log: Change the terminal type/class for enabled serial lines to 3wire. This allows us to change the uart(4) driver to not hardcode specific line settings for the serial console. A terminal type of 3wire makes sure the console still works when no DCD signal is present, which preserves behviour. When it is known that the terminal server (or DCE in general) provides DCD, a terminal type/class of std can be used. This has the effect of being logged out when one disconnects from the console -- improving security overall. Likewise, when uart(4) does not fixate the baudrate, one can change the terminal type/class to set a specific baudrate. An operator can use this to change the console speed mid-flight, without needing a reboot. Of course it helps in this respect if and when the firmware can be configured from the OS. The above mentioned capabilities depend on uart(4) being changed, which is to happen next. Should we set onifconsole for x86 UARTs as well? That enables them if they are the kernel console and is probably a user friendliness improvement. Sorry for the delay... I think that's a very good idea. I wasn't even aware of this flag. We could mark all ttyu# lines as onifconsole by default across all architectures and if that unifies the contents of the /etc/ttys file, revert back to a single one... A single ttys file would be fantastic! Could you take the lead here? I'm pretty busy at the moment. -Nathan ___ 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: r265339 - in stable/9/sys/fs: nfs nfsclient
Author: rmacklem Date: Mon May 5 01:01:30 2014 New Revision: 265339 URL: http://svnweb.freebsd.org/changeset/base/265339 Log: MFC: r264672 Modify the Lookup RPC for NFSv4 so that it acquires directory attributes. This allows the client to cache directory names when they are looked up, reducing the Lookup RPC count by about 40% for software builds. Modified: stable/9/sys/fs/nfs/nfs_commonsubs.c stable/9/sys/fs/nfsclient/nfs_clcomsubs.c stable/9/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfs/nfs_commonsubs.c == --- stable/9/sys/fs/nfs/nfs_commonsubs.cSun May 4 23:25:32 2014 (r265338) +++ stable/9/sys/fs/nfs/nfs_commonsubs.cMon May 5 01:01:30 2014 (r265339) @@ -101,8 +101,8 @@ struct nfsv4_opflag nfsv4_opflag[NFSV4OP { 0, 1, 0, 0, LK_EXCLUSIVE }, /* Lock */ { 0, 1, 0, 0, LK_EXCLUSIVE }, /* LockT */ { 0, 1, 0, 0, LK_EXCLUSIVE }, /* LockU */ - { 1, 1, 0, 0, LK_EXCLUSIVE }, /* Lookup */ - { 1, 1, 0, 0, LK_EXCLUSIVE }, /* Lookupp */ + { 1, 2, 0, 0, LK_EXCLUSIVE }, /* Lookup */ + { 1, 2, 0, 0, LK_EXCLUSIVE }, /* Lookupp */ { 0, 1, 0, 0, LK_EXCLUSIVE }, /* NVerify */ { 1, 1, 0, 1, LK_EXCLUSIVE }, /* Open */ { 1, 1, 0, 0, LK_EXCLUSIVE }, /* OpenAttr */ Modified: stable/9/sys/fs/nfsclient/nfs_clcomsubs.c == --- stable/9/sys/fs/nfsclient/nfs_clcomsubs.c Sun May 4 23:25:32 2014 (r265338) +++ stable/9/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 5 01:01:30 2014 (r265339) @@ -167,9 +167,18 @@ nfscl_reqstart(struct nfsrv_descript *nd if (nfsv4_opflag[nfsv4_opmap[procnum].op].needscfh==2){ NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OP_GETATTR); - NFSWCCATTR_ATTRBIT(&attrbits); + /* +* For Lookup Ops, we want all the directory +* attributes, so we can load the name cache. +*/ + if (procnum == NFSPROC_LOOKUP || + procnum == NFSPROC_LOOKUPP) + NFSGETATTR_ATTRBIT(&attrbits); + else { + NFSWCCATTR_ATTRBIT(&attrbits); + nd->nd_flag |= ND_V4WCCATTR; + } (void) nfsrv_putattrbit(nd, &attrbits); - nd->nd_flag |= ND_V4WCCATTR; } NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); } Modified: stable/9/sys/fs/nfsclient/nfs_clrpcops.c == --- stable/9/sys/fs/nfsclient/nfs_clrpcops.cSun May 4 23:25:32 2014 (r265338) +++ stable/9/sys/fs/nfsclient/nfs_clrpcops.cMon May 5 01:01:30 2014 (r265339) @@ -1135,14 +1135,23 @@ nfsrpc_lookup(vnode_t dvp, char *name, i } if (nd->nd_flag & ND_NFSV3) error = nfscl_postop_attr(nd, dnap, dattrflagp, stuff); + else if ((nd->nd_flag & (ND_NFSV4 | ND_NOMOREDATA)) == + ND_NFSV4) { + /* Load the directory attributes. */ + error = nfsm_loadattr(nd, dnap); + if (error == 0) + *dattrflagp = 1; + } goto nfsmout; } if ((nd->nd_flag & (ND_NFSV4 | ND_NOMOREDATA)) == ND_NFSV4) { - NFSM_DISSECT(tl, u_int32_t *, 2 * NFSX_UNSIGNED); - if (*(tl + 1)) { - nd->nd_flag |= ND_NOMOREDATA; + /* Load the directory attributes. */ + error = nfsm_loadattr(nd, dnap); + if (error != 0) goto nfsmout; - } + *dattrflagp = 1; + /* Skip over the Lookup and GetFH operation status values. */ + NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); } error = nfsm_getfh(nd, nfhpp); if (error) @@ -2566,14 +2575,6 @@ nfsrpc_readdir(vnode_t vp, struct uio *u * Joy, oh joy. For V4 we get to hand craft '.' and '..'. */ if (uiop->uio_offset == 0) { -#if defined(__FreeBSD_version) && __FreeBSD_version >= 80 - error = VOP_GETATTR(vp, &nfsva.na_vattr, cred);
svn commit: r265340 - stable/9/sys/fs/nfsclient
Author: rmacklem Date: Mon May 5 01:07:56 2014 New Revision: 265340 URL: http://svnweb.freebsd.org/changeset/base/265340 Log: MFC: r264681 Modify the NFSv4 client open/create RPC so that it acquires post-open/create directory attributes. This allows the RPC to name cache the newly created file and reduces the lookup RPC count by about 10% for software builds. Modified: stable/9/sys/fs/nfsclient/nfs_clcomsubs.c stable/9/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clcomsubs.c == --- stable/9/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 5 01:01:30 2014 (r265339) +++ stable/9/sys/fs/nfsclient/nfs_clcomsubs.c Mon May 5 01:07:56 2014 (r265340) @@ -65,7 +65,7 @@ static struct { { NFSV4OP_READLINK, 2, "Readlink", 8, }, { NFSV4OP_READ, 1, "Read", 4, }, { NFSV4OP_WRITE, 2, "Write", 5, }, - { NFSV4OP_OPEN, 3, "Open", 4, }, + { NFSV4OP_OPEN, 5, "Open", 4, }, { NFSV4OP_CREATE, 3, "Create", 6, }, { NFSV4OP_CREATE, 1, "Create", 6, }, { NFSV4OP_CREATE, 3, "Create", 6, }, Modified: stable/9/sys/fs/nfsclient/nfs_clrpcops.c == --- stable/9/sys/fs/nfsclient/nfs_clrpcops.cMon May 5 01:01:30 2014 (r265339) +++ stable/9/sys/fs/nfsclient/nfs_clrpcops.cMon May 5 01:07:56 2014 (r265340) @@ -1846,6 +1846,7 @@ nfsrpc_createv4(vnode_t dvp, char *name, nfsv4stateid_t stateid; u_int32_t rflags; + np = VTONFS(dvp); *unlockedp = 0; *nfhpp = NULL; *dpp = NULL; @@ -1879,17 +1880,22 @@ nfsrpc_createv4(vnode_t dvp, char *name, NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); *tl = txdr_unsigned(NFSV4OPEN_CLAIMNULL); (void) nfsm_strtom(nd, name, namelen); + /* Get the new file's handle and attributes. */ NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(NFSV4OP_GETFH); *tl = txdr_unsigned(NFSV4OP_GETATTR); NFSGETATTR_ATTRBIT(&attrbits); (void) nfsrv_putattrbit(nd, &attrbits); + /* Get the directory's post-op attributes. */ + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_PUTFH); + (void) nfsm_fhtom(nd, np->n_fhp->nfh_fh, np->n_fhp->nfh_len, 0); + NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_GETATTR); + (void) nfsrv_putattrbit(nd, &attrbits); error = nfscl_request(nd, dvp, p, cred, dstuff); if (error) return (error); - error = nfscl_wcc_data(nd, dvp, dnap, dattrflagp, NULL, dstuff); - if (error) - goto nfsmout; NFSCL_INCRSEQID(owp->nfsow_seqid, nd); if (nd->nd_repstat == 0) { NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID + @@ -1961,6 +1967,13 @@ nfsrpc_createv4(vnode_t dvp, char *name, error = nfscl_mtofh(nd, nfhpp, nnap, attrflagp); if (error) goto nfsmout; + /* Get rid of the PutFH and Getattr status values. */ + NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); + /* Load the directory attributes. */ + error = nfsm_loadattr(nd, dnap); + if (error) + goto nfsmout; + *dattrflagp = 1; if (dp != NULL && *attrflagp) { dp->nfsdl_change = nnap->na_filerev; dp->nfsdl_modtime = nnap->na_mtime; @@ -2004,7 +2017,6 @@ nfsrpc_createv4(vnode_t dvp, char *name, if ((rflags & NFSV4OPEN_RESULTCONFIRM) && (owp->nfsow_clp->nfsc_flags & NFSCLFLAGS_GOTDELEG) && !error && dp == NULL) { - np = VTONFS(dvp); do { ret = nfsrpc_openrpc(VFSTONFS(vnode_mount(dvp)), dvp, np->n_fhp->nfh_fh, np->n_fhp->nfh_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: r265215 - in head/sys: amd64/conf boot/forth conf i386/conf pc98/conf sys
On Fri, May 02, 2014 at 07:14:22AM +, Eitan Adler wrote: E> Author: eadler E> Date: Fri May 2 07:14:22 2014 E> New Revision: 265215 E> URL: http://svnweb.freebsd.org/changeset/base/265215 E> E> Log: E> lindev(4): finish the partial commit in r265212 E> E> lindev(4) was only used to provide /dev/full which is now a standard feature of E> FreeBSD. /dev/full was never linux-specific and provides a generally useful E> feature. E> E> Document this in UPDATING and bump __FreeBSD_version. This will be documented E> in the PH shortly. E> E> Reported by: jkim E> E> Modified: E> head/sys/amd64/conf/NOTES E> head/sys/boot/forth/loader.conf E> head/sys/conf/files.amd64 E> head/sys/conf/files.i386 E> head/sys/i386/conf/NOTES E> head/sys/pc98/conf/NOTES E> head/sys/sys/param.h ObsoletedFiles.inc should also be modified. -- Totus tuus, Glebius. ___ 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: r265341 - stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace
Author: markj Date: Mon May 5 01:26:28 2014 New Revision: 265341 URL: http://svnweb.freebsd.org/changeset/base/265341 Log: MFC r262661: Fix emulation of call and jmp instructions on i386 and for 32-bit processes on amd64. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Directory Properties: stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon May 5 01:07:56 2014(r265340) +++ stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon May 5 01:26:28 2014(r265341) @@ -1429,10 +1429,7 @@ fasttrap_pid_probe(struct reg *rp) if (tp->ftt_code == 0) { new_pc = tp->ftt_dest; } else { -#ifdef __amd64 - uintptr_t value; -#endif - uintptr_t addr = tp->ftt_dest; + uintptr_t value, addr = tp->ftt_dest; if (tp->ftt_base != FASTTRAP_NOREG) addr += fasttrap_getreg(rp, tp->ftt_base); @@ -1456,6 +1453,7 @@ fasttrap_pid_probe(struct reg *rp) #ifdef __amd64 if (p->p_model == DATAMODEL_NATIVE) { +#endif if ((value = fasttrap_fulword((void *)addr)) == -1) { fasttrap_sigsegv(p, curthread, @@ -1464,9 +1462,8 @@ fasttrap_pid_probe(struct reg *rp) break; } new_pc = value; +#ifdef __amd64 } else { -#endif -#ifdef __i386__ uint32_t value32; addr = (uintptr_t)(uint32_t)addr; if ((value32 = fasttrap_fuword32((void *)addr)) @@ -1477,13 +1474,11 @@ fasttrap_pid_probe(struct reg *rp) break; } new_pc = value32; -#endif } -#ifdef __amd64 +#endif } else { new_pc = addr; } -#endif } /* @@ -1502,11 +1497,9 @@ fasttrap_pid_probe(struct reg *rp) ret = fasttrap_sulword((void *)addr, pcps); } else { #endif -#ifdef __i386__ addr = rp->r_rsp - sizeof (uint32_t); pcps = (uint32_t)(pc + tp->ftt_size); ret = fasttrap_suword32((void *)addr, pcps); -#endif #ifdef __amd64 } #endif ___ 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: r265342 - stable/10/share/man/man5
Author: gjb Date: Mon May 5 01:29:20 2014 New Revision: 265342 URL: http://svnweb.freebsd.org/changeset/base/265342 Log: MRC r265230: Clarify that MAKEOBJDIRPREFIX and MAKEOBJDIR are not honored as make(1) arguments. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man5/make.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/make.conf.5 == --- stable/10/share/man/man5/make.conf.5Mon May 5 01:26:28 2014 (r265341) +++ stable/10/share/man/man5/make.conf.5Mon May 5 01:29:20 2014 (r265342) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 28, 2013 +.Dd May 2, 2014 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -689,6 +689,8 @@ and .Ev MAKEOBJDIR are environment variables and should not be set in .Nm +or as command line arguments to +.Xr make 1 , but in make's environment. .Sh BUGS This manual page may occasionally be out of date with respect to ___ 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: r265343 - stable/9/share/man/man5
Author: gjb Date: Mon May 5 01:29:33 2014 New Revision: 265343 URL: http://svnweb.freebsd.org/changeset/base/265343 Log: MRC r265230: Clarify that MAKEOBJDIRPREFIX and MAKEOBJDIR are not honored as make(1) arguments. Sponsored by: The FreeBSD Foundation Modified: stable/9/share/man/man5/make.conf.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/make.conf.5 == --- stable/9/share/man/man5/make.conf.5 Mon May 5 01:29:20 2014 (r265342) +++ stable/9/share/man/man5/make.conf.5 Mon May 5 01:29:33 2014 (r265343) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 28, 2013 +.Dd May 2, 2014 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -689,6 +689,8 @@ and .Ev MAKEOBJDIR are environment variables and should not be set in .Nm +or as command line arguments to +.Xr make 1 , but in make's environment. .Sh BUGS This manual page may occasionally be out of date with respect to ___ 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: r265344 - head
Author: eadler Date: Mon May 5 01:47:05 2014 New Revision: 265344 URL: http://svnweb.freebsd.org/changeset/base/265344 Log: lindev(4): add to ObsoleteFiles - add man page - past removals did not add the .ko so don't add it this time either Reported by: gleb Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Mon May 5 01:29:33 2014(r265343) +++ head/ObsoleteFiles.inc Mon May 5 01:47:05 2014(r265344) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20140502: Removal of lindev(4) +OLD_FILES+=usr/share/man/man4/lindev.4.gz # 20140314: AppleTalk OLD_DIRS+=usr/include/netatalk OLD_FILES+=usr/include/netatalk/aarp.h @@ -49,7 +51,6 @@ OLD_FILES+=usr/include/netatalk/ddp_pcb. OLD_FILES+=usr/include/netatalk/ddp_var.h OLD_FILES+=usr/include/netatalk/endian.h OLD_FILES+=usr/include/netatalk/phase2.h - # 20140314: Remove IPX/SPX OLD_LIBS+=lib/libipx.so.5 OLD_FILES+=usr/include/netipx/ipx.h ___ 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: r265345 - in stable/10: share/man/man4 sys/dev/usb sys/dev/usb/wlan
Author: kevlo Date: Mon May 5 01:50:01 2014 New Revision: 265345 URL: http://svnweb.freebsd.org/changeset/base/265345 Log: MFC r264317, r264864: - Add the Asus USB-N10 NANO [1] - Fix panic by adding mtx_assert() to urtwn_init_locked() and urtwn_stop_locked() [2] Tested by:Kuan-Chung Chiu [1] Anthony Jenkins [2] Modified: stable/10/share/man/man4/urtwn.4 stable/10/sys/dev/usb/usbdevs stable/10/sys/dev/usb/wlan/if_urtwn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/urtwn.4 == --- stable/10/share/man/man4/urtwn.4Mon May 5 01:47:05 2014 (r265344) +++ stable/10/share/man/man4/urtwn.4Mon May 5 01:50:01 2014 (r265345) @@ -61,6 +61,7 @@ It operates in the 2GHz spectrum only. The following adapters should work: .Pp .Bl -tag -width Ds -offset indent -compact +.It ASUS USB-N10 NANO .It Belkin F7D1102 Surf Wireless Micro .It D-Link DWA-131 .It Edimax EW-7811Un Modified: stable/10/sys/dev/usb/usbdevs == --- stable/10/sys/dev/usb/usbdevs Mon May 5 01:47:05 2014 (r265344) +++ stable/10/sys/dev/usb/usbdevs Mon May 5 01:50:01 2014 (r265345) @@ -1186,6 +1186,7 @@ product ASUS RT3070_1 0x1790 RT3070 product ASUS USBN100x1786 USB-N10 product ASUS RTL8192CU 0x17ab RTL8192CU product ASUS USBN660x17ad USB-N66 +product ASUS USBN10NANO0x17ba USB-N10 Nano product ASUS RTL8192SU 0x1791 RTL8192SU product ASUS A730W 0x4202 ASUS MyPal A730W product ASUS P535 0x420f ASUS P535 PDA Modified: stable/10/sys/dev/usb/wlan/if_urtwn.c == --- stable/10/sys/dev/usb/wlan/if_urtwn.c Mon May 5 01:47:05 2014 (r265344) +++ stable/10/sys/dev/usb/wlan/if_urtwn.c Mon May 5 01:50:01 2014 (r265345) @@ -91,6 +91,7 @@ static const STRUCT_USB_HOST_ID urtwn_de URTWN_DEV(ABOCOM, RTL8188CU_2), URTWN_DEV(ABOCOM, RTL8192CU), URTWN_DEV(ASUS, RTL8192CU), + URTWN_DEV(ASUS, USBN10NANO), URTWN_DEV(AZUREWAVE,RTL8188CE_1), URTWN_DEV(AZUREWAVE,RTL8188CE_2), URTWN_DEV(AZUREWAVE,RTL8188CU), @@ -2051,6 +2052,7 @@ urtwn_load_firmware(struct urtwn_softc * uint32_t reg; int mlen, ntries, page, error; + URTWN_UNLOCK(sc); /* Read firmware image from the filesystem. */ if ((sc->chip & (URTWN_CHIP_UMC_A_CUT | URTWN_CHIP_92C)) == URTWN_CHIP_UMC_A_CUT) @@ -2059,6 +2061,7 @@ urtwn_load_firmware(struct urtwn_softc * imagename = "urtwn-rtl8192cfwT"; fw = firmware_get(imagename); + URTWN_LOCK(sc); if (fw == NULL) { device_printf(sc->sc_dev, "failed loadfirmware of file %s\n", imagename); @@ -2813,6 +2816,8 @@ urtwn_init_locked(void *arg) uint32_t reg; int error; + URTWN_ASSERT_LOCKED(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) urtwn_stop_locked(ifp); @@ -2976,6 +2981,8 @@ urtwn_stop_locked(struct ifnet *ifp) { struct urtwn_softc *sc = ifp->if_softc; + URTWN_ASSERT_LOCKED(sc); + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); callout_stop(&sc->sc_watchdog_ch); ___ 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: r265346 - stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace
Author: markj Date: Mon May 5 03:15:53 2014 New Revision: 265346 URL: http://svnweb.freebsd.org/changeset/base/265346 Log: MFC r262661: Fix emulation of call and jmp instructions on i386 and for 32-bit processes on amd64. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c == --- stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon May 5 01:50:01 2014(r265345) +++ stable/10/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Mon May 5 03:15:53 2014(r265346) @@ -1429,10 +1429,7 @@ fasttrap_pid_probe(struct reg *rp) if (tp->ftt_code == 0) { new_pc = tp->ftt_dest; } else { -#ifdef __amd64 - uintptr_t value; -#endif - uintptr_t addr = tp->ftt_dest; + uintptr_t value, addr = tp->ftt_dest; if (tp->ftt_base != FASTTRAP_NOREG) addr += fasttrap_getreg(rp, tp->ftt_base); @@ -1456,6 +1453,7 @@ fasttrap_pid_probe(struct reg *rp) #ifdef __amd64 if (p->p_model == DATAMODEL_NATIVE) { +#endif if ((value = fasttrap_fulword((void *)addr)) == -1) { fasttrap_sigsegv(p, curthread, @@ -1464,9 +1462,8 @@ fasttrap_pid_probe(struct reg *rp) break; } new_pc = value; +#ifdef __amd64 } else { -#endif -#ifdef __i386__ uint32_t value32; addr = (uintptr_t)(uint32_t)addr; if ((value32 = fasttrap_fuword32((void *)addr)) @@ -1477,13 +1474,11 @@ fasttrap_pid_probe(struct reg *rp) break; } new_pc = value32; -#endif } -#ifdef __amd64 +#endif } else { new_pc = addr; } -#endif } /* @@ -1502,11 +1497,9 @@ fasttrap_pid_probe(struct reg *rp) ret = fasttrap_sulword((void *)addr, pcps); } else { #endif -#ifdef __i386__ addr = rp->r_rsp - sizeof (uint32_t); pcps = (uint32_t)(pc + tp->ftt_size); ret = fasttrap_suword32((void *)addr, pcps); -#endif #ifdef __amd64 } #endif ___ 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"