svn commit: r359231 - head/sys/mips/nlm

2020-03-22 Thread Alex Richardson
Author: arichardson
Date: Sun Mar 22 22:18:06 2020
New Revision: 359231
URL: https://svnweb.freebsd.org/changeset/base/359231

Log:
  Use a GCC-compatile compiler flag in files.xlp
  
  Seems like GCC doesn't like -Qunused-arguments, so use
  -Wno-unused-command-line-argument, which is supported by both GCC and Clang.

Modified:
  head/sys/mips/nlm/files.xlp

Modified: head/sys/mips/nlm/files.xlp
==
--- head/sys/mips/nlm/files.xlp Sun Mar 22 22:18:00 2020(r359230)
+++ head/sys/mips/nlm/files.xlp Sun Mar 22 22:18:06 2020(r359231)
@@ -23,7 +23,7 @@ mips/nlm/dev/net/sgmii.c  optional xlpge
 mips/nlm/dev/net/xaui.coptional xlpge
 mips/nlm/dev/net/xlpge.c   optional xlpge
 ucore_app.bin  optional xlpge  \
-   compile-with"${CC} -EB -march=mips32 -mabi=32 -msoft-float -I. -I$S 
-O3 -funroll-loops -fomit-frame-pointer -Qunused-arguments -mno-branch-likely 
-fno-pic -mno-abicalls -ffunction-sections -fdata-sections -G0 -Wall -Werror -c 
$S/$M/nlm/dev/net/ucore/crt0_basic.S  $S/$M/nlm/dev/net/ucore/ucore_app.c && 
${LD} -melf32btsmip_fbsd -d -warn-common -T$S/$M/nlm/dev/net/ucore/ld.ucore.S 
crt0_basic.o ucore_app.o -o ucore_app && ${OBJCOPY} -S -O binary -R .note -R 
.comment ucore_app ${.TARGET}" \
+   compile-with"${CC} -EB -march=mips32 -mabi=32 -msoft-float -I. -I$S 
-O3 -funroll-loops -fomit-frame-pointer -Wno-unused-command-line-argument 
-mno-branch-likely -fno-pic -mno-abicalls -ffunction-sections -fdata-sections 
-G0 -Wall -Werror -c $S/$M/nlm/dev/net/ucore/crt0_basic.S  
$S/$M/nlm/dev/net/ucore/ucore_app.c && ${LD} -melf32btsmip_fbsd -d -warn-common 
-T$S/$M/nlm/dev/net/ucore/ld.ucore.S crt0_basic.o ucore_app.o -o ucore_app && 
${OBJCOPY} -S -O binary -R .note -R .comment ucore_app ${.TARGET}" \
no-obj no-implicit-rule before-depend   \
clean   "crt0_basic.o ucore_app.o ucore_app ucore_app.bin"
 ucore_app_bin.hoptional xlpge  \
___
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: r359230 - head/sys/conf

2020-03-22 Thread Alex Richardson
Author: arichardson
Date: Sun Mar 22 22:18:00 2020
New Revision: 359230
URL: https://svnweb.freebsd.org/changeset/base/359230

Log:
  Fix linking OCTEON1 kernel with LLD
  
  LLD complains that the type of .dynamic was changed. Fix this by copying
  the approach used in the mips64 ldscript.
  I do not have hardware to test this change so I only verified that the
  kernel links and the section layout looks sensible.
  
  Reviewed By:  imp, emaste
  Differential Revision: https://reviews.freebsd.org/D24093

Modified:
  head/sys/conf/ldscript.mips.octeon1

