Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src Pull up following revision(s) (requested by manu in ticke...



details:   https://anonhg.NetBSD.org/src/rev/7fe4be4acbdb
branches:  netbsd-6
changeset: 774031:7fe4be4acbdb
user:      riz <riz%NetBSD.org@localhost>
date:      Mon Apr 23 16:48:52 2012 +0000

description:
Pull up following revision(s) (requested by manu in ticket #195):
        lib/libskey/skeysubr.c: revision 1.27
        lib/libkvm/kvm_getloadavg.c: revision 1.11
        lib/libwrap/update.c: revision 1.9
        lib/liby/yyerror.c: revision 1.9
        lib/libpuffs/puffs_ops.3: revision 1.30
        lib/libwrap/misc.c: revision 1.10
        lib/libwrap/hosts_access.c: revision 1.20
        lib/libpuffs/pnode.c: revision 1.11
        lib/libperfuse/subr.c: revision 1.17
        lib/libpuffs/pnode.c: revision 1.12
        lib/libperfuse/subr.c: revision 1.18
        lib/libwrap/options.c: revision 1.15
        lib/libwrap/fix_options.c: revision 1.11
        lib/libperfuse/ops.c: revision 1.52
        lib/libperfuse/ops.c: revision 1.53
        lib/libperfuse/ops.c: revision 1.54
        lib/libwrap/hosts_ctl.c: revision 1.5
        lib/libintl/gettext.c: revision 1.27
        lib/libwrap/shell_cmd.c: revision 1.6
        lib/libpuffs/dispatcher.c: revision 1.39
        lib/libperfuse/perfuse_priv.h: revision 1.27
        lib/libwrap/socket.c: revision 1.19
        lib/libpuffs/puffs.3: revision 1.50
        lib/libperfuse/perfuse_priv.h: revision 1.28
        lib/libpuffs/puffs_priv.h: revision 1.45
        lib/libpuffs/puffs.3: revision 1.51
        lib/libperfuse/perfuse_priv.h: revision 1.29
        lib/libwrap/percent_x.c: revision 1.5
        lib/libpuffs/puffs.3: revision 1.52
        lib/libperfuse/debug.c: revision 1.11
        sys/fs/puffs/puffs_vnops.c: revision 1.165
        lib/libwrap/tcpd.h: revision 1.13
        sys/fs/puffs/puffs_vnops.c: revision 1.166
        lib/libwrap/eval.c: revision 1.7
        sys/fs/puffs/puffs_msgif.h: revision 1.78
        sys/fs/puffs/puffs_vfsops.c: revision 1.101
        lib/libwrap/rfc931.c: revision 1.9
        lib/libwrap/clean_exit.c: revision 1.5
        lib/libpuffs/puffs.h: revision 1.120
        lib/libc/stdlib/jemalloc.c: revision 1.27
        lib/librmt/rmtlib.c: revision 1.26
        lib/libpuffs/puffs.h: revision 1.121
        sys/fs/puffs/puffs_sys.h: revision 1.79
        lib/librumpclient/rumpclient.c: revision 1.48
        lib/libwrap/refuse.c: revision 1.5
        lib/libperfuse/perfuse.c: revision 1.26
        lib/libperfuse/perfuse.c: revision 1.27
        tests/fs/puffs/t_fuzz.c: revision 1.5
        lib/libperfuse/perfuse.c: revision 1.28
        lib/libpuffs/dispatcher.c: revision 1.40
        sys/fs/puffs/puffs_node.c: revision 1.24
        lib/libwrap/diag.c: revision 1.9
        lib/libintl/textdomain.c: revision 1.13
Use C89 function definition
Add name and atttribute cache with filesytem provided TTL.
lookup, create, mknod, mkdir, symlink, getattr and setattr messages
have been extended so that attributes and their TTL can be provided
by the filesytem. lookup, create, mknod, mkdir, and symlink messages
are also extended so that the filesystem can provide name TTL.
Add PUFFS_KFLAG_CACHE_FS_TTL flag to puffs_init(3) to use name and
attribute cache with filesystem provided TTL.
lookup, create, mknod, mkdir, symlink, getattr and setattr messages
have been extended so that attributes and their TTL can be provided
by the filesytem. lookup, create, mknod, mkdir, and symlink messages
are also extended so that the filesystem can provide name TTL.
The filesystem updates attributes and TTL using
puffs_pn_getvap(3), puffs_pn_getvattl(3), and puffs_pn_getcnttl(3)
Use new PUFFS_KFLAG_CACHE_FS_TTL option to puffs_init(3) so that
FUSE TTL on name and attributes are used. This save many PUFFS
operations and improves performances.
PUFFS_KFLAG_CACHE_FS_TTL is #ifdef'ed in many places for now so that
libperfuse can still be used on netbsd-5.
Split file system.
Comma fixes.
Remove dangling &quot;and&quot;.
Bump date for previous.
- Makesure update_va does not change vnode size when it should not. For
instance when doing a fault-issued VOP_GETPAGES within VOP_WRITE, changing
size leads to panic: genfs_getpages: past eof.
-Handle ticks wrap around for vnode name andattribute timeout
- When using PUFFS_KFLAG_CACHE_FS_TTL, do not use puffs_node to carry
  attribute and TTL fora newly created node. Instead extend puffs_newinfo
  and add puffs_newinfo_setva() and puffs_newinfo_setttl()
- Remove node_mk_common_final in libperfuse. It used to set uid/gid for
  a newly created vnode but has been made redundant along time ago since
  uid and gid are properly set in FUSE header.
- In libperfuse, check for corner case where opc = 0 on INACTIVE and   RECLAIM
(how is it possible? Check for it to avoid a crash anyway)
- In libperfuse, make sure we unlimit RLIMIT_AS and RLIMIT_DATA so that
  we do notrun out of memory because the kernel is lazy at reclaiming vnodes.
- In libperfuse, cleanup style of perfuse_destroy_pn()
Do not set PUFFS_KFLAG_CACHE_FS_TTL for PUFFS tests

diffstat:

 lib/libc/stdlib/jemalloc.c     |    7 +-
 lib/libintl/gettext.c          |   14 +-
 lib/libintl/textdomain.c       |    7 +-
 lib/libkvm/kvm_getloadavg.c    |   10 +-
 lib/libperfuse/debug.c         |   26 +-
 lib/libperfuse/ops.c           |  695 +++++++++++++++++-----------------------
 lib/libperfuse/perfuse.c       |  105 ++---
 lib/libperfuse/perfuse_priv.h  |   16 +-
 lib/libperfuse/subr.c          |   56 +--
 lib/libpuffs/dispatcher.c      |   74 +++-
 lib/libpuffs/pnode.c           |   28 +-
 lib/libpuffs/puffs.3           |   22 +-
 lib/libpuffs/puffs.h           |   26 +-
 lib/libpuffs/puffs_ops.3       |   80 ++++-
 lib/libpuffs/puffs_priv.h      |    5 +-
 lib/librmt/rmtlib.c            |   12 +-
 lib/librumpclient/rumpclient.c |   10 +-
 lib/libskey/skeysubr.c         |    8 +-
 lib/libwrap/clean_exit.c       |    8 +-
 lib/libwrap/diag.c             |   32 +-
 lib/libwrap/eval.c             |   28 +-
 lib/libwrap/fix_options.c      |    7 +-
 lib/libwrap/hosts_access.c     |  108 ++---
 lib/libwrap/hosts_ctl.c        |   11 +-
 lib/libwrap/misc.c             |   20 +-
 lib/libwrap/options.c          |  143 +++----
 lib/libwrap/percent_x.c        |   23 +-
 lib/libwrap/refuse.c           |    8 +-
 lib/libwrap/rfc931.c           |   30 +-
 lib/libwrap/shell_cmd.c        |   12 +-
 lib/libwrap/socket.c           |   20 +-
 lib/libwrap/tcpd.h             |   72 ++--
 lib/libwrap/update.c           |   11 +-
 lib/liby/yyerror.c             |    7 +-
 sys/fs/puffs/puffs_msgif.h     |   23 +-
 sys/fs/puffs/puffs_node.c      |    7 +-
 sys/fs/puffs/puffs_sys.h       |    9 +-
 sys/fs/puffs/puffs_vfsops.c    |    7 +-
 sys/fs/puffs/puffs_vnops.c     |  285 +++++++++++++---
 tests/fs/puffs/t_fuzz.c        |    8 +-
 40 files changed, 1150 insertions(+), 930 deletions(-)

diffs (truncated from 4616 to 300 lines):

diff -r 47b8b013eeb7 -r 7fe4be4acbdb lib/libc/stdlib/jemalloc.c
--- a/lib/libc/stdlib/jemalloc.c        Mon Apr 23 16:34:16 2012 +0000
+++ b/lib/libc/stdlib/jemalloc.c        Mon Apr 23 16:48:52 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: jemalloc.c,v 1.24 2011/05/18 01:59:39 christos Exp $   */
+/*     $NetBSD: jemalloc.c,v 1.24.6.1 2012/04/23 16:49:02 riz Exp $    */
 
 /*-
  * Copyright (C) 2006,2007 Jason Evans <jasone%FreeBSD.org@localhost>.
@@ -118,7 +118,7 @@
 
 #include <sys/cdefs.h>
 /* __FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $"); */ 
-__RCSID("$NetBSD: jemalloc.c,v 1.24 2011/05/18 01:59:39 christos Exp $");
+__RCSID("$NetBSD: jemalloc.c,v 1.24.6.1 2012/04/23 16:49:02 riz Exp $");
 
 #ifdef __FreeBSD__
 #include "libc_private.h"
@@ -3227,7 +3227,8 @@
                    "");
 
                _malloc_message("Chunk size: ", umax2s(chunksize, s), "", "");
-               _malloc_message(" (2^", umax2s(opt_chunk_2pow, s), ")\n", "");
+               _malloc_message(" (2^", umax2s((size_t)opt_chunk_2pow, s),
+                   ")\n", "");
 
 #ifdef MALLOC_STATS
                {
diff -r 47b8b013eeb7 -r 7fe4be4acbdb lib/libintl/gettext.c
--- a/lib/libintl/gettext.c     Mon Apr 23 16:34:16 2012 +0000
+++ b/lib/libintl/gettext.c     Mon Apr 23 16:48:52 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gettext.c,v 1.26 2012/01/21 13:35:49 tnozaki Exp $     */
+/*     $NetBSD: gettext.c,v 1.26.2.1 2012/04/23 16:48:59 riz Exp $     */
 
 /*-
  * Copyright (c) 2000, 2001 Citrus Project,
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: gettext.c,v 1.26 2012/01/21 13:35:49 tnozaki Exp $");
+__RCSID("$NetBSD: gettext.c,v 1.26.2.1 2012/04/23 16:48:59 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -303,8 +303,8 @@
 get_sysdep_string_table(struct mosysdepstr_h **table_h, uint32_t *ofstable,
                        uint32_t nstrings, uint32_t magic, char *base)
 {
-       int i, j;
-       int count;
+       unsigned int i;
+       int j, count;
        size_t l;
        struct mosysdepstr *table;
 
@@ -398,7 +398,7 @@
        uint32_t magic;
        struct moentry *stable;
        size_t l;
-       int i;
+       unsigned int i;
        char *v;
        uint32_t *ofstable;
 
@@ -480,7 +480,7 @@
        struct moentry_h *p;
        struct mo *mo;
        size_t l, headerlen;
-       int i;
+       unsigned int i;
        char *v;
        struct mohandle *mohandle = &db->mohandle;
 
@@ -772,7 +772,7 @@
                /* avoid possible infinite loop, when the data is not sorted */
                if (omiddle == middle)
                        break;
-               if (middle < 0 || middle >= mohandle->mo.mo_nstring)
+               if ((size_t)middle >= mohandle->mo.mo_nstring)
                        break;
 
                n = strcmp(msgid, mohandle->mo.mo_otable[middle].off);
diff -r 47b8b013eeb7 -r 7fe4be4acbdb lib/libintl/textdomain.c
--- a/lib/libintl/textdomain.c  Mon Apr 23 16:34:16 2012 +0000
+++ b/lib/libintl/textdomain.c  Mon Apr 23 16:48:52 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: textdomain.c,v 1.12 2007/09/25 08:19:09 junyoung Exp $ */
+/*     $NetBSD: textdomain.c,v 1.12.30.1 2012/04/23 16:49:00 riz Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 Citrus Project,
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: textdomain.c,v 1.12 2007/09/25 08:19:09 junyoung Exp $");
+__RCSID("$NetBSD: textdomain.c,v 1.12.30.1 2012/04/23 16:49:00 riz Exp $");
 
 #include <sys/param.h>
 
@@ -39,7 +39,8 @@
 #include "pathnames.h"
 
 static struct domainbinding __default_binding = {
-       NULL, DEFAULT_DOMAINNAME, _PATH_TEXTDOMAIN,
+       .path = { _PATH_TEXTDOMAIN },
+       .domainname = { DEFAULT_DOMAINNAME },
 };
 struct domainbinding *__bindings = &__default_binding;
 char __current_domainname[PATH_MAX] = DEFAULT_DOMAINNAME;
diff -r 47b8b013eeb7 -r 7fe4be4acbdb lib/libkvm/kvm_getloadavg.c
--- a/lib/libkvm/kvm_getloadavg.c       Mon Apr 23 16:34:16 2012 +0000
+++ b/lib/libkvm/kvm_getloadavg.c       Mon Apr 23 16:48:52 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kvm_getloadavg.c,v 1.10 2010/09/26 22:28:05 jym Exp $  */
+/*     $NetBSD: kvm_getloadavg.c,v 1.10.8.1 2012/04/23 16:48:53 riz Exp $      */
 
 /*-
  * Copyright (c) 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)kvm_getloadavg.c   8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: kvm_getloadavg.c,v 1.10 2010/09/26 22:28:05 jym Exp $");
+__RCSID("$NetBSD: kvm_getloadavg.c,v 1.10.8.1 2012/04/23 16:48:53 riz Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -56,11 +56,11 @@
 #include "kvm_private.h"
 
 static struct nlist nl[] = {
-       { "_averunnable" },
+       { .n_name = "_averunnable" },
 #define        X_AVERUNNABLE   0
-       { "_fscale" },
+       { .n_name = "_fscale" },
 #define        X_FSCALE        1
-       { "" },
+       { .n_name = "" },
 };
 
 /*
diff -r 47b8b013eeb7 -r 7fe4be4acbdb lib/libperfuse/debug.c
--- a/lib/libperfuse/debug.c    Mon Apr 23 16:34:16 2012 +0000
+++ b/lib/libperfuse/debug.c    Mon Apr 23 16:48:52 2012 +0000
@@ -1,4 +1,4 @@
-/*  $NetBSD: debug.c,v 1.10 2012/01/29 09:01:31 dholland Exp $ */
+/*  $NetBSD: debug.c,v 1.10.2.1 2012/04/23 16:48:59 riz Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -84,7 +84,7 @@
        { 0, "UNKNOWN" },
 };
 
-const char *perfuse_qtypestr[] = { 
+const char * const perfuse_qtypestr[] = { 
        "READDIR",
        "READ",
        "WRITE",
@@ -94,8 +94,7 @@
 };
 
 const char *
-perfuse_opname(opcode)
-       int opcode;
+perfuse_opname(int opcode)
 {
        const struct perfuse_opcode *po;
 
@@ -108,9 +107,7 @@
 }
 
 char *
-perfuse_opdump_in(ps, pm)
-       struct perfuse_state *ps;
-       perfuse_msg_t *pm;
+perfuse_opdump_in(struct perfuse_state *ps, perfuse_msg_t *pm)
 {
        struct fuse_in_header *fih;
        static char buf[BUFSIZ] = "";
@@ -131,10 +128,8 @@
 }
 
 struct perfuse_trace *
-perfuse_trace_begin(ps, opc, pm)
-       struct perfuse_state *ps;
-       puffs_cookie_t opc;
-       perfuse_msg_t *pm;
+perfuse_trace_begin(struct perfuse_state *ps, puffs_cookie_t opc,
+       perfuse_msg_t *pm)
 {
        struct perfuse_trace *pt;
 
@@ -165,10 +160,7 @@
 }
 
 void
-perfuse_trace_end(ps, pt, error)
-       struct perfuse_state *ps;
-       struct perfuse_trace *pt;
-       int error;
+perfuse_trace_end(struct perfuse_state *ps, struct perfuse_trace *pt, int error)
 {
        if (clock_gettime(CLOCK_REALTIME, &pt->pt_end) != 0)
                DERR(EX_OSERR, "clock_gettime failed");
@@ -189,9 +181,7 @@
 }
 
 void
-perfuse_trace_dump(pu, fp)
-       struct puffs_usermount *pu;
-       FILE *fp;
+perfuse_trace_dump(struct puffs_usermount *pu, FILE *fp)
 {
        struct perfuse_state *ps;
        struct perfuse_trace *pt;
diff -r 47b8b013eeb7 -r 7fe4be4acbdb lib/libperfuse/ops.c
--- a/lib/libperfuse/ops.c      Mon Apr 23 16:34:16 2012 +0000
+++ b/lib/libperfuse/ops.c      Mon Apr 23 16:48:52 2012 +0000
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.50.2.1 2012/03/10 16:42:30 riz Exp $ */
+/*  $NetBSD: ops.c,v 1.50.2.2 2012/04/23 16:48:59 riz Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -34,7 +34,7 @@
 #include <sysexits.h>
 #include <syslog.h>
 #include <puffs.h>
-#include <sys/socket.h>
+#include <sys/cdefs.h>
 #include <sys/socket.h>
 #include <sys/extattr.h>
 #include <sys/time.h>
@@ -48,10 +48,15 @@
 #if 0
 static void print_node(const char *, puffs_cookie_t);
 #endif
+#ifdef PUFFS_KFLAG_CACHE_FS_TTL
+static void perfuse_newinfo_setttl(struct puffs_newinfo *, 
+    struct fuse_entry_out *, struct fuse_attr_out *);
+#else /* PUFFS_KFLAG_CACHE_FS_TTL */
 static void set_expire(puffs_cookie_t, struct fuse_entry_out *, 
-   struct fuse_attr_out *);
+    struct fuse_attr_out *);
 static int attr_expired(puffs_cookie_t);
 static int entry_expired(puffs_cookie_t);
+#endif /* PUFFS_KFLAG_CACHE_FS_TTL */
 static int xchg_msg(struct puffs_usermount *, puffs_cookie_t, 
     perfuse_msg_t *, size_t, enum perfuse_xchg_pb_reply); 
 static int mode_access(puffs_cookie_t, const struct puffs_cred *, mode_t);
@@ -61,11 +66,10 @@
 static int node_lookup_dir_nodot(struct puffs_usermount *,
     puffs_cookie_t, char *, size_t, struct puffs_node **);
 static int node_lookup_common(struct puffs_usermount *, puffs_cookie_t, 
-    const char *, const struct puffs_cred *, struct puffs_node **);
+    struct puffs_newinfo *, const char *, const struct puffs_cred *, 
+    struct puffs_node **);
 static int node_mk_common(struct puffs_usermount *, puffs_cookie_t,
     struct puffs_newinfo *, const struct puffs_cn *pcn, perfuse_msg_t *);
