/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
- * Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2013 by Delphix. All rights reserved.
*/
#include <sys/dmu.h>
delta = P2NPHASE(off, dn->dn_datablksz);
}
+ min_ibs = max_ibs = dn->dn_indblkshift;
if (dn->dn_maxblkid > 0) {
/*
* The blocksize can't change,
*/
ASSERT(dn->dn_datablkshift != 0);
min_bs = max_bs = dn->dn_datablkshift;
- min_ibs = max_ibs = dn->dn_indblkshift;
- } else if (dn->dn_indblkshift > max_ibs) {
- /*
- * This ensures that if we reduce DN_MAX_INDBLKSHIFT,
- * the code will still work correctly on older pools.
- */
- min_ibs = max_ibs = dn->dn_indblkshift;
}
/*
(dn->dn_indblkshift - SPA_BLKPTRSHIFT);
while (level++ < maxlevel) {
- txh->txh_memory_tohold += MIN(blkcnt, (nl1blks >> epbs))
+ txh->txh_memory_tohold += MAX(MIN(blkcnt, nl1blks), 1)
<< dn->dn_indblkshift;
blkcnt = 1 + (blkcnt >> epbs);
}