Modified: head/sys/conf/ldscript.mips.octeon1
==
--- head/sys/conf/ldscript.mips.octeon1 Sun Mar 22 21:51:50 2020
(r359229)
+++ head/sys/conf/ldscript.mips.octeon1 Sun Mar 22 22:18:00 2020
(r359230)
@@ -10,8 +10,7 @@ SECTIONS {
. = KERNLOADADDR + SIZEOF_HEADERS;
 
.text : {
-   *(.text)
-   *(.dynamic)
+   *(.text)
etext = .;
_etext = .;
. = ALIGN(0x2000);
@@ -35,8 +34,10 @@ SECTIONS {
*(.data)
. = ALIGN(32);
}
-
-   _gp = (. + 0x8000);
+   .plt : { *(.plt) }
+   _gp = ALIGN(16) + 0x7ff0;
+   .got : { *(.got.plt) *(.got) }
+   .dynamic : { *(.dynamic) }
 
.sdata : {
 _small_start = .;
___
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: r359229 - head/usr.bin/tail

2020-03-22 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Sun Mar 22 21:51:50 2020
New Revision: 359229
URL: https://svnweb.freebsd.org/changeset/base/359229

Log:
  Use -F instead of -f in tail(1) examples
  
  There is an example in tail(1) manual page explaining how to use tail(1) to
  track the contents of /var/log/messages. The example uses the -f flag to
  follow the file. The problem with the -f flag is that it cannot handle the
  situation where /var/log/messages is rotated. Hence, use -F instead in the
  example.
  
  Reviewed by:  asomers
  MFC after:3 days
  Differential Revision:https://reviews.freebsd.org/D24157

Modified:
  head/usr.bin/tail/tail.1

Modified: head/usr.bin/tail/tail.1
==
--- head/usr.bin/tail/tail.1Sun Mar 22 21:41:32 2020(r359228)
+++ head/usr.bin/tail/tail.1Sun Mar 22 21:51:50 2020(r359229)
@@ -31,7 +31,7 @@
 .\"@(#)tail.1  8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd April 10, 2018
+.Dd March 22, 2020
 .Dt TAIL 1
 .Os
 .Sh NAME
@@ -157,7 +157,7 @@ Keep
 .Pa /var/log/messages
 open, displaying to the standard output anything appended to the file:
 .Pp
-.Dl $ tail -f /var/log/messages
+.Dl $ tail -F /var/log/messages
 .Sh SEE ALSO
 .Xr cat 1 ,
 .Xr head 1 ,
___
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: r359228 - in head/share: syscons/keymaps vt/keymaps

2020-03-22 Thread Carlo Strub
Author: cs (ports committer)
Date: Sun Mar 22 21:41:32 2020
New Revision: 359228
URL: https://svnweb.freebsd.org/changeset/base/359228

Log:
  - sort according to scan code
  - adapt some alt and alt shift keys to other standard keyboards
  - fix ctrl-d to issue eot
  
  Approved by:  philip (implicit)

Modified:
  head/share/syscons/keymaps/colemak-dh.iso15.acc.kbd
  head/share/vt/keymaps/colemak-dh.acc.kbd

Modified: head/share/syscons/keymaps/colemak-dh.iso15.acc.kbd
==
--- head/share/syscons/keymaps/colemak-dh.iso15.acc.kbd Sun Mar 22 20:10:05 
2020(r359227)
+++ head/share/syscons/keymaps/colemak-dh.iso15.acc.kbd Sun Mar 22 21:41:32 
2020(r359228)
@@ -9,8 +9,8 @@
 # scan   cntrl  altalt   cntrl lock
 # code  base   shift  cntrl  shift  altshift  cntrl  shift state
 # --
-
-  041   '`''~'nopnopdtil   '~'nopnop O
+  000   nopnopnopnopnopnopnopnop O
+  001   escescescescescescdebug  debug   O
   002   '1''!'nopnop'¡''¹'nopnop O
   003   '2''@'nulnul'º''²'nulnul O
   004   '3''#'nopnop'ª''³'nopnop O
@@ -23,7 +23,8 @@
   011   '0'')'nopnop'~''~'nopnop O
   012   '-''_'us us '~''~'us us  O
   013   '=''+'nopnop'×''÷'nopnop O
-
+  014   bs bs deldelbs bs deldel O
+  015   ht btab   nscr   nscr   ht btab   nopnop O
   016   'q''Q'dc1dc1'ä''Ä'dc1dc1 C
   017   'w''W'etbetb'å''Å'etbetb C
   018   'f''F'ackack'ã''Ã'ackack C
@@ -36,8 +37,8 @@
   025   ';'':'nopnop'ö''Ö'nopnop O
   026   '[''{'escesc'«''~'escesc O
   027   ']''}'gs gs '»''~'gs gs  O
-  043   '\''|'fs fs '~''~'fs fs  O
-
+  028   cr cr nl nl cr cr nl nl  O
+  029   lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl   O
   030   'a''A'sohsoh'á''Á'sohsoh C
   031   'r''R'dc2dc2dgra   '~'dc2dc2 C
   032   's''S'dc3dc3'ß''~'dc3dc3 C
@@ -49,32 +50,24 @@
   038   'i''I'ht ht 'í''Í'ht ht  C
   039   'o''O'si si 'ó''Ó'si si  C
   040   ''''"'nopnop'õ''Õ'nopnop O
-
+  041   '`''~'nopnopdtil   '~'nopnop O
+  042   lshift lshift lshift lshift lshift lshift lshift lshift  O
+  043   '\''|'fs fs '~''~'fs fs  O
   044   'z''Z'subsub'æ''Æ'subsub C
   045   'x''X'cancandcir   '~'cancan C
   046   'c''C'etxetx'ç''Ç'etxetx C
-  047   'd''D'synsyn'½''¼'synsyn C
+  047   'd''D'eoteot'½''¼'synsyn C
   048   'v''V'stxstx'~''~'stxstx C
   049   'm''M'vt vt drin   '~'vt vt  C
   050   'h''H'cr cr '~''~'cr cr  C
   051   ',''<'nopnopdced   '~'nopnop O
   052   '.''>'nopnop'~''~'nopnop O
   053   '/''?'nopnop'¿''~'nopnop O
-
-  058   bs bs bs bs bs bs bs bs  O
-  086   '-''_'us us '~''~'us us  O
-  057   ' '' 'nulnul' '' 'susp   suspO
-
-  000   nopnopnopnopnopnopnopnop O
-  001   escescescescescescdebug  debug   O
-  014   bs bs deldelbs bs deldel O
-  015   ht btab   nscr   nscr   ht btab   nopnop O
-  028   cr cr nl nl cr cr nl nl  O
-  029   lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl   O
-  042   lshift lshift lshift lshift lshift lshift lshift lshift  O
   054   rshift rshift rshift rshift rshift rshift rshift rshift  O
   055   '*''*''*''*''*''*''*''*' O
   056   lalt   lalt   lalt   lalt   lalt   lalt   lalt   laltO
+  057   ' '' 'nulnul' '' 'susp   suspO
+  058   bs bs bs bs bs bs bs bs  O
   059   fkey01 fkey13 fkey25 fkey37 scr01  scr11  scr01  scr11   O
   060   fkey02 fkey14 fkey26 fkey38 scr02  scr12  scr02  scr12   O
   061   fkey03 fkey15 fkey27 fkey39 scr03  scr13  scr03  scr13   O
@@ -102,6 

svn commit: r359227 - head/lib/libc/gen

2020-03-22 Thread Sergio Carlavilla Delgado
Author: carlavilla (doc committer)
Date: Sun Mar 22 20:10:05 2020
New Revision: 359227
URL: https://svnweb.freebsd.org/changeset/base/359227

Log:
  fix typo in exec man page
  
  PR:   240258
  Submitted by: gbergl...@gmail.com
  Reported by:  kib@
  Approved by:  bcr@(mentor, implicit)
  MFC after:2 days
  Differential Revision:https://reviews.freebsd.org/D24145

Modified:
  head/lib/libc/gen/exec.3

Modified: head/lib/libc/gen/exec.3
==
--- head/lib/libc/gen/exec.3Sun Mar 22 20:00:12 2020(r359226)
+++ head/lib/libc/gen/exec.3Sun Mar 22 20:10:05 2020(r359227)
@@ -314,7 +314,7 @@ conform to
 The
 .Fn exec
 function appeared in
-.At v1.
+.At v1 .
 The
 .Fn execvP
 function first appeared in
___
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: r359219 - head/sys/kern

2020-03-22 Thread Rick Macklem
Author: rmacklem
Date: Sun Mar 22 18:18:30 2020
New Revision: 359219
URL: https://svnweb.freebsd.org/changeset/base/359219

Log:
  Fix an NFS mount attempt where VFS_STATFS() fails.
  
  r353150 added mnt_rootvnode and this seems to have broken NFS mounts when the
  VFS_STATFS() called just after VFS_MOUNT() returns an error.
  Then the code calls VFS_UNMOUNT(), which calls vflush(), which returns EBUSY.
  Then the thread get stuck sleeping on "mntref" in vfs_mount_destroy().
  This patch fixes this problem.
  
  Reviewed by:  kib, mjg
  Differential Revision:https://reviews.freebsd.org/D24022

Modified:
  head/sys/kern/vfs_mount.c

Modified: head/sys/kern/vfs_mount.c
==
--- head/sys/kern/vfs_mount.c   Sun Mar 22 17:59:36 2020(r359218)
+++ head/sys/kern/vfs_mount.c   Sun Mar 22 18:18:30 2020(r359219)
@@ -900,7 +900,7 @@ vfs_domount_first(
 {
struct vattr va;
struct mount *mp;
-   struct vnode *newdp;
+   struct vnode *newdp, *rootvp;
int error, error1;
 
ASSERT_VOP_ELOCKED(vp, __func__);
@@ -967,6 +967,9 @@ vfs_domount_first(
(error1 = VFS_ROOT(mp, LK_EXCLUSIVE, &newdp)) != 0) {
if (error1 != 0) {
error = error1;
+   rootvp = vfs_cache_root_clear(mp);
+   if (rootvp != NULL)
+   vrele(rootvp);
if ((error1 = VFS_UNMOUNT(mp, 0)) != 0)
printf("VFS_UNMOUNT returned %d\n", error1);
}
___
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: r359218 - head/sys/riscv/riscv

2020-03-22 Thread Mitchell Horne
Author: mhorne
Date: Sun Mar 22 17:59:36 2020
New Revision: 359218
URL: https://svnweb.freebsd.org/changeset/base/359218

Log:
  Fix ordering of machine includes
  
  Remove machine/asm.h since it is unused.

Modified:
  head/sys/riscv/riscv/machdep.c

Modified: head/sys/riscv/riscv/machdep.c
==
--- head/sys/riscv/riscv/machdep.c  Sun Mar 22 17:13:19 2020
(r359217)
+++ head/sys/riscv/riscv/machdep.c  Sun Mar 22 17:59:36 2020
(r359218)
@@ -77,18 +77,16 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
-#include 
-#include 
-
-#include 
 
 #ifdef FPE
 #include 
___
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: r359217 - stable/12/sys/cddl/compat/opensolaris/sys

2020-03-22 Thread Ryan Moeller
Author: freqlabs
Date: Sun Mar 22 17:13:19 2020
New Revision: 359217
URL: https://svnweb.freebsd.org/changeset/base/359217

Log:
  MFC r358971:
  
  TODO DONE: Use sx_xholder in SPL rwlock.h
  
  Approved by:  mav (mentor)
  Sponsored by: iXsystems, Inc.

Modified:
  stable/12/sys/cddl/compat/opensolaris/sys/rwlock.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/cddl/compat/opensolaris/sys/rwlock.h
==
--- stable/12/sys/cddl/compat/opensolaris/sys/rwlock.h  Sun Mar 22 16:55:20 
2020(r359216)
+++ stable/12/sys/cddl/compat/opensolaris/sys/rwlock.h  Sun Mar 22 17:13:19 
2020(r359217)
@@ -87,8 +87,7 @@ typedef   struct sx   krwlock_t;
 #definerw_write_held(lock) sx_xlocked(lock)
 #definerw_lock_held(lock)  (rw_read_held(lock) || 
rw_write_held(lock))
 #definerw_iswriter(lock)   sx_xlocked(lock)
-/* TODO: Change to sx_xholder() once it is moved from kern_sx.c to sx.h. */
-#definerw_owner(lock)  ((lock)->sx_lock & SX_LOCK_SHARED ? 
NULL : (struct thread *)SX_OWNER((lock)->sx_lock))
+#definerw_owner(lock)  sx_xholder(lock)
 
 #endif /* defined(_KERNEL) */
 
___
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: r359216 - head/etc/mtree

2020-03-22 Thread Ed Maste
Author: emaste
Date: Sun Mar 22 16:55:20 2020
New Revision: 359216
URL: https://svnweb.freebsd.org/changeset/base/359216

Log:
  BSD.sendmail.dist: simplify mqueue group name setting
  
  Submitted by: gshapiro

Modified:
  head/etc/mtree/BSD.sendmail.dist

Modified: head/etc/mtree/BSD.sendmail.dist
==
--- head/etc/mtree/BSD.sendmail.distSun Mar 22 15:37:38 2020
(r359215)
+++ head/etc/mtree/BSD.sendmail.distSun Mar 22 16:55:20 2020
(r359216)
@@ -9,8 +9,7 @@
 spool   nochange tags=package=runtime
 clientmqueueuname=smmsp gname=smmsp mode=0770 
tags=package=sendmail
 ..
-/set gname=daemon
-mqueue  tags=package=sendmail
+mqueue  gname=daemon tags=package=sendmail
 ..
 ..
 ..
___
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: r359215 - head/etc/mtree

2020-03-22 Thread Ed Maste
Author: emaste
Date: Sun Mar 22 15:37:38 2020
New Revision: 359215
URL: https://svnweb.freebsd.org/changeset/base/359215

Log:
  pkgbase: create sendmail directories only from BSD.sendmail.dist
  
  Else when WITHOUT_SENDMAIL is set we still create a sendmail package
  that contains (only) two directories.
  
  Reviewed by:  manu
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D24149

Modified:
  head/etc/mtree/BSD.sendmail.dist
  head/etc/mtree/BSD.var.dist

Modified: head/etc/mtree/BSD.sendmail.dist
==
--- head/etc/mtree/BSD.sendmail.distSun Mar 22 15:24:25 2020
(r359214)
+++ head/etc/mtree/BSD.sendmail.distSun Mar 22 15:37:38 2020
(r359215)
@@ -7,7 +7,10 @@
 .   nochange
 var nochange
 spool   nochange tags=package=runtime
-clientmqueueuname=smmsp gname=smmsp mode=0770
+clientmqueueuname=smmsp gname=smmsp mode=0770 
tags=package=sendmail
+..
+/set gname=daemon
+mqueue  tags=package=sendmail
 ..
 ..
 ..

Modified: head/etc/mtree/BSD.var.dist
==
--- head/etc/mtree/BSD.var.dist Sun Mar 22 15:24:25 2020(r359214)
+++ head/etc/mtree/BSD.var.dist Sun Mar 22 15:37:38 2020(r359215)
@@ -84,16 +84,12 @@
 rwhogname=daemon mode=0775
 ..
 spool
-clientmqueueuname=smmsp gname=smmsp mode=0770 tags=package=sendmail
-..
 dma uname=root gname=mail mode=0770 tags=package=dma
 ..
 lockuname=uucp gname=dialer mode=0775
 ..
 /set gname=daemon
 lpd
-..
-mqueue  tags=package=sendmail
 ..
 opielocks   mode=0700
 ..
___
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: r359214 - in stable/12: sys/fs/fuse tests/sys/fs/fusefs

2020-03-22 Thread Alan Somers
Author: asomers
Date: Sun Mar 22 15:24:25 2020
New Revision: 359214
URL: https://svnweb.freebsd.org/changeset/base/359214

Log:
  MFC r358867:
  
  fusefs: avoid cache corruption with buggy fuse servers
  
  The FUSE protocol allows the client (kernel) to cache a file's size, if the
  server (userspace daemon) allows it. A well-behaved daemon obviously should
  not change a file's size while a client has it cached. But a buggy daemon
  might. If the kernel ever detects that that has happened, then it should
  invalidate the entire cache for that file. Previously, we would not only
  cache stale data, but in the case of a file extension while we had the size
  cached, we accidentally extended the cache with zeros.
  
  PR:   244178
  Reported by:  Ben RUBSON 
  Reviewed by:  cem
  Differential Revision:https://reviews.freebsd.org/D24012

Added:
  stable/12/tests/sys/fs/fusefs/cache.cc
 - copied unchanged from r358867, head/tests/sys/fs/fusefs/cache.cc
Modified:
  stable/12/sys/fs/fuse/fuse_internal.c
  stable/12/sys/fs/fuse/fuse_node.c
  stable/12/sys/fs/fuse/fuse_node.h
  stable/12/sys/fs/fuse/fuse_vnops.c
  stable/12/tests/sys/fs/fusefs/Makefile
  stable/12/tests/sys/fs/fusefs/getattr.cc
  stable/12/tests/sys/fs/fusefs/io.cc
  stable/12/tests/sys/fs/fusefs/utils.cc
  stable/12/tests/sys/fs/fusefs/utils.hh
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/fs/fuse/fuse_internal.c
==
--- stable/12/sys/fs/fuse/fuse_internal.c   Sun Mar 22 15:16:59 2020
(r359213)
+++ stable/12/sys/fs/fuse/fuse_internal.c   Sun Mar 22 15:24:25 2020
(r359214)
@@ -857,6 +857,9 @@ fuse_internal_forget_send(struct mount *mp,
fdisp_destroy(&fdi);
 }
 
+SDT_PROBE_DEFINE2(fusefs, , internal, getattr_cache_incoherent,
+   "struct vnode*", "struct fuse_attr_out*");
+
 /* Fetch the vnode's attributes from the daemon*/
 int
 fuse_internal_do_getattr(struct vnode *vp, struct vattr *vap,
@@ -898,6 +901,24 @@ fuse_internal_do_getattr(struct vnode *vp, struct vatt
if (fvdat->flag & FN_MTIMECHANGE) {
fao->attr.mtime = old_mtime.tv_sec;
fao->attr.mtimensec = old_mtime.tv_nsec;
+   }
+   if (vnode_isreg(vp) &&
+   fvdat->cached_attrs.va_size != VNOVAL &&
+   fao->attr.size != fvdat->cached_attrs.va_size) {
+   /*
+* The server changed the file's size even though we had it
+* cached!  That's a server bug.
+*/
+   SDT_PROBE2(fusefs, , internal, getattr_cache_incoherent, vp,
+   fao);
+   printf("%s: cache incoherent on %s!  "
+   "Buggy FUSE server detected.  To prevent data corruption, "
+   "disable the data cache by mounting with -o direct_io, or "
+   "as directed otherwise by your FUSE server's "
+   "documentation\n", __func__,
+   vnode_mount(vp)->mnt_stat.f_mntonname);
+   int iosize = fuse_iosize(vp);
+   v_inval_buf_range(vp, 0, INT64_MAX, iosize);
}
fuse_internal_cache_attrs(vp, &fao->attr, fao->attr_valid,
fao->attr_valid_nsec, vap);

Modified: stable/12/sys/fs/fuse/fuse_node.c
==
--- stable/12/sys/fs/fuse/fuse_node.c   Sun Mar 22 15:16:59 2020
(r359213)
+++ stable/12/sys/fs/fuse/fuse_node.c   Sun Mar 22 15:24:25 2020
(r359214)
@@ -449,7 +449,8 @@ fuse_vnode_size(struct vnode *vp, off_t *filesize, str
int error = 0;
 
if (!(fvdat->flag & FN_SIZECHANGE) &&
-   (VTOVA(vp) == NULL || fvdat->cached_attrs.va_size == VNOVAL)) 
+   (!fuse_vnode_attr_cache_valid(vp) ||
+ fvdat->cached_attrs.va_size == VNOVAL)) 
error = fuse_internal_do_getattr(vp, NULL, cred, td);
 
if (!error)

Modified: stable/12/sys/fs/fuse/fuse_node.h
==
--- stable/12/sys/fs/fuse/fuse_node.h   Sun Mar 22 15:16:59 2020
(r359213)
+++ stable/12/sys/fs/fuse/fuse_node.h   Sun Mar 22 15:24:25 2020
(r359214)
@@ -134,13 +134,19 @@ struct fuse_fid {
 #define VTOFUD(vp) \
((struct fuse_vnode_data *)((vp)->v_data))
 #define VTOI(vp)(VTOFUD(vp)->nid)
-static inline struct vattr*
-VTOVA(struct vnode *vp)
+static inline bool
+fuse_vnode_attr_cache_valid(struct vnode *vp)
 {
struct bintime now;
 
getbinuptime(&now);
-   if (bintime_cmp(&(VTOFUD(vp)->attr_cache_timeout), &now, >))
+   return (bintime_cmp(&(VTOFUD(vp)->attr_cache_timeout), &now, >));
+}
+
+static inline struct vattr*
+VTOVA(struct vnode *vp)
+{
+   if (fuse_vnode_attr_cache_valid(vp))
return &(VTOFUD(vp)->cached_attrs);
else
return NU

svn commit: r359213 - in stable/12: sys/fs/fuse tests/sys/fs/fusefs

2020-03-22 Thread Alan Somers
Author: asomers
Date: Sun Mar 22 15:16:59 2020
New Revision: 359213
URL: https://svnweb.freebsd.org/changeset/base/359213

Log:
  MFC r358798:
  
  fusefs: fix fsync for files with multiple open handles
  
  We were reusing a structure for multiple operations, but failing to
  reinitialize one member.  The result is that a server that cares about FUSE
  file handle IDs would see one correct FUSE_FSYNC operation, and one with the
  FHID unset.
  
  PR:   244431
  Reported by:  Agata 

Modified:
  stable/12/sys/fs/fuse/fuse_internal.c
  stable/12/tests/sys/fs/fusefs/fsync.cc
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/fs/fuse/fuse_internal.c
==
--- stable/12/sys/fs/fuse/fuse_internal.c   Sun Mar 22 15:03:09 2020
(r359212)
+++ stable/12/sys/fs/fuse/fuse_internal.c   Sun Mar 22 15:16:59 2020
(r359213)
@@ -345,6 +345,7 @@ fuse_internal_fsync(struct vnode *vp,
 * which file handle the caller is really referring to.
 */
LIST_FOREACH(fufh, &fvdat->handles, next) {
+   fdi.iosize = sizeof(*ffsi);
if (ffsi == NULL)
fdisp_make_vp(&fdi, op, vp, td, NULL);
else

Modified: stable/12/tests/sys/fs/fusefs/fsync.cc
==
--- stable/12/tests/sys/fs/fusefs/fsync.cc  Sun Mar 22 15:03:09 2020
(r359212)
+++ stable/12/tests/sys/fs/fusefs/fsync.cc  Sun Mar 22 15:16:59 2020
(r359213)
@@ -52,7 +52,7 @@ using namespace testing;
 
 class Fsync: public FuseTest {
 public:
-void expect_fsync(uint64_t ino, uint32_t flags, int error)
+void expect_fsync(uint64_t ino, uint32_t flags, int error, int times = 1)
 {
EXPECT_CALL(*m_mock, process(
ResultOf([=](auto in) {
@@ -67,12 +67,13 @@ void expect_fsync(uint64_t ino, uint32_t flags, int er
in.body.fsync.fsync_flags == flags);
}, Eq(true)),
_)
-   ).WillOnce(Invoke(ReturnErrno(error)));
+   ).Times(times)
+   .WillRepeatedly(Invoke(ReturnErrno(error)));
 }
 
-void expect_lookup(const char *relpath, uint64_t ino)
+void expect_lookup(const char *relpath, uint64_t ino, int times = 1)
 {
-   FuseTest::expect_lookup(relpath, ino, S_IFREG | 0644, 0, 1);
+   FuseTest::expect_lookup(relpath, ino, S_IFREG | 0644, 0, times);
 }
 
 void expect_write(uint64_t ino, uint64_t size, const void *contents)
@@ -257,4 +258,30 @@ TEST_F(Fsync, fsync)
ASSERT_EQ(0, fsync(fd)) << strerror(errno);
 
leak(fd);
+}
+
+/* If multiple FUSE file handles are active, we must fsync them all */
+TEST_F(Fsync, two_handles)
+{
+   const char FULLPATH[] = "mountpoint/some_file.txt";
+   const char RELPATH[] = "some_file.txt";
+   const char *CONTENTS = "abcdefgh";
+   ssize_t bufsize = strlen(CONTENTS);
+   uint64_t ino = 42;
+   int fd1, fd2;
+
+   expect_lookup(RELPATH, ino, 2);
+   expect_open(ino, 0, 2);
+   expect_write(ino, bufsize, CONTENTS);
+   expect_fsync(ino, 0, 0, 2);
+
+   fd1 = open(FULLPATH, O_WRONLY);
+   ASSERT_LE(0, fd1) << strerror(errno);
+   fd2 = open(FULLPATH, O_RDONLY);
+   ASSERT_LE(0, fd2) << strerror(errno);
+   ASSERT_EQ(bufsize, write(fd1, CONTENTS, bufsize)) << strerror(errno);
+   ASSERT_EQ(0, fsync(fd1)) << strerror(errno);
+
+   leak(fd1);
+   leak(fd2);
 }
___
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: r359212 - stable/12/tests/sys/fs/fusefs

2020-03-22 Thread Alan Somers
Author: asomers
Date: Sun Mar 22 15:03:09 2020
New Revision: 359212
URL: https://svnweb.freebsd.org/changeset/base/359212

Log:
  MFC r358089, r358797
  
  r358089:
  [skip ci] delete obsolete comment in fusefs tests
  
  It should've been deleted by r349436
  
  r358797:
  [skip ci] fix typo in comment in the fusefs tests

Modified:
  stable/12/tests/sys/fs/fusefs/io.cc
  stable/12/tests/sys/fs/fusefs/notify.cc
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/tests/sys/fs/fusefs/io.cc
==
--- stable/12/tests/sys/fs/fusefs/io.cc Sun Mar 22 15:01:13 2020
(r359211)
+++ stable/12/tests/sys/fs/fusefs/io.cc Sun Mar 22 15:03:09 2020
(r359212)
@@ -46,9 +46,6 @@ extern "C" {
 /* 
  * For testing I/O like fsx does, but deterministically and without a real
  * underlying file system
- *
- * TODO: after fusefs gains the options to select cache mode for each mount
- * point, run each of these tests for all cache modes.
  */
 
 using namespace testing;

Modified: stable/12/tests/sys/fs/fusefs/notify.cc
==
--- stable/12/tests/sys/fs/fusefs/notify.cc Sun Mar 22 15:01:13 2020
(r359211)
+++ stable/12/tests/sys/fs/fusefs/notify.cc Sun Mar 22 15:03:09 2020
(r359212)
@@ -375,7 +375,7 @@ TEST_F(Notify, inval_inode_with_clean_cache)
pthread_join(th0, &thr0_value);
EXPECT_EQ(0, (intptr_t)thr0_value);
 
-   /* cache attributes were been purged; this will trigger a new GETATTR */
+   /* cache attributes were purged; this will trigger a new GETATTR */
ASSERT_EQ(0, stat(FULLPATH, &sb)) << strerror(errno);
EXPECT_EQ(uid, sb.st_uid);
EXPECT_EQ(size1, sb.st_size);
___
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: r359211 - stable/12/tests/sys/fs/fusefs

2020-03-22 Thread Alan Somers
Author: asomers
Date: Sun Mar 22 15:01:13 2020
New Revision: 359211
URL: https://svnweb.freebsd.org/changeset/base/359211

Log:
  MFC r357835:
  
  fusefs: fix some memory leaks in the tests.
  
  Oddly, most of these were not detected by Coverity.
  
  Reported by:  Coverity (one of them, anyway)
  Coverity CID: 1404490

Modified:
  stable/12/tests/sys/fs/fusefs/read.cc
  stable/12/tests/sys/fs/fusefs/write.cc
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/tests/sys/fs/fusefs/read.cc
==
--- stable/12/tests/sys/fs/fusefs/read.cc   Sun Mar 22 12:57:49 2020
(r359210)
+++ stable/12/tests/sys/fs/fusefs/read.cc   Sun Mar 22 15:01:13 2020
(r359211)
@@ -778,6 +778,7 @@ TEST_F(Read, cache_block)
ASSERT_EQ(bufsize, read(fd, buf, bufsize)) << strerror(errno);
ASSERT_EQ(0, memcmp(buf, contents1, bufsize));
leak(fd);
+   free(contents);
 }
 
 /* Reading with sendfile should work (though it obviously won't be 0-copy) */
@@ -899,6 +900,8 @@ TEST_P(ReadAhead, readahead) {
ASSERT_EQ(0, memcmp(rbuf, contents, bufsize));
 
leak(fd);
+   free(rbuf);
+   free(contents);
 }
 
 INSTANTIATE_TEST_CASE_P(RA, ReadAhead,

Modified: stable/12/tests/sys/fs/fusefs/write.cc
==
--- stable/12/tests/sys/fs/fusefs/write.cc  Sun Mar 22 12:57:49 2020
(r359210)
+++ stable/12/tests/sys/fs/fusefs/write.cc  Sun Mar 22 15:01:13 2020
(r359211)
@@ -300,6 +300,8 @@ TEST_F(Write, append_to_cached)
/* Write the new data.  There should be no more read operations */
ASSERT_EQ(BUFSIZE, write(fd, CONTENTS, BUFSIZE)) << strerror(errno);
leak(fd);
+   free(oldbuf);
+   free(oldcontents);
 }
 
 TEST_F(Write, append_direct_io)
@@ -782,6 +784,8 @@ TEST_F(WriteCluster, clustering)
<< strerror(errno);
}
close(fd);
+   free(wbuf2x);
+   free(wbuf);
 }
 
 /* 
@@ -825,6 +829,7 @@ TEST_F(WriteCluster, DISABLED_cluster_write_err)
<< strerror(errno);
}
close(fd);
+   free(wbuf);
 }
 
 /*
___
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: r359210 - head/lib/libc/gen

2020-03-22 Thread Sergio Carlavilla Delgado
Author: carlavilla (doc committer)
Date: Sun Mar 22 12:57:49 2020
New Revision: 359210
URL: https://svnweb.freebsd.org/changeset/base/359210

Log:
  exec man page: Add HISTORY section
  
  PR:   240258
  Submitted by: gbergl...@gmail.com
  Patch by: gbergl...@gmail.com
  Approved by:  bcr@(mentor)
  MFC after:2 days
  Differential Revision:https://reviews.freebsd.org/D24145

Modified:
  head/lib/libc/gen/exec.3

Modified: head/lib/libc/gen/exec.3
==
--- head/lib/libc/gen/exec.3Sun Mar 22 11:44:24 2020(r359209)
+++ head/lib/libc/gen/exec.3Sun Mar 22 12:57:49 2020(r359210)
@@ -28,7 +28,7 @@
 .\" @(#)exec.3 8.3 (Berkeley) 1/24/94
 .\" $FreeBSD$
 .\"
-.Dd July 28, 2018
+.Dd March 22, 2020
 .Dt EXEC 3
 .Os
 .Sh NAME
@@ -310,6 +310,11 @@ and
 functions
 conform to
 .St -p1003.1-88 .
+.Sh HISTORY
+The
+.Fn exec
+function appeared in
+.At v1.
 The
 .Fn execvP
 function first appeared in
___
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: r359209 - in head/sys/dev: rtwn/usb usb

2020-03-22 Thread Hans Petter Selasky
Author: hselasky
Date: Sun Mar 22 11:44:24 2020
New Revision: 359209
URL: https://svnweb.freebsd.org/changeset/base/359209

Log:
  Add new USB ID.
  
  Submitted by: Konrad Jopek 
  Differential Revision:https://reviews.freebsd.org/D24142
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/rtwn/usb/rtwn_usb_attach.h
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h
==
--- head/sys/dev/rtwn/usb/rtwn_usb_attach.h Sun Mar 22 03:10:31 2020
(r359208)
+++ head/sys/dev/rtwn/usb/rtwn_usb_attach.h Sun Mar 22 11:44:24 2020
(r359209)
@@ -160,7 +160,8 @@ static const STRUCT_USB_HOST_ID rtwn_devs[] = {
RTWN_RTL8821AU_DEV(NETGEAR, A6100),
RTWN_RTL8821AU_DEV(REALTEK, RTL8821AU_1),
RTWN_RTL8821AU_DEV(REALTEK, RTL8821AU_2),
-   RTWN_RTL8821AU_DEV(TPLINK,  T2UNANO)
+   RTWN_RTL8821AU_DEV(TPLINK,  T2UNANO),
+   RTWN_RTL8821AU_DEV(TPLINK,  T2UPLUS),
 #undef RTWN_RTL8821AU_DEV
 };
 

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsSun Mar 22 03:10:31 2020(r359208)
+++ head/sys/dev/usb/usbdevsSun Mar 22 11:44:24 2020(r359209)
@@ -4667,6 +4667,7 @@ product TPLINK T4UV2  0x010d  Archer T4U ver 2
 product TPLINK T4UHV1  0x0103  Archer T4UH ver 1
 product TPLINK T4UHV2  0x010e  Archer T4UH ver 2
 product TPLINK T2UNANO 0x011e  Archer T2U Nano
+product TPLINK T2UPLUS 0x0120  Archer T2U Plus
 product TPLINK RTL8153 0x0601  RTL8153 USB 10/100/1000 LAN
 
 /* Trek Technology products */
___
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: r359203 - stable/11/sys/conf

2020-03-22 Thread Andre Albsmeier
On Sun, 22-Mar-2020 at 02:26:15 +, Alan Somers wrote:
> Author: asomers
> Date: Sun Mar 22 02:26:14 2020
> New Revision: 359203
> URL: https://svnweb.freebsd.org/changeset/base/359203
> 
> Log:
>   MFC r354779:
>   
>   Actually hook CAM_IO_STATS up to the build

And CAM_TEST_FAILURE (esp. 2 times)? Can't find any references to this...

>   ...
> @@ -1344,6 +1345,9 @@ options SCSI_NO_SENSE_STRINGS
>  options  SCSI_NO_OP_STRINGS
>  options  SCSI_DELAY=5000 # Be pessimistic about Joe SCSI device
>  options  CAM_IOSCHED_DYNAMIC
> +options  CAM_TEST_FAILURE
> +options  CAM_IO_STATS
> +options  CAM_TEST_FAILURE
>  
>  # Options for the CAM CDROM driver:
>  # CHANGER_MIN_BUSY_SECONDS: Guaranteed minimum time quantum for a changer LUN
> 
> Modified: stable/11/sys/conf/options
> ==
> --- stable/11/sys/conf/optionsSun Mar 22 01:40:12 2020
> (r359202)
> +++ stable/11/sys/conf/optionsSun Mar 22 02:26:14 2020
> (r359203)
> @@ -334,6 +334,8 @@ CAM_DEBUG_LUN opt_cam.h
>  CAM_DEBUG_FLAGS  opt_cam.h
>  CAM_BOOT_DELAY   opt_cam.h
>  CAM_IOSCHED_DYNAMIC  opt_cam.h
> +CAM_IO_STATS opt_cam.h
> +CAM_TEST_FAILURE opt_cam.h
>  SCSI_DELAY   opt_scsi.h
>  SCSI_NO_SENSE_STRINGSopt_scsi.h
>  SCSI_NO_OP_STRINGS   opt_scsi.h
> ___
> svn-src-stable...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-stable-11
> To unsubscribe, send any mail to "svn-src-stable-11-unsubscr...@freebsd.org"

-- 
FreeBSD: We eat penguins for breakfast
___
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"