Deleted Added
full compact
dsl_dataset.c (268649) dsl_dataset.c (268659)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 7 unchanged lines hidden (view full) ---

16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Portions Copyright (c) 2011 Martin Matuska <mm@FreeBSD.org>
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 7 unchanged lines hidden (view full) ---

16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Portions Copyright (c) 2011 Martin Matuska <mm@FreeBSD.org>
24 * Copyright (c) 2013 by Delphix. All rights reserved.
24 * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
25 * Copyright (c) 2014, Joyent, Inc. All rights reserved.
26 * Copyright (c) 2014 RackTop Systems.
27 */
28
29#include <sys/dmu_objset.h>
30#include <sys/dsl_dataset.h>
31#include <sys/dsl_dir.h>
32#include <sys/dsl_prop.h>

--- 1565 unchanged lines hidden (view full) ---

1598 ds->ds_phys->ds_uncompressed_bytes);
1599
1600 if (dsl_dataset_is_snapshot(ds)) {
1601 dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_COMPRESSRATIO, ratio);
1602 dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_USED,
1603 ds->ds_phys->ds_unique_bytes);
1604 get_clones_stat(ds, nv);
1605 } else {
25 * Copyright (c) 2014, Joyent, Inc. All rights reserved.
26 * Copyright (c) 2014 RackTop Systems.
27 */
28
29#include <sys/dmu_objset.h>
30#include <sys/dsl_dataset.h>
31#include <sys/dsl_dir.h>
32#include <sys/dsl_prop.h>

--- 1565 unchanged lines hidden (view full) ---

1598 ds->ds_phys->ds_uncompressed_bytes);
1599
1600 if (dsl_dataset_is_snapshot(ds)) {
1601 dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_COMPRESSRATIO, ratio);
1602 dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_USED,
1603 ds->ds_phys->ds_unique_bytes);
1604 get_clones_stat(ds, nv);
1605 } else {
1606 if (ds->ds_prev != NULL && ds->ds_prev != dp->dp_origin_snap) {
1607 char buf[MAXNAMELEN];
1608 dsl_dataset_name(ds->ds_prev, buf);
1609 dsl_prop_nvlist_add_string(nv, ZFS_PROP_PREV_SNAP, buf);
1610 }
1611
1606 dsl_dir_stats(ds->ds_dir, nv);
1607 }
1608
1609 dsl_dataset_space(ds, &refd, &avail, &uobjs, &aobjs);
1610 dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_AVAILABLE, avail);
1611 dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_REFERENCED, refd);
1612
1613 dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_CREATION,

--- 1629 unchanged lines hidden ---
1612 dsl_dir_stats(ds->ds_dir, nv);
1613 }
1614
1615 dsl_dataset_space(ds, &refd, &avail, &uobjs, &aobjs);
1616 dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_AVAILABLE, avail);
1617 dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_REFERENCED, refd);
1618
1619 dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_CREATION,

--- 1629 unchanged lines hidden ---