Deleted Added
full compact
space_map.c (263390) space_map.c (265740)
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

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

18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25/*
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

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

18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25/*
26 * Copyright (c) 2013 by Delphix. All rights reserved.
26 * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
27 */
28
29#include <sys/zfs_context.h>
30#include <sys/spa.h>
31#include <sys/dmu.h>
32#include <sys/dmu_tx.h>
33#include <sys/dnode.h>
34#include <sys/dsl_pool.h>

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

262 * entities. The DMU is capable of handling different block
263 * sizes making it possible for us to increase the
264 * block size and maintain backwards compatibility. The
265 * caveat is that the new block sizes must be a
266 * power of 2 so that old software can append to the file,
267 * adding more blocks. The block size can grow until it
268 * reaches space_map_max_blksz.
269 */
27 */
28
29#include <sys/zfs_context.h>
30#include <sys/spa.h>
31#include <sys/dmu.h>
32#include <sys/dmu_tx.h>
33#include <sys/dnode.h>
34#include <sys/dsl_pool.h>

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

262 * entities. The DMU is capable of handling different block
263 * sizes making it possible for us to increase the
264 * block size and maintain backwards compatibility. The
265 * caveat is that the new block sizes must be a
266 * power of 2 so that old software can append to the file,
267 * adding more blocks. The block size can grow until it
268 * reaches space_map_max_blksz.
269 */
270 newsz = ISP2(size) ? size : 1ULL << highbit(size);
270 newsz = ISP2(size) ? size : 1ULL << highbit64(size);
271 if (newsz > space_map_max_blksz)
272 newsz = space_map_max_blksz;
273
274 VERIFY0(dmu_object_set_blocksize(sm->sm_os,
275 space_map_object(sm), newsz, 0, tx));
276 dmu_object_size_from_db(sm->sm_dbuf, &blksz, &blocks);
277
278 zfs_dbgmsg("txg %llu, spa %s, increasing blksz from %d to %d",

--- 325 unchanged lines hidden ---
271 if (newsz > space_map_max_blksz)
272 newsz = space_map_max_blksz;
273
274 VERIFY0(dmu_object_set_blocksize(sm->sm_os,
275 space_map_object(sm), newsz, 0, tx));
276 dmu_object_size_from_db(sm->sm_dbuf, &blksz, &blocks);
277
278 zfs_dbgmsg("txg %llu, spa %s, increasing blksz from %d to %d",

--- 325 unchanged lines hidden ---