summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/dsl_dataset.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c
index edc5ea17a..9c017124a 100644
--- a/module/zfs/dsl_dataset.c
+++ b/module/zfs/dsl_dataset.c
@@ -1695,6 +1695,12 @@ dsl_dataset_stats(dsl_dataset_t *ds, nvlist_t *nv)
dsl_dataset_phys(ds)->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);
}