uberblock.c revision be6fd75a69ae679453d9cda5bff3326111e6d1ca
fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER START
fa9e4066f08beec538e775443c5be79dd423fcabahrens * The contents of this file are subject to the terms of the
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock * Common Development and Distribution License (the "License").
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock * You may not use this file except in compliance with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens * See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens * and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * If applicable, add the following below this CDDL HEADER, with the
fa9e4066f08beec538e775443c5be79dd423fcabahrens * fields enclosed by brackets "[]" replaced with your own identifying
fa9e4066f08beec538e775443c5be79dd423fcabahrens * information: Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER END
3f9d6ad73e45c6823b409f93b0c8d4f62861d2d5Lin Ling * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
be6fd75a69ae679453d9cda5bff3326111e6d1caMatthew Ahrens * Copyright (c) 2013 by Delphix. All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrens if (ub->ub_magic == BSWAP_64((uint64_t)UBERBLOCK_MAGIC))
fa9e4066f08beec538e775443c5be79dd423fcabahrens return (0);
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Update the uberblock and return a boolean value indicating whether
fa9e4066f08beec538e775443c5be79dd423fcabahrens * anything changed in this transaction group.
fa9e4066f08beec538e775443c5be79dd423fcabahrensuberblock_update(uberblock_t *ub, vdev_t *rvd, uint64_t txg)
eaca9bbd5f5d1e4e554da4c7108e8a03c8c33481eschrock * We explicitly do not set ub_version here, so that older versions
eaca9bbd5f5d1e4e554da4c7108e8a03c8c33481eschrock * continue to be written with the previous uberblock version.