Deleted Added
full compact
spa_misc.c (224177) spa_misc.c (228103)
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) 2011 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) 2011 by Delphix. All rights reserved.
24 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
24 */
25
26#include <sys/zfs_context.h>
27#include <sys/spa_impl.h>
28#include <sys/zio.h>
29#include <sys/zio_checksum.h>
30#include <sys/zio_compress.h>
31#include <sys/dmu.h>

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

1303}
1304
1305uint64_t
1306spa_guid(spa_t *spa)
1307{
1308 /*
1309 * If we fail to parse the config during spa_load(), we can go through
1310 * the error path (which posts an ereport) and end up here with no root
25 */
26
27#include <sys/zfs_context.h>
28#include <sys/spa_impl.h>
29#include <sys/zio.h>
30#include <sys/zio_checksum.h>
31#include <sys/zio_compress.h>
32#include <sys/dmu.h>

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

1304}
1305
1306uint64_t
1307spa_guid(spa_t *spa)
1308{
1309 /*
1310 * If we fail to parse the config during spa_load(), we can go through
1311 * the error path (which posts an ereport) and end up here with no root
1311 * vdev. We stash the original pool guid in 'spa_load_guid' to handle
1312 * vdev. We stash the original pool guid in 'spa_config_guid' to handle
1312 * this case.
1313 */
1314 if (spa->spa_root_vdev != NULL)
1315 return (spa->spa_root_vdev->vdev_guid);
1316 else
1313 * this case.
1314 */
1315 if (spa->spa_root_vdev != NULL)
1316 return (spa->spa_root_vdev->vdev_guid);
1317 else
1317 return (spa->spa_load_guid);
1318 return (spa->spa_config_guid);
1318}
1319
1320uint64_t
1319}
1320
1321uint64_t
1322spa_load_guid(spa_t *spa)
1323{
1324 /*
1325 * This is a GUID that exists solely as a reference for the
1326 * purposes of the arc. It is generated at load time, and
1327 * is never written to persistent storage.
1328 */
1329 return (spa->spa_load_guid);
1330}
1331
1332uint64_t
1321spa_last_synced_txg(spa_t *spa)
1322{
1323 return (spa->spa_ubsync.ub_txg);
1324}
1325
1326uint64_t
1327spa_first_txg(spa_t *spa)
1328{

--- 355 unchanged lines hidden ---
1333spa_last_synced_txg(spa_t *spa)
1334{
1335 return (spa->spa_ubsync.ub_txg);
1336}
1337
1338uint64_t
1339spa_first_txg(spa_t *spa)
1340{

--- 355 unchanged lines hidden ---