-static int node_mk_common_final(struct puffs_usermount *, puffs_cookie_t,
-    struct puffs_node *, const struct puffs_cn *pcn);
 static uint64_t readdir_last_cookie(struct fuse_dirent *, size_t); 
 static ssize_t fuse_to_dirent(struct puffs_usermount *, puffs_cookie_t,
     struct fuse_dirent *, size_t);
@@ -108,9 +112,7 @@
 
 #if 0
 static void 
-print_node(func, opc)
-       const char *func;
-       puffs_cookie_t opc;
+print_node(const char *func, puffs_cookie_t opc)
 {
        struct puffs_node *pn;
        struct perfuse_node_data *pnd;
@@ -128,10 +130,8 @@
 #endif /* PERFUSE_DEBUG */
        
 int
-perfuse_node_close_common(pu, opc, mode)
-       struct puffs_usermount *pu;
-       puffs_cookie_t opc;
-       int mode;
+perfuse_node_close_common(struct puffs_usermount *pu, puffs_cookie_t opc,
+       int mode)
 {
        struct perfuse_state *ps;
        perfuse_msg_t *pm;
@@ -197,12 +197,8 @@
 }
 
 static int
-xchg_msg(pu, opc, pm, len, wait)
-       struct puffs_usermount *pu;
-       puffs_cookie_t opc;



Home | Main Index | Thread Index | Old Index