Deleted Added
full compact
dmu_objset.c (249195) dmu_objset.c (251478)
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 * Copyright (c) 2013 by Delphix. All rights reserved.
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 * Copyright (c) 2013 by Delphix. All rights reserved.
24 * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
24 */
25
26/* Portions Copyright 2010 Robert Milkowski */
27
28#include <sys/cred.h>
29#include <sys/zfs_context.h>
30#include <sys/dmu_objset.h>
31#include <sys/dsl_dir.h>

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

271 if (!BP_IS_HOLE(os->os_rootbp)) {
272 uint32_t aflags = ARC_WAIT;
273 zbookmark_t zb;
274 SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET,
275 ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID);
276
277 if (DMU_OS_IS_L2CACHEABLE(os))
278 aflags |= ARC_L2CACHE;
25 */
26
27/* Portions Copyright 2010 Robert Milkowski */
28
29#include <sys/cred.h>
30#include <sys/zfs_context.h>
31#include <sys/dmu_objset.h>
32#include <sys/dsl_dir.h>

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

272 if (!BP_IS_HOLE(os->os_rootbp)) {
273 uint32_t aflags = ARC_WAIT;
274 zbookmark_t zb;
275 SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET,
276 ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID);
277
278 if (DMU_OS_IS_L2CACHEABLE(os))
279 aflags |= ARC_L2CACHE;
280 if (DMU_OS_IS_L2COMPRESSIBLE(os))
281 aflags |= ARC_L2COMPRESS;
279
280 dprintf_bp(os->os_rootbp, "reading %s", "");
281 err = arc_read(NULL, spa, os->os_rootbp,
282 arc_getbuf_func, &os->os_phys_buf,
283 ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL, &aflags, &zb);
284 if (err != 0) {
285 kmem_free(os, sizeof (objset_t));
286 /* convert checksum errors into IO errors */

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

986 SET_BOOKMARK(&zb, os->os_dsl_dataset ?
987 os->os_dsl_dataset->ds_object : DMU_META_OBJSET,
988 ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID);
989 arc_release(os->os_phys_buf, &os->os_phys_buf);
990
991 dmu_write_policy(os, NULL, 0, 0, &zp);
992
993 zio = arc_write(pio, os->os_spa, tx->tx_txg,
282
283 dprintf_bp(os->os_rootbp, "reading %s", "");
284 err = arc_read(NULL, spa, os->os_rootbp,
285 arc_getbuf_func, &os->os_phys_buf,
286 ZIO_PRIORITY_SYNC_READ, ZIO_FLAG_CANFAIL, &aflags, &zb);
287 if (err != 0) {
288 kmem_free(os, sizeof (objset_t));
289 /* convert checksum errors into IO errors */

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

989 SET_BOOKMARK(&zb, os->os_dsl_dataset ?
990 os->os_dsl_dataset->ds_object : DMU_META_OBJSET,
991 ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID);
992 arc_release(os->os_phys_buf, &os->os_phys_buf);
993
994 dmu_write_policy(os, NULL, 0, 0, &zp);
995
996 zio = arc_write(pio, os->os_spa, tx->tx_txg,
994 os->os_rootbp, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os), &zp,
995 dmu_objset_write_ready, dmu_objset_write_done, os,
996 ZIO_PRIORITY_ASYNC_WRITE, ZIO_FLAG_MUSTSUCCEED, &zb);
997 os->os_rootbp, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os),
998 DMU_OS_IS_L2COMPRESSIBLE(os), &zp, dmu_objset_write_ready,
999 dmu_objset_write_done, os, ZIO_PRIORITY_ASYNC_WRITE,
1000 ZIO_FLAG_MUSTSUCCEED, &zb);
997
998 /*
999 * Sync special dnodes - the parent IO for the sync is the root block
1000 */
1001 DMU_META_DNODE(os)->dn_zio = zio;
1002 dnode_sync(DMU_META_DNODE(os), tx);
1003
1004 os->os_phys->os_flags = os->os_flags;

--- 737 unchanged lines hidden ---
1001
1002 /*
1003 * Sync special dnodes - the parent IO for the sync is the root block
1004 */
1005 DMU_META_DNODE(os)->dn_zio = zio;
1006 dnode_sync(DMU_META_DNODE(os), tx);
1007
1008 os->os_phys->os_flags = os->os_flags;

--- 737 unchanged lines hidden ---