diff options
author | Keith M Wesolowski <wesolows@foobazco.org> | 2013-11-14 20:36:57 +0000 |
---|---|---|
committer | Keith M Wesolowski <wesolows@foobazco.org> | 2013-11-14 20:36:59 +0000 |
commit | 28a9ae953803c70b2fa4fdaab7e4ba587410fed3 (patch) | |
tree | 013707f575f4686dfb08bdad49e23d93d1b561e9 | |
parent | 6ceaa685d1a28f3117f896eb473fa3d80a347e85 (diff) | |
parent | 97adda444bedd8afa322c1d2233957d40bc8e35c (diff) | |
download | illumos-joyent-28a9ae953803c70b2fa4fdaab7e4ba587410fed3.tar.gz |
[illumos-gate merge]
commit 97adda444bedd8afa322c1d2233957d40bc8e35c
4226 mountd(1m) could run out of file descriptors
commit 7140fde549ff65142379ea6e25e6276552e22f3f
4307 Variable is used before it is initialized in kwarndtest.c
commit 43d68d68c1ce08fb35026bebfb141af422e7082e
2583 Add -p (parsable) option to zfs list
Conflicts:
usr/src/cmd/zfs/zfs_main.c
usr/src/cmd/fs.d/nfs/mountd/mountd.c
-rw-r--r-- | usr/src/cmd/fs.d/nfs/lib/nfs_sec.c | 18 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/nfs/mountd/mountd.c | 15 | ||||
-rw-r--r-- | usr/src/cmd/krb5/kwarn/kwarndtest.c | 29 | ||||
-rw-r--r-- | usr/src/cmd/zfs/zfs_iter.c | 5 | ||||
-rw-r--r-- | usr/src/cmd/zfs/zfs_iter.h | 3 | ||||
-rw-r--r-- | usr/src/cmd/zfs/zfs_main.c | 71 | ||||
-rw-r--r-- | usr/src/lib/libzfs/common/libzfs.h | 5 | ||||
-rw-r--r-- | usr/src/lib/libzfs/common/libzfs_dataset.c | 13 | ||||
-rw-r--r-- | usr/src/man/man1m/zfs.1m | 30 |
9 files changed, 104 insertions, 85 deletions
diff --git a/usr/src/cmd/fs.d/nfs/lib/nfs_sec.c b/usr/src/cmd/fs.d/nfs/lib/nfs_sec.c index c4bd67232c..db163a9d93 100644 --- a/usr/src/cmd/fs.d/nfs/lib/nfs_sec.c +++ b/usr/src/cmd/fs.d/nfs/lib/nfs_sec.c @@ -24,6 +24,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + */ /* * nfs security related library routines. @@ -68,6 +71,7 @@ static struct sc_data sc_service[] = { NULL, SC_FAILURE }; +static mutex_t matching_lock = DEFAULTMUTEX; static char *gettoken(char *, int); extern int atoi(const char *str); @@ -354,15 +358,15 @@ nfs_get_qop_name(seconfig_t *entryp) { char *tok; /* holds a token from the line */ char *secname, *gss_qop = NULL; /* pointer to a secmode name */ - static mutex_t matching_lock = DEFAULTMUTEX; char line[BUFSIZ]; /* holds each line of NFSSEC_CONF */ FILE *fp; /* file stream for NFSSEC_CONF */ + (void) mutex_lock(&matching_lock); if ((fp = fopen(NFSSEC_CONF, "r")) == NULL) { + (void) mutex_unlock(&matching_lock); return (NULL); } - (void) mutex_lock(&matching_lock); while (fgets(line, BUFSIZ, fp)) { if (!(blank(line) || comment(line))) { if ((secname = gettoken(line, FALSE)) == NULL) { @@ -389,8 +393,8 @@ nfs_get_qop_name(seconfig_t *entryp) } } err: - (void) mutex_unlock(&matching_lock); (void) fclose(fp); + (void) mutex_unlock(&matching_lock); return (gss_qop); } @@ -698,18 +702,18 @@ static int get_seconfig(int whichway, char *name, int num, rpc_gss_service_t service, seconfig_t *entryp) { - static mutex_t matching_lock = DEFAULTMUTEX; char line[BUFSIZ]; /* holds each line of NFSSEC_CONF */ FILE *fp; /* file stream for NFSSEC_CONF */ if ((whichway == GETBYNAME) && (name == NULL)) return (SC_NOTFOUND); + (void) mutex_lock(&matching_lock); if ((fp = fopen(NFSSEC_CONF, "r")) == NULL) { + (void) mutex_unlock(&matching_lock); return (SC_OPENFAIL); } - (void) mutex_lock(&matching_lock); while (fgets(line, BUFSIZ, fp)) { if (!(blank(line) || comment(line))) { switch (whichway) { @@ -730,13 +734,13 @@ get_seconfig(int whichway, char *name, int num, } } } - (void) mutex_unlock(&matching_lock); (void) fclose(fp); + (void) mutex_unlock(&matching_lock); return (SC_NOTFOUND); found: - (void) mutex_unlock(&matching_lock); (void) fclose(fp); + (void) mutex_unlock(&matching_lock); (void) get_rpcnum(entryp); return (SC_NOERROR); } diff --git a/usr/src/cmd/fs.d/nfs/mountd/mountd.c b/usr/src/cmd/fs.d/nfs/mountd/mountd.c index 241ed293f8..4f2fd66a9e 100644 --- a/usr/src/cmd/fs.d/nfs/mountd/mountd.c +++ b/usr/src/cmd/fs.d/nfs/mountd/mountd.c @@ -19,7 +19,7 @@ * CDDL HEADER END * * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. * Copyright 2012 Joyent, Inc. All rights reserved. */ @@ -32,6 +32,7 @@ */ #include <stdio.h> +#include <stdio_ext.h> #include <stdlib.h> #include <ctype.h> #include <sys/types.h> @@ -50,6 +51,7 @@ #include <sys/systeminfo.h> #include <sys/utsname.h> #include <sys/wait.h> +#include <sys/resource.h> #include <signal.h> #include <locale.h> #include <unistd.h> @@ -365,6 +367,7 @@ main(int argc, char *argv[]) long thr_flags = (THR_NEW_LWP|THR_DAEMON); char defval[4]; int defvers, ret, bufsz; + struct rlimit rl; int pipe_fd = -1; @@ -398,6 +401,16 @@ main(int argc, char *argv[]) exit(1); } + if (getrlimit(RLIMIT_NOFILE, &rl) != 0) { + syslog(LOG_ERR, "getrlimit failed"); + } else { + rl.rlim_cur = rl.rlim_max; + if (setrlimit(RLIMIT_NOFILE, &rl) != 0) + syslog(LOG_ERR, "setrlimit failed"); + } + + (void) enable_extended_FILE_stdio(-1, -1); + maxthreads = 0; while ((c = getopt(argc, argv, "vrm:")) != EOF) { diff --git a/usr/src/cmd/krb5/kwarn/kwarndtest.c b/usr/src/cmd/krb5/kwarn/kwarndtest.c index f79fa95b7c..9fd30c47ac 100644 --- a/usr/src/cmd/krb5/kwarn/kwarndtest.c +++ b/usr/src/cmd/krb5/kwarn/kwarndtest.c @@ -1,10 +1,10 @@ /* * Copyright 1995-2002 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright 2013 Nexenta Systems. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Test client for kwarnd. This program is not shipped on the binary * release. This code was taken and modified from gssdtest.c @@ -95,8 +95,7 @@ do_kwarndtest(char *buf) if (argc == 0) { usage(); - /*LINTED*/ - FREE(argv_array, (argc+1)*sizeof (char *)); + FREE(argv, (argc+1)*sizeof (char *)); return (0); } @@ -116,7 +115,7 @@ do_kwarndtest(char *buf) strcmp(cmd, "add") == 0) { _kwarnd_add_warning(argc, argv); } else if (strcmp(cmd, "kwarn_del_warning") == 0 || - strcmp(cmd, "delete") == 0) { + strcmp(cmd, "delete") == 0) { _kwarnd_del_warning(argc, argv); } else if (strcmp(cmd, "exit") == 0) { printf(gettext("\n")); @@ -159,10 +158,10 @@ _kwarnd_add_warning(int argc, char **argv) if (status == 0) { printf(gettext("\nadd of credential\n\n")); printf(gettext("warning message successful for \"%s\"\n\n"), - argv[0]); + argv[0]); } else { printf(gettext("server ret err (octal) %o (%s)\n"), - status, gettext("add warning error")); + status, gettext("add warning error")); } return; @@ -183,11 +182,11 @@ _kwarnd_del_warning(int argc, char **argv) if (status == 0) { printf(gettext("delete of principal warning message" - "for %s successful"), - argv[0]); + "for %s successful"), + argv[0]); } else { printf(gettext("delete of principal %s unsuccessful\n\n"), - argv[0]); + argv[0]); } } @@ -195,7 +194,7 @@ static void instructs(void) { fprintf(stderr, - gettext( + gettext( "\nThis program will test kwarnd. kwarnd must be running as root. Enter\n" "the desired command and the principal to be added/deleted. If adding a\n" "principal, also include the expiration time in seconds.\n")); @@ -205,10 +204,10 @@ static void usage(void) { fprintf(stderr, - gettext( - "\nusage:\t[kwarn_add_warning | add] (principal) (exptime)\n" - "\t[kwarn_del_warning | delete] (principal)\n" - "\texit\n\n")); + gettext( + "\nusage:\t[kwarn_add_warning | add] (principal) (exptime)\n" + "\t[kwarn_del_warning | delete] (principal)\n" + "\texit\n\n")); } /* Copied from parse_argv(), then modified */ diff --git a/usr/src/cmd/zfs/zfs_iter.c b/usr/src/cmd/zfs/zfs_iter.c index e2ab90eaf1..7599ff2bb5 100644 --- a/usr/src/cmd/zfs/zfs_iter.c +++ b/usr/src/cmd/zfs/zfs_iter.c @@ -18,8 +18,10 @@ * * CDDL HEADER END */ + /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ #include <libintl.h> @@ -107,7 +109,8 @@ zfs_callback(zfs_handle_t *zhp, void *data) cb->cb_props_table); if (zfs_expand_proplist(zhp, cb->cb_proplist, - (cb->cb_flags & ZFS_ITER_RECVD_PROPS)) + (cb->cb_flags & ZFS_ITER_RECVD_PROPS), + (cb->cb_flags & ZFS_ITER_LITERAL_PROPS)) != 0) { free(node); return (-1); diff --git a/usr/src/cmd/zfs/zfs_iter.h b/usr/src/cmd/zfs/zfs_iter.h index 8c6b9fdef5..d896d7cf57 100644 --- a/usr/src/cmd/zfs/zfs_iter.h +++ b/usr/src/cmd/zfs/zfs_iter.h @@ -18,9 +18,11 @@ * * CDDL HEADER END */ + /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ #ifndef ZFS_ITER_H @@ -43,6 +45,7 @@ typedef struct zfs_sort_column { #define ZFS_ITER_PROP_LISTSNAPS (1 << 2) #define ZFS_ITER_DEPTH_LIMIT (1 << 3) #define ZFS_ITER_RECVD_PROPS (1 << 4) +#define ZFS_ITER_LITERAL_PROPS (1 << 5) int zfs_for_each(int, char **, int options, zfs_type_t, zfs_sort_column_t *, zprop_list_t **, int, zfs_iter_f, void *); diff --git a/usr/src/cmd/zfs/zfs_main.c b/usr/src/cmd/zfs/zfs_main.c index 9fe1740f36..ad429d461c 100644 --- a/usr/src/cmd/zfs/zfs_main.c +++ b/usr/src/cmd/zfs/zfs_main.c @@ -21,12 +21,12 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2012 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright 2012 Milan Jurik. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ #include <assert.h> @@ -233,9 +233,8 @@ get_usage(zfs_help_t idx) return (gettext("\tupgrade [-v]\n" "\tupgrade [-r] [-V version] <-a | filesystem ...>\n")); case HELP_LIST: - return (gettext("\tlist [-rHp][-d max] " - "[-o property[,...]] [-t type[,...]] [-s property] ...\n" - "\t [-S property] ... " + return (gettext("\tlist [-Hp] [-r|-d max] [-o property[,...]] " + "[-s property]...\n\t [-S property]... [-t type[,...]] " "[filesystem|volume|snapshot] ...\n")); case HELP_MOUNT: return (gettext("\tmount\n" @@ -292,12 +291,12 @@ get_usage(zfs_help_t idx) "<filesystem|volume>\n")); case HELP_USERSPACE: return (gettext("\tuserspace [-Hinp] [-o field[,...]] " - "[-s field] ...\n\t[-S field] ... " - "[-t type[,...]] <filesystem|snapshot>\n")); + "[-s field]...\n\t [-S field]... [-t type[,...]] " + "<filesystem|snapshot>\n")); case HELP_GROUPSPACE: return (gettext("\tgroupspace [-Hinp] [-o field[,...]] " - "[-s field] ...\n\t[-S field] ... " - "[-t type[,...]] <filesystem|snapshot>\n")); + "[-s field]...\n\t [-S field]... [-t type[,...]] " + "<filesystem|snapshot>\n")); case HELP_HOLD: return (gettext("\thold [-r] <tag> <snapshot> ...\n")); case HELP_HOLDS: @@ -2173,7 +2172,7 @@ zfs_do_upgrade(int argc, char **argv) * -i Translate SID to POSIX ID. * -n Print numeric ID instead of user/group name. * -o Control which fields to display. - * -p Use exact (parseable) numeric output. + * -p Use exact (parsable) numeric output. * -s Specify sort columns, descending order. * -S Specify sort columns, ascending order. * -t Control which object types to display. @@ -2851,25 +2850,25 @@ zfs_do_userspace(int argc, char **argv) } /* - * list [-r][-p][-d max] [-H] [-o property[,property]...] [-t type[,type]...] - * [-s property [-s property]...] [-S property [-S property]...] - * <dataset> ... + * list [-Hp][-r|-d max] [-o property[,...]] [-s property] ... [-S property] ... + * [-t type[,...]] [filesystem|volume|snapshot] ... * - * -r Recurse over all children + * -H Scripted mode; elide headers and separate columns by tabs. * -p Display values in parsable (literal) format. + * -r Recurse over all children. * -d Limit recursion by depth. - * -H Scripted mode; elide headers and separate columns by tabs * -o Control which fields to display. - * -t Control which object types to display. * -s Specify sort columns, descending order. * -S Specify sort columns, ascending order. + * -t Control which object types to display. * - * When given no arguments, lists all filesystems in the system. + * When given no arguments, list all filesystems in the system. * Otherwise, list the specified datasets, optionally recursing down them if * '-r' is specified. */ typedef struct list_cbdata { boolean_t cb_first; + boolean_t cb_literal; boolean_t cb_scripted; boolean_t cb_literal; zprop_list_t *cb_proplist; @@ -2879,8 +2878,9 @@ typedef struct list_cbdata { * Given a list of columns to display, output appropriate headers for each one. */ static void -print_header(zprop_list_t *pl) +print_header(list_cbdata_t *cb) { + zprop_list_t *pl = cb->cb_proplist; char headerbuf[ZFS_MAXPROPLEN]; const char *header; int i; @@ -2921,20 +2921,19 @@ print_header(zprop_list_t *pl) * to the described layout. */ static void -print_dataset(zfs_handle_t *zhp, zprop_list_t *pl, boolean_t scripted, - boolean_t literal) +print_dataset(zfs_handle_t *zhp, list_cbdata_t *cb) { + zprop_list_t *pl = cb->cb_proplist; boolean_t first = B_TRUE; char property[ZFS_MAXPROPLEN]; nvlist_t *userprops = zfs_get_user_props(zhp); nvlist_t *propval; char *propstr; boolean_t right_justify; - int width; for (; pl != NULL; pl = pl->pl_next) { if (!first) { - if (scripted) + if (cb->cb_scripted) (void) printf("\t"); else (void) printf(" "); @@ -2944,22 +2943,22 @@ print_dataset(zfs_handle_t *zhp, zprop_list_t *pl, boolean_t scripted, if (pl->pl_prop != ZPROP_INVAL) { if (zfs_prop_get(zhp, pl->pl_prop, property, - sizeof (property), NULL, NULL, 0, literal) != 0) + sizeof (property), NULL, NULL, 0, + cb->cb_literal) != 0) propstr = "-"; else propstr = property; - right_justify = zfs_prop_align_right(pl->pl_prop); } else if (zfs_prop_userquota(pl->pl_user_prop)) { if (zfs_prop_get_userquota(zhp, pl->pl_user_prop, - property, sizeof (property), literal) != 0) + property, sizeof (property), cb->cb_literal) != 0) propstr = "-"; else propstr = property; right_justify = B_TRUE; } else if (zfs_prop_written(pl->pl_user_prop)) { if (zfs_prop_get_written(zhp, pl->pl_user_prop, - property, sizeof (property), B_FALSE) != 0) + property, sizeof (property), cb->cb_literal) != 0) propstr = "-"; else propstr = property; @@ -2974,19 +2973,17 @@ print_dataset(zfs_handle_t *zhp, zprop_list_t *pl, boolean_t scripted, right_justify = B_FALSE; } - width = pl->pl_width; - /* * If this is being called in scripted mode, or if this is the * last column and it is left-justified, don't include a width * format specifier. */ - if (scripted || (pl->pl_next == NULL && !right_justify)) + if (cb->cb_scripted || (pl->pl_next == NULL && !right_justify)) (void) printf("%s", propstr); else if (right_justify) - (void) printf("%*s", width, propstr); + (void) printf("%*s", pl->pl_width, propstr); else - (void) printf("%-*s", width, propstr); + (void) printf("%-*s", pl->pl_width, propstr); } (void) printf("\n"); @@ -3002,11 +2999,11 @@ list_callback(zfs_handle_t *zhp, void *data) if (cbp->cb_first) { if (!cbp->cb_scripted) - print_header(cbp->cb_proplist); + print_header(cbp); cbp->cb_first = B_FALSE; } - print_dataset(zhp, cbp->cb_proplist, cbp->cb_scripted, cbp->cb_literal); + print_dataset(zhp, cbp); return (0); } @@ -3015,7 +3012,6 @@ static int zfs_do_list(int argc, char **argv) { int c; - boolean_t scripted = B_FALSE; static char default_fields[] = "name,used,available,referenced,mountpoint"; int types = ZFS_TYPE_DATASET; @@ -3030,7 +3026,7 @@ zfs_do_list(int argc, char **argv) int flags = ZFS_ITER_PROP_LISTSNAPS | ZFS_ITER_ARGS_CAN_BE_PATHS; /* check options */ - while ((c = getopt(argc, argv, ":pd:o:rt:Hs:S:")) != -1) { + while ((c = getopt(argc, argv, "HS:d:o:prs:t:")) != -1) { switch (c) { case 'p': cb.cb_literal = B_TRUE; @@ -3038,6 +3034,10 @@ zfs_do_list(int argc, char **argv) case 'o': fields = optarg; break; + case 'p': + cb.cb_literal = B_TRUE; + flags |= ZFS_ITER_LITERAL_PROPS; + break; case 'd': limit = parse_depth(optarg, &flags); break; @@ -3045,7 +3045,7 @@ zfs_do_list(int argc, char **argv) flags |= ZFS_ITER_RECURSE; break; case 'H': - scripted = B_TRUE; + cb.cb_scripted = B_TRUE; break; case 's': if (zfs_add_sort_column(&sortcol, optarg, @@ -3139,7 +3139,6 @@ zfs_do_list(int argc, char **argv) libzfs_set_cachedprops(g_zfs, B_FALSE); } - cb.cb_scripted = scripted; cb.cb_first = B_TRUE; ret = zfs_for_each(argc, argv, flags, types, sortcol, &cb.cb_proplist, diff --git a/usr/src/lib/libzfs/common/libzfs.h b/usr/src/lib/libzfs/common/libzfs.h index 87ac9e9861..35d2c26a9b 100644 --- a/usr/src/lib/libzfs/common/libzfs.h +++ b/usr/src/lib/libzfs/common/libzfs.h @@ -21,10 +21,10 @@ /* * 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 Steven Hartland. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ #ifndef _LIBZFS_H @@ -460,7 +460,8 @@ typedef struct zprop_list { boolean_t pl_fixed; } zprop_list_t; -extern int zfs_expand_proplist(zfs_handle_t *, zprop_list_t **, boolean_t); +extern int zfs_expand_proplist(zfs_handle_t *, zprop_list_t **, boolean_t, + boolean_t); extern void zfs_prune_proplist(zfs_handle_t *, uint8_t *); #define ZFS_MOUNTPOINT_NONE "none" diff --git a/usr/src/lib/libzfs/common/libzfs_dataset.c b/usr/src/lib/libzfs/common/libzfs_dataset.c index 4abf87de90..e1fa965893 100644 --- a/usr/src/lib/libzfs/common/libzfs_dataset.c +++ b/usr/src/lib/libzfs/common/libzfs_dataset.c @@ -24,9 +24,9 @@ * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved. - * Copyright 2012 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 Martin Matuska. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ #include <ctype.h> @@ -3819,7 +3819,8 @@ zfs_get_recvd_props(zfs_handle_t *zhp) * of the RECEIVED column. */ int -zfs_expand_proplist(zfs_handle_t *zhp, zprop_list_t **plp, boolean_t received) +zfs_expand_proplist(zfs_handle_t *zhp, zprop_list_t **plp, boolean_t received, + boolean_t literal) { libzfs_handle_t *hdl = zhp->zfs_hdl; zprop_list_t *entry; @@ -3881,18 +3882,18 @@ zfs_expand_proplist(zfs_handle_t *zhp, zprop_list_t **plp, boolean_t received) * Now go through and check the width of any non-fixed columns */ for (entry = *plp; entry != NULL; entry = entry->pl_next) { - if (entry->pl_fixed) + if (entry->pl_fixed && !literal) continue; if (entry->pl_prop != ZPROP_INVAL) { if (zfs_prop_get(zhp, entry->pl_prop, - buf, sizeof (buf), NULL, NULL, 0, B_FALSE) == 0) { + buf, sizeof (buf), NULL, NULL, 0, literal) == 0) { if (strlen(buf) > entry->pl_width) entry->pl_width = strlen(buf); } if (received && zfs_prop_get_recvd(zhp, zfs_prop_to_name(entry->pl_prop), - buf, sizeof (buf), B_FALSE) == 0) + buf, sizeof (buf), literal) == 0) if (strlen(buf) > entry->pl_recvd_width) entry->pl_recvd_width = strlen(buf); } else { @@ -3905,7 +3906,7 @@ zfs_expand_proplist(zfs_handle_t *zhp, zprop_list_t **plp, boolean_t received) } if (received && zfs_prop_get_recvd(zhp, entry->pl_user_prop, - buf, sizeof (buf), B_FALSE) == 0) + buf, sizeof (buf), literal) == 0) if (strlen(buf) > entry->pl_recvd_width) entry->pl_recvd_width = strlen(buf); } diff --git a/usr/src/man/man1m/zfs.1m b/usr/src/man/man1m/zfs.1m index 7445ca05dc..e468053a7a 100644 --- a/usr/src/man/man1m/zfs.1m +++ b/usr/src/man/man1m/zfs.1m @@ -27,7 +27,7 @@ .\" Copyright 2013 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2013, Joyent, Inc. All rights reserved. .\" -.TH ZFS 1M "Jan 26, 2013" +.TH ZFS 1M "Oct 16, 2013" .SH NAME zfs \- configures ZFS file systems .SH SYNOPSIS @@ -248,7 +248,6 @@ zfs \- configures ZFS file systems \fBzfs\fR \fBdiff\fR [\fB-FHt\fR] \fIsnapshot\fR \fIsnapshot|filesystem\fR .SH DESCRIPTION -.sp .LP The \fBzfs\fR command configures \fBZFS\fR datasets within a \fBZFS\fR storage pool, as described in \fBzpool\fR(1M). A dataset is identified by a unique path @@ -306,7 +305,6 @@ specified as \fIfilesystem@name\fR or \fIvolume@name\fR. .RE .SS "ZFS File System Hierarchy" -.sp .LP A \fBZFS\fR storage pool is a logical collection of devices that provide space for datasets. A storage pool is also the root of the \fBZFS\fR file system @@ -320,7 +318,6 @@ characteristics, however, are managed by the \fBzpool\fR(1M) command. .LP See \fBzpool\fR(1M) for more information on creating and administering pools. .SS "Snapshots" -.sp .LP A snapshot is a read-only copy of a file system or volume. Snapshots can be created extremely quickly, and initially consume no additional space within the @@ -337,7 +334,6 @@ in the root of the file system. Snapshots are automatically mounted on demand and may be unmounted at regular intervals. The visibility of the \fB\&.zfs\fR directory can be controlled by the \fBsnapdir\fR property. .SS "Clones" -.sp .LP A clone is a writable volume or file system whose initial contents are the same as another dataset. As with snapshots, creating a clone is nearly @@ -357,7 +353,6 @@ The clone parent-child dependency relationship can be reversed by using the clone of the specified file system, which makes it possible to destroy the file system that the clone was created from. .SS "Mount Points" -.sp .LP Creating a \fBZFS\fR file system is a simple operation, so the number of file systems per system is likely to be numerous. To cope with this, \fBZFS\fR @@ -390,7 +385,6 @@ is set to \fBlegacy\fR, \fBZFS\fR makes no attempt to manage the file system, and the administrator is responsible for mounting and unmounting the file system. .SS "Zones" -.sp .LP A \fBZFS\fR file system can be added to a non-global zone by using the \fBzonecfg\fR \fBadd fs\fR subcommand. A \fBZFS\fR file system that is added to @@ -428,7 +422,6 @@ The global administrator can forcibly clear the \fBzoned\fR property, though this should be done with extreme care. The global administrator should verify that all the mount points are acceptable before clearing the property. .SS "Native Properties" -.sp .LP Properties are divided into two types, native properties and user-defined (or "user") properties. Native properties either export internal statistics or @@ -1536,7 +1529,6 @@ The \fBcasesensitivity\fR, \fBnormalization\fR, and \fButf8only\fR properties are also new permissions that can be assigned to non-privileged users by using the \fBZFS\fR delegated administration feature. .SS "Temporary Mount Point Properties" -.sp .LP When a file system is mounted, either through \fBmount\fR(1M) for legacy mounts or the \fBzfs mount\fR command for normal file systems, its mount options are @@ -1565,7 +1557,6 @@ are reported as "temporary" by the \fBzfs get\fR command. If the properties are changed while the dataset is mounted, the new setting overrides any temporary settings. .SS "User Properties" -.sp .LP In addition to the standard native properties, \fBZFS\fR supports arbitrary user properties. User properties have no effect on \fBZFS\fR behavior, but @@ -1598,7 +1589,6 @@ to clear a user property . If the property is not defined in any parent dataset, it is removed entirely. Property values are limited to 1024 characters. .SS "ZFS Volumes as Swap or Dump Devices" -.sp .LP During an initial installation a swap device and dump device are created on \fBZFS\fR volumes in the \fBZFS\fR root pool. By default, the swap area size is @@ -1614,7 +1604,6 @@ installed or upgraded, use the \fBswap\fR(1M) and \fBdumpadm\fR(1M) commands. If you need to change the size of your swap area or dump device, see the \fISolaris ZFS Administration Guide\fR. .SH SUBCOMMANDS -.sp .LP All subcommands that modify state are logged persistently to the pool in their original form. @@ -2144,6 +2133,16 @@ tab instead of arbitrary white space. .sp .ne 2 .na +\fB\fB-p\fR\fR +.ad +.sp .6 +.RS 4n +Display numbers in parsable (exact) values. +.RE + +.sp +.ne 2 +.na \fB\fB-r\fR\fR .ad .sp .6 @@ -2391,7 +2390,7 @@ is all sources. .ad .sp .6 .RS 4n -Display numbers in parseable (exact) values. +Display numbers in parsable (exact) values. .RE .sp @@ -3428,7 +3427,7 @@ F Regular file .ad .sp .6 .RS 4n -Give more parseable tab-separated output, without header lines and without arrows. +Give more parsable tab-separated output, without header lines and without arrows. .RE .sp .ne 2 @@ -3989,7 +3988,6 @@ M F /tank/test/modified .sp .SH EXIT STATUS -.sp .LP The following exit values are returned: .sp @@ -4023,7 +4021,6 @@ Invalid command line options were specified. .RE .SH ATTRIBUTES -.sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -4039,7 +4036,6 @@ Interface Stability Committed .TE .SH SEE ALSO -.sp .LP \fBssh\fR(1), \fBiscsitadm\fR(1M), \fBmount\fR(1M), \fBshare\fR(1M), \fBsharemgr\fR(1M), \fBunshare\fR(1M), \fBzonecfg\fR(1M), \fBzpool\fR(1M), |