diff options
author | delphij <delphij@FreeBSD.org> | 2014-07-15 05:45:50 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-07-15 05:45:50 +0000 |
commit | a62685c6c11f38e7b187ffb10a6f95b5b6f889dd (patch) | |
tree | 1758d24837c26fac8e37baf737474ca69263e5c0 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c | |
parent | 4af6f088fb20b549ad05b7a5c54c4a56e4961d30 (diff) | |
download | FreeBSD-src-a62685c6c11f38e7b187ffb10a6f95b5b6f889dd.zip FreeBSD-src-a62685c6c11f38e7b187ffb10a6f95b5b6f889dd.tar.gz |
MFC r268128: MFV r268122:
4929 want prevsnap property
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c index f21af21..4e41f47 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c @@ -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); } |