MFV r268122:
4929 want prevsnap property illumos/illumos-gate@b461c7460e MFC after: 2 weeks
This commit is contained in:
parent
b00979dd8e
commit
ff95e6ff7f
@ -435,6 +435,8 @@ zfs_prop_init(void)
|
||||
PROP_READONLY, ZFS_TYPE_DATASET, "OBJSETID");
|
||||
zprop_register_hidden(ZFS_PROP_INCONSISTENT, "inconsistent",
|
||||
PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "INCONSISTENT");
|
||||
zprop_register_hidden(ZFS_PROP_PREV_SNAP, "prevsnap", PROP_TYPE_STRING,
|
||||
PROP_READONLY, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "PREVSNAP");
|
||||
|
||||
/* oddball properties */
|
||||
zprop_register_impl(ZFS_PROP_CREATION, "creation", PROP_TYPE_NUMBER, 0,
|
||||
|
@ -21,7 +21,7 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Portions Copyright (c) 2011 Martin Matuska <mm@FreeBSD.org>
|
||||
* Copyright (c) 2013 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2013, 2014 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2014, Joyent, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 RackTop Systems.
|
||||
*/
|
||||
@ -1603,6 +1603,12 @@ dsl_dataset_stats(dsl_dataset_t *ds, nvlist_t *nv)
|
||||
ds->ds_phys->ds_unique_bytes);
|
||||
get_clones_stat(ds, nv);
|
||||
} else {
|
||||
if (ds->ds_prev != NULL && ds->ds_prev != dp->dp_origin_snap) {
|
||||
char buf[MAXNAMELEN];
|
||||
dsl_dataset_name(ds->ds_prev, buf);
|
||||
dsl_prop_nvlist_add_string(nv, ZFS_PROP_PREV_SNAP, buf);
|
||||
}
|
||||
|
||||
dsl_dir_stats(ds->ds_dir, nv);
|
||||
}
|
||||
|
||||
|
@ -151,6 +151,7 @@ typedef enum {
|
||||
ZFS_PROP_FILESYSTEM_COUNT,
|
||||
ZFS_PROP_SNAPSHOT_COUNT,
|
||||
ZFS_PROP_REDUNDANT_METADATA,
|
||||
ZFS_PROP_PREV_SNAP,
|
||||
ZFS_NUM_PROPS
|
||||
} zfs_prop_t;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user