diff options
| author | Keith M Wesolowski <wesolows@foobazco.org> | 2013-08-24 00:09:05 +0000 |
|---|---|---|
| committer | Keith M Wesolowski <wesolows@foobazco.org> | 2013-08-24 00:09:05 +0000 |
| commit | 241ad8432452015cc2cfbc85f2c132ba281449cc (patch) | |
| tree | a54f09cdca56637b173ad842278e1d2b5d4498ad /usr/src | |
| parent | d52d689c764b76be70d1d9f8ccc7ad906acf9a1a (diff) | |
| parent | 9edf9ebd727ac2046be0269a5e275785e2131bcb (diff) | |
| download | illumos-joyent-241ad8432452015cc2cfbc85f2c132ba281449cc.tar.gz | |
[illumos-gate merge]
commit 9edf9ebd727ac2046be0269a5e275785e2131bcb
1765 assert triggered in libzfs_import.c trying to import pool name beginning with a number
commit 810e43b2eb0e320833671a403fdda51917e8b036
2932 support crash dumps to raidz, etc. pools
commit 1b3b16f35bee1ffc210591d82bca6adf247954b0
3785 Implement MAP_32BIT flag to mmap()
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/cmd/truss/print.c | 4 | ||||
| -rw-r--r-- | usr/src/cmd/zpool/zpool_main.c | 6 | ||||
| -rw-r--r-- | usr/src/common/zfs/zfeature_common.c | 2 | ||||
| -rw-r--r-- | usr/src/common/zfs/zfeature_common.h | 2 | ||||
| -rw-r--r-- | usr/src/common/zfs/zfs_prop.c | 2 | ||||
| -rw-r--r-- | usr/src/lib/libzfs/common/libzfs_pool.c | 2 | ||||
| -rw-r--r-- | usr/src/man/man1m/zfs.1m | 6 | ||||
| -rw-r--r-- | usr/src/man/man2/mmap.2 | 17 | ||||
| -rw-r--r-- | usr/src/man/man5/zpool-features.5 | 1 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/zfs/dmu.c | 4 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/zfs/sys/vdev_disk.h | 2 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/zfs/sys/vdev_raidz.h | 2 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/zfs/sys/zio.h | 1 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/zfs/vdev_disk.c | 22 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/zfs/vdev_raidz.c | 4 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/zfs/zio_checksum.c | 2 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/zfs/zvol.c | 3 | ||||
| -rw-r--r-- | usr/src/uts/common/os/grow.c | 6 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/mman.h | 5 |
19 files changed, 70 insertions, 23 deletions
diff --git a/usr/src/cmd/truss/print.c b/usr/src/cmd/truss/print.c index 717a932056..f6e4fd0bb8 100644 --- a/usr/src/cmd/truss/print.c +++ b/usr/src/cmd/truss/print.c @@ -735,7 +735,7 @@ mmap_type(private_t *pri, long arg) arg &= ~(_MAP_NEW|MAP_TYPE); if (arg & ~(MAP_FIXED|MAP_RENAME|MAP_NORESERVE|MAP_ANON|MAP_ALIGN| - MAP_TEXT|MAP_INITDATA)) + MAP_TEXT|MAP_INITDATA|MAP_32BIT)) (void) snprintf(str + used, sizeof (pri->code_buf) - used, "|0x%lX", arg); else { @@ -753,6 +753,8 @@ mmap_type(private_t *pri, long arg) (void) strlcat(str, "|MAP_TEXT", CBSIZE); if (arg & MAP_INITDATA) (void) strlcat(str, "|MAP_INITDATA", CBSIZE); + if (arg & MAP_32BIT) + (void) strlcat(str, "|MAP_32BIT", CBSIZE); } return ((const char *)str); diff --git a/usr/src/cmd/zpool/zpool_main.c b/usr/src/cmd/zpool/zpool_main.c index 7a133bf27e..d78d78dd57 100644 --- a/usr/src/cmd/zpool/zpool_main.c +++ b/usr/src/cmd/zpool/zpool_main.c @@ -24,7 +24,7 @@ * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2012 by Frederik Wessels. All rights reserved. - * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2013 by Prasad Joshi (sTec). All rights reserved. */ #include <assert.h> @@ -1989,8 +1989,10 @@ zpool_do_import(int argc, char **argv) errno = 0; searchguid = strtoull(argv[0], &endptr, 10); - if (errno != 0 || *endptr != '\0') + if (errno != 0 || *endptr != '\0') { searchname = argv[0]; + searchguid = 0; + } found_config = NULL; /* diff --git a/usr/src/common/zfs/zfeature_common.c b/usr/src/common/zfs/zfeature_common.c index 6783269098..311c594ff8 100644 --- a/usr/src/common/zfs/zfeature_common.c +++ b/usr/src/common/zfs/zfeature_common.c @@ -22,7 +22,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. - * Copyright (c) 2013 Joyent, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifdef _KERNEL diff --git a/usr/src/common/zfs/zfeature_common.h b/usr/src/common/zfs/zfeature_common.h index b056fb29f8..eef81862d5 100644 --- a/usr/src/common/zfs/zfeature_common.h +++ b/usr/src/common/zfs/zfeature_common.h @@ -22,7 +22,7 @@ /* * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. - * Copyright (c) 2013 Joyent, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifndef _ZFEATURE_COMMON_H diff --git a/usr/src/common/zfs/zfs_prop.c b/usr/src/common/zfs/zfs_prop.c index 0cc53595f0..6441290178 100644 --- a/usr/src/common/zfs/zfs_prop.c +++ b/usr/src/common/zfs/zfs_prop.c @@ -22,7 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. - * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ diff --git a/usr/src/lib/libzfs/common/libzfs_pool.c b/usr/src/lib/libzfs/common/libzfs_pool.c index 0fd5f5738c..52050ff74e 100644 --- a/usr/src/lib/libzfs/common/libzfs_pool.c +++ b/usr/src/lib/libzfs/common/libzfs_pool.c @@ -23,7 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. - * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include <ctype.h> diff --git a/usr/src/man/man1m/zfs.1m b/usr/src/man/man1m/zfs.1m index e3c40485d9..7445ca05dc 100644 --- a/usr/src/man/man1m/zfs.1m +++ b/usr/src/man/man1m/zfs.1m @@ -23,9 +23,9 @@ .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright (c) 2012 by Delphix. All rights reserved. -.\" Copyright (c) 2012, Joyent, Inc. All rights reserved. .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. .\" Copyright 2013 Nexenta Systems, Inc. All Rights Reserved. +.\" Copyright (c) 2013, Joyent, Inc. All rights reserved. .\" .TH ZFS 1M "Jan 26, 2013" .SH NAME @@ -933,14 +933,14 @@ This property is not inherited. .sp .ne 2 .na -\fB\fBchecksum\fR=\fBon\fR | \fBoff\fR | \fBfletcher2,\fR| \fBfletcher4\fR | +\fB\fBchecksum\fR=\fBon\fR | \fBoff\fR | \fBfletcher2\fR | \fBfletcher4\fR | \fBsha256\fR | \fBnoparity\fR \fR .ad .sp .6 .RS 4n Controls the checksum used to verify data integrity. The default value is \fBon\fR, which automatically selects an appropriate algorithm (currently, -\fBfletcher2\fR, but this may change in future releases). The value \fBoff\fR +\fBfletcher4\fR, but this may change in future releases). The value \fBoff\fR disables integrity checking on user data. The value \fBnoparity\fR not only disables integrity but also disables maintaining parity for user data. This setting is used internally by a dump device residing on a RAID-Z pool and should diff --git a/usr/src/man/man2/mmap.2 b/usr/src/man/man2/mmap.2 index 2c10a4aa78..c32b561a73 100644 --- a/usr/src/man/man2/mmap.2 +++ b/usr/src/man/man2/mmap.2 @@ -1,4 +1,5 @@ '\" te +.\" Copyright 2013 OmniTI Computer Consulting, Inc. All Rights Reserved. .\" Copyright 1989 AT&T. Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved. Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at .\" http://www.opengroup.org/bookstore/. @@ -203,6 +204,15 @@ Map initialized data segment. .RE .sp +.ne 2 +.na +\fB\fBMAP_32BIT\fR\fR +.ad +.RS 17n +Map to the lower 32 bits of address space. +.RE + +.sp .LP The \fBMAP_SHARED\fR and \fBMAP_PRIVATE\fR options describe the disposition of write references to the underlying object. If \fBMAP_SHARED\fR is specified, @@ -288,6 +298,13 @@ the system can choose a mapping size larger than the page size returned by dynamic linker for mapping initialized data of shared objects. .sp .LP +The \fBMAP_32BIT\fR option informs the system that the search space for +mapping assignment should be limited to the first 32 bits (4 Gbytes) of the +caller's address space. This flag is accepted in both 32-bit and 64-bit +process models, but does not alter the mapping strategy when used in a +32-bit process model. +.sp +.LP The \fIoff\fR argument is constrained to be aligned and sized according to the value returned by \fBsysconf()\fR when passed \fB_SC_PAGESIZE\fR or \fB_SC_PAGE_SIZE\fR. When \fBMAP_FIXED\fR is specified, the \fIaddr\fR argument diff --git a/usr/src/man/man5/zpool-features.5 b/usr/src/man/man5/zpool-features.5 index 23cd026ab3..4575431325 100644 --- a/usr/src/man/man5/zpool-features.5 +++ b/usr/src/man/man5/zpool-features.5 @@ -1,6 +1,7 @@ '\" te .\" Copyright (c) 2012 by Delphix. All rights reserved. .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. +.\" Copyright (c) 2013, Joyent, Inc. All rights reserved. .\" The contents of this file are subject to the terms of the Common Development .\" and Distribution License (the "License"). You may not use this file except .\" in compliance with the License. You can obtain a copy of the license at diff --git a/usr/src/uts/common/fs/zfs/dmu.c b/usr/src/uts/common/fs/zfs/dmu.c index e9e7e9b237..c5971b7077 100644 --- a/usr/src/uts/common/fs/zfs/dmu.c +++ b/usr/src/uts/common/fs/zfs/dmu.c @@ -23,8 +23,8 @@ * Copyright 2011, Joyent, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. */ - /* Copyright (c) 2013 by Saso Kiselkov. All rights reserved. */ +/* Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include <sys/dmu.h> #include <sys/dmu_impl.h> @@ -1599,7 +1599,7 @@ dmu_write_policy(objset_t *os, dnode_t *dn, int level, int wp, zio_prop_t *zp) * pipeline. */ compress = ZIO_COMPRESS_OFF; - checksum = ZIO_CHECKSUM_OFF; + checksum = ZIO_CHECKSUM_NOPARITY; } else { compress = zio_compress_select(dn->dn_compress, compress); diff --git a/usr/src/uts/common/fs/zfs/sys/vdev_disk.h b/usr/src/uts/common/fs/zfs/sys/vdev_disk.h index b2fa0a0da4..61e2f273f0 100644 --- a/usr/src/uts/common/fs/zfs/sys/vdev_disk.h +++ b/usr/src/uts/common/fs/zfs/sys/vdev_disk.h @@ -21,7 +21,7 @@ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. - * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2013 Joyent, Inc. All rights reserved. * Copyright 2012 Nexenta Systems, Inc. All rights reserved. */ diff --git a/usr/src/uts/common/fs/zfs/sys/vdev_raidz.h b/usr/src/uts/common/fs/zfs/sys/vdev_raidz.h index 7e75050f3e..579d272cdf 100644 --- a/usr/src/uts/common/fs/zfs/sys/vdev_raidz.h +++ b/usr/src/uts/common/fs/zfs/sys/vdev_raidz.h @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2013 Joyent, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifndef _SYS_VDEV_RAIDZ_H diff --git a/usr/src/uts/common/fs/zfs/sys/zio.h b/usr/src/uts/common/fs/zfs/sys/zio.h index 6bd9830687..f19e061f35 100644 --- a/usr/src/uts/common/fs/zfs/sys/zio.h +++ b/usr/src/uts/common/fs/zfs/sys/zio.h @@ -25,6 +25,7 @@ * Copyright 2011 Joyent, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifndef _ZIO_H diff --git a/usr/src/uts/common/fs/zfs/vdev_disk.c b/usr/src/uts/common/fs/zfs/vdev_disk.c index 7436f2a577..a6f26dd9ec 100644 --- a/usr/src/uts/common/fs/zfs/vdev_disk.c +++ b/usr/src/uts/common/fs/zfs/vdev_disk.c @@ -23,6 +23,7 @@ * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright 2013 Joyent, Inc. All rights reserved. */ #include <sys/zfs_context.h> @@ -657,6 +658,27 @@ vdev_disk_physio(vdev_t *vd, caddr_t data, } int +vdev_disk_physio(vdev_t *vd, caddr_t data, + size_t size, uint64_t offset, int flags, boolean_t isdump) +{ + vdev_disk_t *dvd = vd->vdev_tsd; + + ASSERT(vd->vdev_ops == &vdev_disk_ops); + + /* + * If in the context of an active crash dump, use the ldi_dump(9F) + * call instead of ldi_strategy(9F) as usual. + */ + if (isdump) { + ASSERT3P(dvd, !=, NULL); + return (ldi_dump(dvd->vd_lh, data, lbtodb(offset), + lbtodb(size))); + } + + return (vdev_disk_ldi_physio(dvd->vd_lh, data, size, offset, flags)); +} + +int vdev_disk_ldi_physio(ldi_handle_t vd_lh, caddr_t data, size_t size, uint64_t offset, int flags) { diff --git a/usr/src/uts/common/fs/zfs/vdev_raidz.c b/usr/src/uts/common/fs/zfs/vdev_raidz.c index 8944fca2a1..190e911fa6 100644 --- a/usr/src/uts/common/fs/zfs/vdev_raidz.c +++ b/usr/src/uts/common/fs/zfs/vdev_raidz.c @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. - * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include <sys/zfs_context.h> @@ -1559,7 +1559,7 @@ vdev_raidz_close(vdev_t *vd) * vdev_raidz_physio(data, size: 32 KB, offset: 64 KB) * * Unlike the normal RAID-Z case in which the block is allocated based on the - * I/O size, reads and writes here always use a 128 KB logical I/O size. If the + * I/O size, reads and writes here always use a 128 KB logical I/O size. If the * I/O size is less than 128 KB, only the actual portions of data are written. * In this example the data is written to the third data vdev since that vdev * contains the offset [64 KB, 96 KB). diff --git a/usr/src/uts/common/fs/zfs/zio_checksum.c b/usr/src/uts/common/fs/zfs/zio_checksum.c index 72bf9ac949..d1c60c3ffa 100644 --- a/usr/src/uts/common/fs/zfs/zio_checksum.c +++ b/usr/src/uts/common/fs/zfs/zio_checksum.c @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. - * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #include <sys/zfs_context.h> diff --git a/usr/src/uts/common/fs/zfs/zvol.c b/usr/src/uts/common/fs/zfs/zvol.c index 6e828e8496..f2cd5b0261 100644 --- a/usr/src/uts/common/fs/zfs/zvol.c +++ b/usr/src/uts/common/fs/zfs/zvol.c @@ -1130,7 +1130,7 @@ zvol_dumpio_vdev(vdev_t *vd, void *addr, uint64_t offset, uint64_t origoffset, } if (!vd->vdev_ops->vdev_op_leaf && vd->vdev_ops != &vdev_raidz_ops) - return (numerrors < vd->vdev_children ? 0 : SET_ERROR(EIO)); + return (numerrors < vd->vdev_children ? 0 : EIO); if (doread && !vdev_readable(vd)) return (SET_ERROR(EIO)); @@ -1155,7 +1155,6 @@ zvol_dumpio_vdev(vdev_t *vd, void *addr, uint64_t offset, uint64_t origoffset, } else { dvd = vd->vdev_tsd; ASSERT3P(dvd, !=, NULL); - return (vdev_disk_ldi_physio(dvd->vd_lh, addr, size, offset, doread ? B_READ : B_WRITE)); } diff --git a/usr/src/uts/common/os/grow.c b/usr/src/uts/common/os/grow.c index c08ea0d424..f5e92cfd94 100644 --- a/usr/src/uts/common/os/grow.c +++ b/usr/src/uts/common/os/grow.c @@ -19,6 +19,8 @@ * CDDL HEADER END */ +/* Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved. */ + /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. @@ -814,9 +816,7 @@ smmap64(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos) struct file *fp; int error; - if (flags & _MAP_LOW32) - error = EINVAL; - else if (fd == -1 && (flags & MAP_ANON) != 0) + if (fd == -1 && (flags & MAP_ANON) != 0) error = smmap_common(&addr, len, prot, flags, NULL, (offset_t)pos); else if ((fp = getf(fd)) != NULL) { diff --git a/usr/src/uts/common/sys/mman.h b/usr/src/uts/common/sys/mman.h index 82344607b0..ae2f5fb1bf 100644 --- a/usr/src/uts/common/sys/mman.h +++ b/usr/src/uts/common/sys/mman.h @@ -19,6 +19,7 @@ * CDDL HEADER END */ +/* Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved. */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. @@ -105,9 +106,11 @@ extern "C" { #if (_POSIX_C_SOURCE <= 2) || defined(_XPG4_2) #ifdef _KERNEL #define PROT_EXCL 0x20 -#define _MAP_LOW32 0x80 /* force mapping in lower 4G of address space */ #endif /* _KERNEL */ +#define _MAP_LOW32 0x80 /* force mapping in lower 4G of address space */ +#define MAP_32BIT _MAP_LOW32 + /* * For the sake of backward object compatibility, we use the _MAP_NEW flag. * This flag will be automatically or'ed in by the C library for all |
