svn commit: r252131 - in user/attilio/vmobj-readlock: cddl/contrib/opensolaris/cmd/zpool contrib/gcc contrib/llvm/lib/CodeGen etc/rc.d release release/doc/en_US.ISO8859-1/errata release/doc/en_US.I...
Attilio Rao
attilio at FreeBSD.org
Sun Jun 23 22:31:27 UTC 2013
Author: attilio
Date: Sun Jun 23 22:31:19 2013
New Revision: 252131
URL: http://svnweb.freebsd.org/changeset/base/252131
Log:
MFC
Added:
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/http.subr
- copied unchanged from r252130, user/attilio/vmcontention/usr.sbin/bsdconfig/share/media/http.subr
Modified:
user/attilio/vmobj-readlock/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
user/attilio/vmobj-readlock/contrib/gcc/unwind-dw2.c
user/attilio/vmobj-readlock/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp
user/attilio/vmobj-readlock/etc/rc.d/sshd
user/attilio/vmobj-readlock/release/doc/en_US.ISO8859-1/errata/article.xml
user/attilio/vmobj-readlock/release/doc/en_US.ISO8859-1/relnotes/article.xml
user/attilio/vmobj-readlock/release/doc/share/xml/release.ent
user/attilio/vmobj-readlock/release/release.sh
user/attilio/vmobj-readlock/sbin/mdconfig/mdconfig.8
user/attilio/vmobj-readlock/sbin/mdconfig/mdconfig.c
user/attilio/vmobj-readlock/share/man/man7/ports.7
user/attilio/vmobj-readlock/share/man/man9/hhook.9
user/attilio/vmobj-readlock/share/man/man9/rwlock.9
user/attilio/vmobj-readlock/share/mk/sys.mk
user/attilio/vmobj-readlock/sys/amd64/include/counter.h
user/attilio/vmobj-readlock/sys/cam/scsi/scsi_all.h
user/attilio/vmobj-readlock/sys/cddl/compat/opensolaris/sys/mutex.h
user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
user/attilio/vmobj-readlock/sys/conf/files
user/attilio/vmobj-readlock/sys/dev/usb/serial/umcs.h
user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_alloc.c
user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_balloc.c
user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_bmap.c
user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_extern.h
user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_subr.c
user/attilio/vmobj-readlock/sys/fs/ext2fs/fs.h
user/attilio/vmobj-readlock/sys/fs/ext2fs/inode.h
user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clbio.c
user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clstate.c
user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clvfsops.c
user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clvnops.c
user/attilio/vmobj-readlock/sys/modules/runfw/Makefile
user/attilio/vmobj-readlock/sys/netinet/ip_input.c
user/attilio/vmobj-readlock/sys/netinet/tcp_input.c
user/attilio/vmobj-readlock/sys/powerpc/ofw/ofw_cpu.c
user/attilio/vmobj-readlock/sys/vm/uma.h
user/attilio/vmobj-readlock/sys/vm/uma_core.c
user/attilio/vmobj-readlock/sys/vm/uma_dbg.c
user/attilio/vmobj-readlock/sys/vm/uma_int.h
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/console
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/include/media.hlp
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/include/messages.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/mouse/mouse
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/networking/share/device.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/networking/share/hostname.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/networking/share/ipaddr.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/networking/share/media.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/networking/share/netmask.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/networking/share/resolv.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/networking/share/routing.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/device.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/dialog.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/Makefile
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/any.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/cdrom.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/common.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/directory.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/dos.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/floppy.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/ftp.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/httpproxy.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/nfs.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/options.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/tcpip.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/ufs.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/media/usb.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/packages/packages.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/script.subr
user/attilio/vmobj-readlock/usr.sbin/bsdconfig/share/variable.subr
Directory Properties:
user/attilio/vmobj-readlock/ (props changed)
user/attilio/vmobj-readlock/cddl/ (props changed)
user/attilio/vmobj-readlock/cddl/contrib/opensolaris/ (props changed)
user/attilio/vmobj-readlock/contrib/gcc/ (props changed)
user/attilio/vmobj-readlock/contrib/llvm/ (props changed)
user/attilio/vmobj-readlock/sbin/ (props changed)
user/attilio/vmobj-readlock/sys/ (props changed)
user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/ (props changed)
user/attilio/vmobj-readlock/sys/conf/ (props changed)
Modified: user/attilio/vmobj-readlock/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
==============================================================================
--- user/attilio/vmobj-readlock/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -5344,10 +5344,9 @@ main(int argc, char **argv)
* 'freeze' is a vile debugging abomination, so we treat
* it as such.
*/
- char buf[16384];
- int fd = open(ZFS_DEV, O_RDWR);
- (void) strcpy((void *)buf, argv[2]);
- return (!!ioctl(fd, ZFS_IOC_POOL_FREEZE, buf));
+ zfs_cmd_t zc = { 0 };
+ (void) strlcpy(zc.zc_name, argv[2], sizeof (zc.zc_name));
+ return (!!zfs_ioctl(g_zfs, ZFS_IOC_POOL_FREEZE, &zc));
} else {
(void) fprintf(stderr, gettext("unrecognized "
"command '%s'\n"), cmdname);
Modified: user/attilio/vmobj-readlock/contrib/gcc/unwind-dw2.c
==============================================================================
--- user/attilio/vmobj-readlock/contrib/gcc/unwind-dw2.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/contrib/gcc/unwind-dw2.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -1438,17 +1438,6 @@ uw_init_context_1 (struct _Unwind_Contex
context->ra = __builtin_extract_return_addr (outer_ra);
}
-#if defined(__clang__) && defined(__amd64__)
-/* Some versions of clang don't save and restore all callee registers, if a
- __builtin_eh_return() intrinsic is used in a function. This is particularly
- bad on amd64. For now, use the following ugly hack to force it to assume
- those registers are clobbered, when invoking __builtin_eh_return(), so it
- will emit code to save and restore them. */
-#define CLOBBER_REGS_HACK \
- __asm __volatile(" " : : : "r15", "r14", "r13", "r12", "rbx", "rdx", "rax");
-#else
-#define CLOBBER_REGS_HACK
-#endif /* __clang__ */
/* Install TARGET into CURRENT so that we can return to it. This is a
macro because __builtin_eh_return must be invoked in the context of
@@ -1459,7 +1448,6 @@ uw_init_context_1 (struct _Unwind_Contex
{ \
long offset = uw_install_context_1 ((CURRENT), (TARGET)); \
void *handler = __builtin_frob_return_addr ((TARGET)->ra); \
- CLOBBER_REGS_HACK \
__builtin_eh_return (offset, handler); \
} \
while (0)
Modified: user/attilio/vmobj-readlock/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp
==============================================================================
--- user/attilio/vmobj-readlock/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp Sun Jun 23 22:31:19 2013 (r252131)
@@ -29,6 +29,7 @@
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
+#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RegisterScavenging.h"
#include "llvm/IR/InlineAsm.h"
@@ -214,7 +215,8 @@ void PEI::calculateCalleeSavedRegisters(
std::vector<CalleeSavedInfo> CSI;
for (unsigned i = 0; CSRegs[i]; ++i) {
unsigned Reg = CSRegs[i];
- if (F.getRegInfo().isPhysRegUsed(Reg)) {
+ // Functions which call __builtin_unwind_init get all their registers saved.
+ if (F.getRegInfo().isPhysRegUsed(Reg) || F.getMMI().callsUnwindInit()) {
// If the reg is modified, save it!
CSI.push_back(CalleeSavedInfo(Reg));
}
Modified: user/attilio/vmobj-readlock/etc/rc.d/sshd
==============================================================================
--- user/attilio/vmobj-readlock/etc/rc.d/sshd Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/etc/rc.d/sshd Sun Jun 23 22:31:19 2013 (r252131)
@@ -14,8 +14,8 @@ rcvar="sshd_enable"
command="/usr/sbin/${name}"
keygen_cmd="sshd_keygen"
start_precmd="sshd_precmd"
-reload_precmd="sshd_configtest"
-restart_precmd="sshd_configtest"
+reload_precmd="sshd_precmd"
+restart_precmd="sshd_precmd"
configtest_cmd="sshd_configtest"
pidfile="/var/run/${name}.pid"
extra_commands="configtest keygen reload"
Modified: user/attilio/vmobj-readlock/release/doc/en_US.ISO8859-1/errata/article.xml
==============================================================================
--- user/attilio/vmobj-readlock/release/doc/en_US.ISO8859-1/errata/article.xml Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/release/doc/en_US.ISO8859-1/errata/article.xml Sun Jun 23 22:31:19 2013 (r252131)
@@ -28,12 +28,7 @@
<pubdate>$FreeBSD$</pubdate>
<copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2002</year>
- <year>2003</year>
- <year>2004</year>
- <year>2005</year>
+ <year>2013</year>
<holder role="mailto:doc at FreeBSD.org">The &os; Documentation Project</holder>
</copyright>
@@ -56,8 +51,8 @@
should always be consulted before installing this version of
&os;.</para>
- <para>This errata document for &os; &release;
- will be maintained until the release of &os; &release.next;.</para>
+ <para>This errata document for &os; &release; will be maintained
+ until the release of &os; &release.current.release;.</para>
</abstract>
<sect1 id="intro">
Modified: user/attilio/vmobj-readlock/release/doc/en_US.ISO8859-1/relnotes/article.xml
==============================================================================
--- user/attilio/vmobj-readlock/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jun 23 22:31:19 2013 (r252131)
@@ -25,6 +25,9 @@
<year>2008</year>
<year>2009</year>
<year>2010</year>
+ <year>2011</year>
+ <year>2012</year>
+ <year>2013</year>
<holder role="mailto:doc at FreeBSD.org">The &os; Documentation Project</holder>
</copyright>
Modified: user/attilio/vmobj-readlock/release/doc/share/xml/release.ent
==============================================================================
--- user/attilio/vmobj-readlock/release/doc/share/xml/release.ent Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/release/doc/share/xml/release.ent Sun Jun 23 22:31:19 2013 (r252131)
@@ -6,7 +6,9 @@
<!-- Version of the OS we're describing. This needs to be updated
with each new release. -->
-<!ENTITY release.current "10.0-CURRENT">
+<!ENTITY release.current.version "10.0">
+<!ENTITY release.current "&release.current.version;-CURRENT">
+<!ENTITY release.current.release "&release.current.version;-RELEASE">
<!-- The previous version used for comparison in the "What's New"
section. For -CURRENT, we might point back to the last
Modified: user/attilio/vmobj-readlock/release/release.sh
==============================================================================
--- user/attilio/vmobj-readlock/release/release.sh Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/release/release.sh Sun Jun 23 22:31:19 2013 (r252131)
@@ -171,6 +171,17 @@ build_doc_ports() {
fi
}
+# If MAKE_CONF and/or SRC_CONF are set and not character devices (/dev/null),
+# copy them to the chroot.
+if [ -e ${MAKE_CONF} ] && [ ! -c ${MAKE_CONF} ]; then
+ mkdir -p ${CHROOTDIR}/$(dirname ${MAKE_CONF})
+ cp ${MAKE_CONF} ${CHROOTDIR}/${MAKE_CONF}
+fi
+if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CONF} ]; then
+ mkdir -p ${CHROOTDIR}/$(dirname ${SRC_CONF})
+ cp ${SRC_CONF} ${CHROOTDIR}/${SRC_CONF}
+fi
+
if [ -d ${CHROOTDIR}/usr/ports ]; then
cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
build_doc_ports ${CHROOTDIR}
Modified: user/attilio/vmobj-readlock/sbin/mdconfig/mdconfig.8
==============================================================================
--- user/attilio/vmobj-readlock/sbin/mdconfig/mdconfig.8 Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sbin/mdconfig/mdconfig.8 Sun Jun 23 22:31:19 2013 (r252131)
@@ -41,7 +41,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 3, 2012
+.Dd June 20, 2013
.Dt MDCONFIG 8
.Os
.Sh NAME
@@ -72,6 +72,7 @@
.Fl l
.Op Fl n
.Op Fl v
+.Op Fl f Ar file
.Op Fl u Ar unit
.Nm
.Ar file
@@ -131,6 +132,19 @@ List configured devices.
If given with
.Fl u ,
display details about that particular device.
+If given with
+.Fl f Ar file ,
+display
+.Xr md 4
+device names of which
+.Ar file
+is used as the backing store.
+If both of
+.Fl u
+and
+.Fl f
+options are specified,
+display devices which match the two conditions.
If the
.Fl v
option is specified, show all details.
Modified: user/attilio/vmobj-readlock/sbin/mdconfig/mdconfig.c
==============================================================================
--- user/attilio/vmobj-readlock/sbin/mdconfig/mdconfig.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sbin/mdconfig/mdconfig.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -47,6 +47,7 @@
#include <inttypes.h>
#include <libgeom.h>
#include <libutil.h>
+#include <paths.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
@@ -59,9 +60,9 @@ static int nflag;
static void usage(void);
static void md_set_file(const char *);
-static int md_find(char *, const char *);
-static int md_query(char *name);
-static int md_list(char *units, int opt);
+static int md_find(const char *, const char *);
+static int md_query(const char *, const int, const char *);
+static int md_list(const char *, int, const char *);
static char *geom_config_get(struct gconf *g, const char *name);
static void md_prthumanval(char *length);
@@ -82,7 +83,7 @@ usage(void)
" [-x sectors/track] [-y heads/cylinder]\n"
" mdconfig -d -u unit [-o [no]force]\n"
" mdconfig -r -u unit -s size [-o [no]force]\n"
-" mdconfig -l [-v] [-n] [-u unit]\n"
+" mdconfig -l [-v] [-n] [-f file] [-u unit]\n"
" mdconfig file\n");
fprintf(stderr, "\t\ttype = {malloc, vnode, swap}\n");
fprintf(stderr, "\t\toption = {cluster, compress, reserve}\n");
@@ -215,8 +216,8 @@ main(int argc, char **argv)
errx(1, "unknown suffix on -s argument");
break;
case 'u':
- if (!strncmp(optarg, "/dev/", 5))
- optarg += 5;
+ if (!strncmp(optarg, _PATH_DEV, sizeof(_PATH_DEV) - 1))
+ optarg += sizeof(_PATH_DEV) - 1;
if (!strncmp(optarg, MD_NAME, sizeof(MD_NAME) - 1))
optarg += sizeof(MD_NAME) - 1;
uflag = optarg;
@@ -298,8 +299,8 @@ main(int argc, char **argv)
errx(1, "-x can only be used with -a");
if (mdio.md_fwheads != 0)
errx(1, "-y can only be used with -a");
- if (fflag != NULL)
- errx(1, "-f can only be used with -a");
+ if (fflag != NULL && action != LIST)
+ errx(1, "-f can only be used with -a and -l");
if (tflag != NULL)
errx(1, "-t can only be used with -a");
if (argc > 0)
@@ -333,14 +334,14 @@ main(int argc, char **argv)
if (!kld_isloaded("g_md") && kld_load("geom_md") == -1)
err(1, "failed to load geom_md module");
- fd = open("/dev/" MDCTL_NAME, O_RDWR, 0);
+ fd = open(_PATH_DEV MDCTL_NAME, O_RDWR, 0);
if (fd < 0)
- err(1, "open(/dev/%s)", MDCTL_NAME);
+ err(1, "open(%s%s)", _PATH_DEV, MDCTL_NAME);
if (action == ATTACH) {
i = ioctl(fd, MDIOCATTACH, &mdio);
if (i < 0)
- err(1, "ioctl(/dev/%s)", MDCTL_NAME);
+ err(1, "ioctl(%s%s)", _PATH_DEV, MDCTL_NAME);
if (mdio.md_options & MD_AUTOUNIT)
printf("%s%d\n", nflag ? "" : MD_NAME, mdio.md_unit);
} else if (action == DETACH) {
@@ -348,22 +349,22 @@ main(int argc, char **argv)
errx(1, "-d requires -u");
i = ioctl(fd, MDIOCDETACH, &mdio);
if (i < 0)
- err(1, "ioctl(/dev/%s)", MDCTL_NAME);
+ err(1, "ioctl(%s%s)", _PATH_DEV, MDCTL_NAME);
} else if (action == RESIZE) {
if (mdio.md_options & MD_AUTOUNIT)
errx(1, "-r requires -u");
i = ioctl(fd, MDIOCRESIZE, &mdio);
if (i < 0)
- err(1, "ioctl(/dev/%s)", MDCTL_NAME);
+ err(1, "ioctl(%s%s)", _PATH_DEV, MDCTL_NAME);
} else if (action == LIST) {
if (mdio.md_options & MD_AUTOUNIT) {
/*
* Listing all devices. This is why we pass NULL
* together with OPT_LIST.
*/
- md_list(NULL, OPT_LIST | vflag);
+ return (md_list(NULL, OPT_LIST | vflag, fflag));
} else
- return (md_query(uflag));
+ return (md_query(uflag, vflag, fflag));
} else
usage();
close(fd);
@@ -397,7 +398,7 @@ md_set_file(const char *fn)
* between list and query mode.
*/
static int
-md_list(char *units, int opt)
+md_list(const char *units, int opt, const char *fflag)
{
struct gmesh gm;
struct gprovider *pp;
@@ -407,7 +408,7 @@ md_list(char *units, int opt)
struct ggeom *gg;
struct gclass *gcl;
void *sq;
- int retcode, found;
+ int retcode, ffound, ufound;
char *type, *file, *length;
type = file = length = NULL;
@@ -422,7 +423,7 @@ md_list(char *units, int opt)
if (sq == NULL)
return (-1);
- found = 0;
+ ffound = ufound = 0;
while ((gsp = geom_stats_snapshot_next(sq)) != NULL) {
gid = geom_lookupid(&gm, gsp->id);
if (gid == NULL)
@@ -438,18 +439,25 @@ md_list(char *units, int opt)
if (retcode != 1)
continue;
else
- found = 1;
+ ufound = 1;
}
gc = &pp->lg_config;
- if (nflag && strncmp(pp->lg_name, "md", 2) == 0)
+ type = geom_config_get(gc, "type");
+ if (strcmp(type, "vnode") == 0) {
+ file = geom_config_get(gc, "file");
+ if (fflag != NULL &&
+ strcmp(fflag, file) != 0)
+ continue;
+ else
+ ffound = 1;
+ }
+ if (nflag && strncmp(pp->lg_name, MD_NAME, 2) == 0)
printf("%s", pp->lg_name + 2);
else
printf("%s", pp->lg_name);
- if (opt & OPT_VERBOSE || opt & OPT_UNIT) {
- type = geom_config_get(gc, "type");
- if (strcmp(type, "vnode") == 0)
- file = geom_config_get(gc, "file");
+ if (opt & OPT_VERBOSE ||
+ ((opt & OPT_UNIT) && fflag == NULL)) {
length = geom_config_get(gc, "length");
printf("\t%s\t", type);
if (length != NULL)
@@ -470,7 +478,9 @@ md_list(char *units, int opt)
printf("\n");
/* XXX: Check if it's enough to clean everything. */
geom_stats_snapshot_free(sq);
- if ((opt & OPT_UNIT) && found)
+ if (((opt & OPT_UNIT) && (fflag == NULL) && ufound) ||
+ ((opt & OPT_UNIT) == 0 && (fflag != NULL) && ffound) ||
+ ((opt & OPT_UNIT) && (fflag != NULL) && ufound && ffound))
return (0);
else
return (-1);
@@ -497,10 +507,10 @@ geom_config_get(struct gconf *g, const c
* otherwise.
*/
static int
-md_find(char *list, const char *name)
+md_find(const char *list, const char *name)
{
int ret;
- char num[16];
+ char num[PATH_MAX];
char *ptr, *p, *u;
ret = 0;
@@ -508,10 +518,10 @@ md_find(char *list, const char *name)
if (ptr == NULL)
return (-1);
for (p = ptr; (u = strsep(&p, ",")) != NULL;) {
- if (strncmp(u, "/dev/", 5) == 0)
- u += 5;
+ if (strncmp(u, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
+ u += sizeof(_PATH_DEV) - 1;
/* Just in case user specified number instead of full name */
- snprintf(num, sizeof(num), "md%s", u);
+ snprintf(num, sizeof(num), "%s%s", MD_NAME, u);
if (strcmp(u, name) == 0 || strcmp(num, name) == 0) {
ret = 1;
break;
@@ -538,8 +548,8 @@ md_prthumanval(char *length)
}
static int
-md_query(char *name)
+md_query(const char *name, const int opt, const char *fflag)
{
- return (md_list(name, OPT_UNIT));
+ return (md_list(name, opt | OPT_UNIT, fflag));
}
Modified: user/attilio/vmobj-readlock/share/man/man7/ports.7
==============================================================================
--- user/attilio/vmobj-readlock/share/man/man7/ports.7 Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/share/man/man7/ports.7 Sun Jun 23 22:31:19 2013 (r252131)
@@ -97,7 +97,7 @@ target.
Configure
.Va OPTIONS
for this port using
-.Xr dialog 1 .
+.Xr dialog4ports 1 .
.It Cm fetch
Fetch all of the files needed to build this port from the sites
listed in
@@ -177,7 +177,7 @@ configured.
Configure
.Va OPTIONS
for this port and all its dependencies using
-.Xr dialog 1 .
+.Xr dialog4ports 1 .
.It Cm fetch-list
Show list of files to be fetched in order to build the port.
.It Cm fetch-recursive
Modified: user/attilio/vmobj-readlock/share/man/man9/hhook.9
==============================================================================
--- user/attilio/vmobj-readlock/share/man/man9/hhook.9 Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/share/man/man9/hhook.9 Sun Jun 23 22:31:19 2013 (r252131)
@@ -30,7 +30,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 15, 2011
+.Dd June 21, 2013
.Dt HHOOK 9
.Os
.Sh NAME
@@ -380,9 +380,3 @@ This manual page was written by
.An David Hayes Aq david.hayes at ieee.org
and
.An Lawrence Stewart Aq lstewart at FreeBSD.org .
-.Sh BUGS
-The framework does not currently support registering hook points in subsystems
-which have not been virtualised with VIMAGE.
-Fairly minimal internal changes to the
-.Nm
-implementation are required to address this.
Modified: user/attilio/vmobj-readlock/share/man/man9/rwlock.9
==============================================================================
--- user/attilio/vmobj-readlock/share/man/man9/rwlock.9 Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/share/man/man9/rwlock.9 Sun Jun 23 22:31:19 2013 (r252131)
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 16, 2011
+.Dd June 20, 2013
.Dt RWLOCK 9
.Os
.Sh NAME
@@ -254,7 +254,7 @@ with
and
.Cd "options INVARIANT_SUPPORT" ,
the kernel will panic.
-Currently the following assertions are supported:
+Currently the following base assertions are supported:
.Bl -tag -width ".Dv RA_UNLOCKED"
.It Dv RA_LOCKED
Assert that current thread holds either a shared or exclusive lock
@@ -270,6 +270,20 @@ Assert that current thread holds an excl
Assert that current thread holds neither a shared nor exclusive lock of
.Fa rw .
.El
+.Pp
+In addition, one of the following optional flags may be specified with
+.Dv RA_LOCKED ,
+.Dv RA_RLOCKED ,
+or
+.Dv RA_WLOCKED :
+.Bl -tag -width ".Dv RA_NOTRECURSED"
+.It Dv RA_RECURSED
+Assert that the current thread holds a recursive lock of
+.Fa rw .
+.It Dv RA_NOTRECURSED
+Assert that the current thread does not hold a recursive lock of
+.Fa rw .
+.El
.El
.Sh SEE ALSO
.Xr locking 9 ,
Modified: user/attilio/vmobj-readlock/share/mk/sys.mk
==============================================================================
--- user/attilio/vmobj-readlock/share/mk/sys.mk Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/share/mk/sys.mk Sun Jun 23 22:31:19 2013 (r252131)
@@ -332,10 +332,6 @@ SHELL= ${__MAKE_SHELL}
.SHELL: path=${__MAKE_SHELL}
.endif
-# Default executable format
-# XXX hint for bsd.port.mk
-OBJFORMAT?= elf
-
# Tell bmake to expand -V VAR by default
.MAKE.EXPAND_VARIABLES= yes
Modified: user/attilio/vmobj-readlock/sys/amd64/include/counter.h
==============================================================================
--- user/attilio/vmobj-readlock/sys/amd64/include/counter.h Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/amd64/include/counter.h Sun Jun 23 22:31:19 2013 (r252131)
@@ -44,7 +44,7 @@ counter_u64_add(counter_u64_t c, int64_t
__asm __volatile("addq\t%1,%%gs:(%0)"
:
- : "r" ((char *)c - (char *)&__pcpu[0]), "r" (inc)
+ : "r" ((char *)c - (char *)&__pcpu[0]), "ri" (inc)
: "memory", "cc");
}
Modified: user/attilio/vmobj-readlock/sys/cam/scsi/scsi_all.h
==============================================================================
--- user/attilio/vmobj-readlock/sys/cam/scsi/scsi_all.h Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/cam/scsi/scsi_all.h Sun Jun 23 22:31:19 2013 (r252131)
@@ -917,10 +917,10 @@ struct ata_pass_12 {
#define AP_PROTO_DMA_QUEUED (0x07 << 1)
#define AP_PROTO_DEVICE_DIAG (0x08 << 1)
#define AP_PROTO_DEVICE_RESET (0x09 << 1)
-#define AP_PROTO_UDMA_IN (0x10 << 1)
-#define AP_PROTO_UDMA_OUT (0x11 << 1)
-#define AP_PROTO_FPDMA (0x12 << 1)
-#define AP_PROTO_RESP_INFO (0x15 << 1)
+#define AP_PROTO_UDMA_IN (0x0a << 1)
+#define AP_PROTO_UDMA_OUT (0x0b << 1)
+#define AP_PROTO_FPDMA (0x0c << 1)
+#define AP_PROTO_RESP_INFO (0x0f << 1)
#define AP_MULTI 0xe0
u_int8_t flags;
#define AP_T_LEN 0x03
Modified: user/attilio/vmobj-readlock/sys/cddl/compat/opensolaris/sys/mutex.h
==============================================================================
--- user/attilio/vmobj-readlock/sys/cddl/compat/opensolaris/sys/mutex.h Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/cddl/compat/opensolaris/sys/mutex.h Sun Jun 23 22:31:19 2013 (r252131)
@@ -71,8 +71,7 @@ typedef struct sx kmutex_t;
#define mutex_tryenter(lock) sx_try_xlock(lock)
#define mutex_exit(lock) sx_xunlock(lock)
#define mutex_owned(lock) sx_xlocked(lock)
-/* TODO: Change to sx_xholder() once it is moved from kern_sx.c to sx.h. */
-#define mutex_owner(lock) ((lock)->sx_lock & SX_LOCK_SHARED ? NULL : (struct thread *)SX_OWNER((lock)->sx_lock))
+#define mutex_owner(lock) sx_xholder(lock)
#endif /* _KERNEL */
Modified: user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -1836,6 +1836,7 @@ vdev_dtl_sync(vdev_t *vd, uint64_t txg)
vdev_config_dirty(vd->vdev_top);
}
+ bzero(&smlock, sizeof (smlock));
mutex_init(&smlock, NULL, MUTEX_DEFAULT, NULL);
space_map_create(&smsync, sm->sm_start, sm->sm_size, sm->sm_shift,
Modified: user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -270,8 +270,7 @@ vdev_geom_read_config(struct g_consumer
continue;
if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE,
- &state) != 0 || state == POOL_STATE_DESTROYED ||
- state > POOL_STATE_L2CACHE) {
+ &state) != 0 || state > POOL_STATE_L2CACHE) {
nvlist_free(*config);
*config = NULL;
continue;
Modified: user/attilio/vmobj-readlock/sys/conf/files
==============================================================================
--- user/attilio/vmobj-readlock/sys/conf/files Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/conf/files Sun Jun 23 22:31:19 2013 (r252131)
@@ -2284,19 +2284,19 @@ dev/usb/net/uhso.c optional uhso
dev/usb/wlan/if_rum.c optional rum
dev/usb/wlan/if_run.c optional run
runfw.c optional runfw \
- compile-with "${AWK} -f $S/tools/fw_stub.awk runfw:runfw -mrunfw -c${.TARGET}" \
+ compile-with "${AWK} -f $S/tools/fw_stub.awk run.fw:runfw -mrunfw -c${.TARGET}" \
no-implicit-rule before-depend local \
clean "runfw.c"
runfw.fwo optional runfw \
- dependency "runfw" \
+ dependency "run.fw" \
compile-with "${NORMAL_FWO}" \
no-implicit-rule \
clean "runfw.fwo"
-runfw optional runfw \
+run.fw optional runfw \
dependency "$S/contrib/dev/run/rt2870.fw.uu" \
compile-with "${NORMAL_FW}" \
no-obj no-implicit-rule \
- clean "runfw"
+ clean "run.fw"
dev/usb/wlan/if_uath.c optional uath
dev/usb/wlan/if_upgt.c optional upgt
dev/usb/wlan/if_ural.c optional ural
Modified: user/attilio/vmobj-readlock/sys/dev/usb/serial/umcs.h
==============================================================================
--- user/attilio/vmobj-readlock/sys/dev/usb/serial/umcs.h Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/dev/usb/serial/umcs.h Sun Jun 23 22:31:19 2013 (r252131)
@@ -596,7 +596,7 @@
#define MCS7840_UART_LSR_RHROVERRUN 0x02 /* Data FIFO/register overflow */
#define MCS7840_UART_LSR_PARITYERR 0x04 /* Parity error */
#define MCS7840_UART_LSR_FRAMEERR 0x10 /* Framing error */
-#define MCS7840_UART_LSR_BREAKERR 0x20 /* BREAK sigmal received */
+#define MCS7840_UART_LSR_BREAKERR 0x20 /* BREAK signal received */
#define MCS7840_UART_LSR_THREMPTY 0x40 /* THR register is empty,
* ready for transmit */
#define MCS7840_UART_LSR_HASERR 0x80 /* Has error in receiver FIFO */
Modified: user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_alloc.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_alloc.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_alloc.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -165,7 +165,8 @@ ext2_reallocblks(struct vop_reallocblks_
struct ext2mount *ump;
struct cluster_save *buflist;
struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp;
- int32_t start_lbn, end_lbn, soff, newblk, blkno;
+ e2fs_lbn_t start_lbn, end_lbn;
+ int32_t soff, newblk, blkno;
int i, len, start_lvl, end_lvl, pref, ssize;
if (doreallocblks == 0)
@@ -550,7 +551,7 @@ ext2_dirpref(struct inode *pip)
* that will hold the pointer
*/
int32_t
-ext2_blkpref(struct inode *ip, int32_t lbn, int indx, int32_t *bap,
+ext2_blkpref(struct inode *ip, e2fs_lbn_t lbn, int indx, int32_t *bap,
int32_t blocknr)
{
int tmp;
Modified: user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_balloc.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_balloc.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_balloc.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -57,7 +57,7 @@
* the inode and the logical block number in a file.
*/
int
-ext2_balloc(struct inode *ip, int32_t lbn, int size, struct ucred *cred,
+ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size, struct ucred *cred,
struct buf **bpp, int flags)
{
struct m_ext2fs *fs;
Modified: user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_bmap.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_bmap.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_bmap.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -99,8 +99,8 @@ ext2_bmaparray(struct vnode *vp, int32_t
struct mount *mp;
struct vnode *devvp;
struct indir a[NIADDR+1], *ap;
- int32_t daddr;
- long metalbn;
+ daddr_t daddr;
+ e2fs_lbn_t metalbn;
int error, num, maxrun = 0, bsize;
int *nump;
@@ -241,7 +241,8 @@ ext2_bmaparray(struct vnode *vp, int32_t
int
ext2_getlbns(struct vnode *vp, int32_t bn, struct indir *ap, int *nump)
{
- long blockcnt, metalbn, realbn;
+ long blockcnt;
+ e2fs_lbn_t metalbn, realbn;
struct ext2mount *ump;
int i, numlevels, off;
int64_t qblockcnt;
Modified: user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_extern.h
==============================================================================
--- user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_extern.h Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_extern.h Sun Jun 23 22:31:19 2013 (r252131)
@@ -49,10 +49,10 @@ struct vnode;
int ext2_alloc(struct inode *,
int32_t, int32_t, int, struct ucred *, int32_t *);
int ext2_balloc(struct inode *,
- int32_t, int, struct ucred *, struct buf **, int);
+ e2fs_lbn_t, int, struct ucred *, struct buf **, int);
int ext2_blkatoff(struct vnode *, off_t, char **, struct buf **);
void ext2_blkfree(struct inode *, int32_t, long);
-int32_t ext2_blkpref(struct inode *, int32_t, int, int32_t *, int32_t);
+int32_t ext2_blkpref(struct inode *, e2fs_lbn_t, int, int32_t *, int32_t);
int ext2_bmap(struct vop_bmap_args *);
int ext2_bmaparray(struct vnode *, int32_t, int32_t *, int *, int *);
void ext2_clusteracct(struct m_ext2fs *, char *, int, daddr_t, int);
Modified: user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_subr.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_subr.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/fs/ext2fs/ext2_subr.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -68,7 +68,7 @@ ext2_blkatoff(struct vnode *vp, off_t of
struct inode *ip;
struct m_ext2fs *fs;
struct buf *bp;
- int32_t lbn;
+ e2fs_lbn_t lbn;
int bsize, error;
ip = VTOI(vp);
Modified: user/attilio/vmobj-readlock/sys/fs/ext2fs/fs.h
==============================================================================
--- user/attilio/vmobj-readlock/sys/fs/ext2fs/fs.h Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/fs/ext2fs/fs.h Sun Jun 23 22:31:19 2013 (r252131)
@@ -98,8 +98,8 @@
* Turn file system block numbers into disk block addresses.
* This maps file system blocks to device size blocks.
*/
-#define fsbtodb(fs, b) ((b) << ((fs)->e2fs_fsbtodb))
-#define dbtofsb(fs, b) ((b) >> ((fs)->e2fs_fsbtodb))
+#define fsbtodb(fs, b) ((daddr_t)(b) << (fs)->e2fs_fsbtodb)
+#define dbtofsb(fs, b) ((b) >> (fs)->e2fs_fsbtodb)
/* get group containing inode */
#define ino_to_cg(fs, x) (((x) - 1) / (fs->e2fs_ipg))
Modified: user/attilio/vmobj-readlock/sys/fs/ext2fs/inode.h
==============================================================================
--- user/attilio/vmobj-readlock/sys/fs/ext2fs/inode.h Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/fs/ext2fs/inode.h Sun Jun 23 22:31:19 2013 (r252131)
@@ -50,6 +50,11 @@
#define NIADDR 3 /* Indirect addresses in inode. */
/*
+ * The size of physical and logical block numbers and time fields in UFS.
+ */
+typedef int32_t e2fs_lbn_t;
+
+/*
* The inode is used to describe each active (or recently active) file in the
* EXT2FS filesystem. It is composed of two types of information. The first
* part is the information that is needed only while the file is active (such
@@ -148,7 +153,7 @@ struct inode {
* ext2_getlbns and used by truncate and bmap code.
*/
struct indir {
- int32_t in_lbn; /* Logical block number. */
+ e2fs_lbn_t in_lbn; /* Logical block number. */
int in_off; /* Offset in buffer. */
};
Modified: user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clbio.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clbio.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clbio.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -1372,9 +1372,16 @@ ncl_vinvalbuf(struct vnode *vp, int flag
goto out;
error = vinvalbuf(vp, flags, 0, slptimeo);
}
- if (NFSHASPNFS(nmp))
+ if (NFSHASPNFS(nmp)) {
nfscl_layoutcommit(vp, td);
- mtx_lock(&np->n_mtx);
+ /*
+ * Invalidate the attribute cache, since writes to a DS
+ * won't update the size attribute.
+ */
+ mtx_lock(&np->n_mtx);
+ np->n_attrstamp = 0;
+ } else
+ mtx_lock(&np->n_mtx);
if (np->n_directio_asyncwr == 0)
np->n_flag &= ~NMODIFIED;
mtx_unlock(&np->n_mtx);
@@ -1555,6 +1562,13 @@ ncl_doio_directwrite(struct buf *bp)
if ((bp->b_flags & B_DIRECT) && bp->b_iocmd == BIO_WRITE) {
struct nfsnode *np = VTONFS(bp->b_vp);
mtx_lock(&np->n_mtx);
+ if (NFSHASPNFS(VFSTONFS(vnode_mount(bp->b_vp)))) {
+ /*
+ * Invalidate the attribute cache, since writes to a DS
+ * won't update the size attribute.
+ */
+ np->n_attrstamp = 0;
+ }
np->n_directio_asyncwr--;
if (np->n_directio_asyncwr == 0) {
np->n_flag &= ~NMODIFIED;
Modified: user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clstate.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clstate.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -5145,16 +5145,26 @@ static void
nfscl_dolayoutcommit(struct nfsmount *nmp, struct nfscllayout *lyp,
struct ucred *cred, NFSPROC_T *p)
{
+ struct nfsclflayout *flp;
+ uint64_t len;
int error;
- error = nfsrpc_layoutcommit(nmp, lyp->nfsly_fh, lyp->nfsly_fhlen,
- 0, 0, 0, lyp->nfsly_lastbyte, &lyp->nfsly_stateid,
- NFSLAYOUT_NFSV4_1_FILES, 0, NULL, cred, p, NULL);
- if (error == NFSERR_NOTSUPP) {
- /* If the server doesn't want it, don't bother doing it. */
- NFSLOCKMNT(nmp);
- nmp->nm_state |= NFSSTA_NOLAYOUTCOMMIT;
- NFSUNLOCKMNT(nmp);
+ LIST_FOREACH(flp, &lyp->nfsly_flayrw, nfsfl_list) {
+ if (flp->nfsfl_off <= lyp->nfsly_lastbyte) {
+ len = flp->nfsfl_end - flp->nfsfl_off;
+ error = nfsrpc_layoutcommit(nmp, lyp->nfsly_fh,
+ lyp->nfsly_fhlen, 0, flp->nfsfl_off, len,
+ lyp->nfsly_lastbyte, &lyp->nfsly_stateid,
+ NFSLAYOUT_NFSV4_1_FILES, 0, NULL, cred, p, NULL);
+ NFSCL_DEBUG(4, "layoutcommit err=%d\n", error);
+ if (error == NFSERR_NOTSUPP) {
+ /* If not supported, don't bother doing it. */
+ NFSLOCKMNT(nmp);
+ nmp->nm_state |= NFSSTA_NOLAYOUTCOMMIT;
+ NFSUNLOCKMNT(nmp);
+ break;
+ }
+ }
}
}
Modified: user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clvfsops.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clvfsops.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -592,12 +592,6 @@ nfs_decode_args(struct mount *mp, struct
nmp->nm_flag &= ~NFSMNT_RDIRPLUS;
}
- /* Clear NFSMNT_RESVPORT for NFSv4, since it is not required. */
- if ((argp->flags & NFSMNT_NFSV4) != 0) {
- argp->flags &= ~NFSMNT_RESVPORT;
- nmp->nm_flag &= ~NFSMNT_RESVPORT;
- }
-
/* Re-bind if rsrvd port requested and wasn't on one */
adjsock = !(nmp->nm_flag & NFSMNT_RESVPORT)
&& (argp->flags & NFSMNT_RESVPORT);
Modified: user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clvnops.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/fs/nfsclient/nfs_clvnops.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -2951,9 +2951,16 @@ loop:
mtx_unlock(&np->n_mtx);
} else
BO_UNLOCK(bo);
- if (NFSHASPNFS(nmp))
+ if (NFSHASPNFS(nmp)) {
nfscl_layoutcommit(vp, td);
- mtx_lock(&np->n_mtx);
+ /*
+ * Invalidate the attribute cache, since writes to a DS
+ * won't update the size attribute.
+ */
+ mtx_lock(&np->n_mtx);
+ np->n_attrstamp = 0;
+ } else
+ mtx_lock(&np->n_mtx);
if (np->n_flag & NWRITEERR) {
error = np->n_error;
np->n_flag &= ~NWRITEERR;
Modified: user/attilio/vmobj-readlock/sys/modules/runfw/Makefile
==============================================================================
--- user/attilio/vmobj-readlock/sys/modules/runfw/Makefile Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/modules/runfw/Makefile Sun Jun 23 22:31:19 2013 (r252131)
@@ -1,11 +1,11 @@
# $FreeBSD$
KMOD= runfw
-FIRMWS= runfw:runfw:1
+FIRMWS= run.fw:runfw:1
-CLEANFILES= runfw
+CLEANFILES= run.fw
-runfw: ${.CURDIR}/../../contrib/dev/run/rt2870.fw.uu
+run.fw: ${.CURDIR}/../../contrib/dev/run/rt2870.fw.uu
uudecode -p ${.CURDIR}/../../contrib/dev/run/rt2870.fw.uu > ${.TARGET}
.include <bsd.kmod.mk>
Modified: user/attilio/vmobj-readlock/sys/netinet/ip_input.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/netinet/ip_input.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/netinet/ip_input.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -283,14 +283,14 @@ void
kmod_ipstat_inc(int statnum)
{
- counter_u64_add((counter_u64_t )&V_ipstatp + statnum, 1);
+ counter_u64_add(*((counter_u64_t *)&V_ipstatp + statnum), 1);
}
void
kmod_ipstat_dec(int statnum)
{
- counter_u64_add((counter_u64_t )&V_ipstatp + statnum, -1);
+ counter_u64_add(*((counter_u64_t *)&V_ipstatp + statnum), -1);
}
static int
Modified: user/attilio/vmobj-readlock/sys/netinet/tcp_input.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/netinet/tcp_input.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/netinet/tcp_input.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -309,7 +309,7 @@ void
kmod_tcpstat_inc(int statnum)
{
- counter_u64_add((counter_u64_t )&V_tcpstatp + statnum, 1);
+ counter_u64_add(*((counter_u64_t *)&V_tcpstatp + statnum), 1);
}
/*
Modified: user/attilio/vmobj-readlock/sys/powerpc/ofw/ofw_cpu.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/powerpc/ofw/ofw_cpu.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/powerpc/ofw/ofw_cpu.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -133,6 +133,11 @@ static int ofw_cpu_attach(device_t);
static int ofw_cpu_read_ivar(device_t dev, device_t child, int index,
uintptr_t *result);
+struct ofw_cpu_softc {
+ struct pcpu *sc_cpu_pcpu;
+ uint32_t sc_nominal_mhz;
+};
+
static device_method_t ofw_cpu_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ofw_cpu_probe),
@@ -175,6 +180,15 @@ ofw_cpu_probe(device_t dev)
static int
ofw_cpu_attach(device_t dev)
{
+ struct ofw_cpu_softc *sc;
+ uint32_t cell;
+
+ sc = device_get_softc(dev);
+ OF_getprop(ofw_bus_get_node(dev), "reg", &cell, sizeof(cell));
+ sc->sc_cpu_pcpu = pcpu_find(cell);
+ OF_getprop(ofw_bus_get_node(dev), "clock-frequency", &cell, sizeof(cell));
+ sc->sc_nominal_mhz = cell / 1000000; /* convert to MHz */
+
bus_generic_probe(dev);
return (bus_generic_attach(dev));
}
@@ -182,19 +196,16 @@ ofw_cpu_attach(device_t dev)
static int
ofw_cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result)
{
- uint32_t cell;
+ struct ofw_cpu_softc *sc;
+
+ sc = device_get_softc(dev);
switch (index) {
case CPU_IVAR_PCPU:
- OF_getprop(ofw_bus_get_node(dev), "reg", &cell, sizeof(cell));
- *result = (uintptr_t)(pcpu_find(cell));
+ *result = (uintptr_t)sc->sc_cpu_pcpu;
return (0);
case CPU_IVAR_NOMINAL_MHZ:
- cell = 0;
- OF_getprop(ofw_bus_get_node(dev), "clock-frequency",
- &cell, sizeof(cell));
- cell /= 1000000; /* convert to MHz */
- *result = (uintptr_t)(cell);
+ *result = (uintptr_t)sc->sc_nominal_mhz;
return (0);
}
Modified: user/attilio/vmobj-readlock/sys/vm/uma.h
==============================================================================
--- user/attilio/vmobj-readlock/sys/vm/uma.h Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/vm/uma.h Sun Jun 23 22:31:19 2013 (r252131)
@@ -234,7 +234,7 @@ int uma_zsecond_add(uma_zone_t zone, uma
* zones. The 'arg' parameter is passed to import/release and is caller
* specific.
*/
-uma_zone_t uma_zcache_create(char *name, uma_ctor ctor, uma_dtor dtor,
+uma_zone_t uma_zcache_create(char *name, int size, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_import zimport,
uma_release zrelease, void *arg, int flags);
Modified: user/attilio/vmobj-readlock/sys/vm/uma_core.c
==============================================================================
--- user/attilio/vmobj-readlock/sys/vm/uma_core.c Sun Jun 23 22:27:57 2013 (r252130)
+++ user/attilio/vmobj-readlock/sys/vm/uma_core.c Sun Jun 23 22:31:19 2013 (r252131)
@@ -246,8 +246,8 @@ static void *zone_alloc_item(uma_zone_t,
static void zone_free_item(uma_zone_t, void *, void *, enum zfreeskip);
static void bucket_enable(void);
static void bucket_init(void);
-static uma_bucket_t bucket_alloc(int, int);
-static void bucket_free(uma_bucket_t);
+static uma_bucket_t bucket_alloc(uma_zone_t zone, int);
+static void bucket_free(uma_zone_t zone, uma_bucket_t);
static void bucket_zone_drain(void);
static uma_bucket_t zone_alloc_bucket(uma_zone_t zone, int flags);
static uma_slab_t zone_fetch_slab(uma_zone_t zone, uma_keg_t last, int flags);
@@ -256,8 +256,6 @@ static void *slab_alloc_item(uma_keg_t k
static void slab_free_item(uma_keg_t keg, uma_slab_t slab, void *item);
static uma_keg_t uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit,
uma_fini fini, int align, uint32_t flags);
-static inline void zone_relock(uma_zone_t zone, uma_keg_t keg);
-static inline void keg_relock(uma_keg_t keg, uma_zone_t zone);
static int zone_import(uma_zone_t zone, void **bucket, int max, int flags);
static void zone_release(uma_zone_t zone, void **bucket, int cnt);
@@ -352,7 +350,7 @@ bucket_select(int size)
}
static uma_bucket_t
-bucket_alloc(int entries, int bflags)
+bucket_alloc(uma_zone_t zone, int flags)
{
struct uma_bucket_zone *ubz;
uma_bucket_t bucket;
@@ -366,8 +364,10 @@ bucket_alloc(int entries, int bflags)
if (bucketdisable)
return (NULL);
- ubz = bucket_zone_lookup(entries);
- bucket = uma_zalloc(ubz->ubz_zone, bflags);
+ if (zone->uz_flags & UMA_ZFLAG_CACHEONLY)
+ flags |= M_NOVM;
+ ubz = bucket_zone_lookup(zone->uz_count);
+ bucket = uma_zalloc(ubz->ubz_zone, flags);
if (bucket) {
#ifdef INVARIANTS
bzero(bucket->ub_bucket, sizeof(void *) * ubz->ubz_entries);
@@ -380,7 +380,7 @@ bucket_alloc(int entries, int bflags)
}
static void
-bucket_free(uma_bucket_t bucket)
+bucket_free(uma_zone_t zone, uma_bucket_t bucket)
{
struct uma_bucket_zone *ubz;
@@ -662,9 +662,9 @@ cache_drain(uma_zone_t zone)
bucket_drain(zone, cache->uc_allocbucket);
bucket_drain(zone, cache->uc_freebucket);
if (cache->uc_allocbucket != NULL)
- bucket_free(cache->uc_allocbucket);
+ bucket_free(zone, cache->uc_allocbucket);
if (cache->uc_freebucket != NULL)
- bucket_free(cache->uc_freebucket);
+ bucket_free(zone, cache->uc_freebucket);
cache->uc_allocbucket = cache->uc_freebucket = NULL;
}
ZONE_LOCK(zone);
@@ -688,7 +688,7 @@ bucket_cache_drain(uma_zone_t zone)
LIST_REMOVE(bucket, ub_link);
ZONE_UNLOCK(zone);
bucket_drain(zone, bucket);
- bucket_free(bucket);
+ bucket_free(zone, bucket);
ZONE_LOCK(zone);
}
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-user
mailing list