Deleted Added
full compact
dsl_pool.c (268079) dsl_pool.c (268473)
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

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

686}
687
688uint64_t
689dsl_pool_adjustedsize(dsl_pool_t *dp, boolean_t netfree)
690{
691 uint64_t space, resv;
692
693 /*
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

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

686}
687
688uint64_t
689dsl_pool_adjustedsize(dsl_pool_t *dp, boolean_t netfree)
690{
691 uint64_t space, resv;
692
693 /*
694 * Reserve about 1.6% (1/64), or at least 32MB, for allocation
695 * efficiency.
696 * XXX The intent log is not accounted for, so it must fit
697 * within this slop.
698 *
699 * If we're trying to assess whether it's OK to do a free,
700 * cut the reservation in half to allow forward progress
701 * (e.g. make it possible to rm(1) files from a full pool).
702 */
703 space = spa_get_dspace(dp->dp_spa);
694 * If we're trying to assess whether it's OK to do a free,
695 * cut the reservation in half to allow forward progress
696 * (e.g. make it possible to rm(1) files from a full pool).
697 */
698 space = spa_get_dspace(dp->dp_spa);
704 resv = MAX(space >> 6, SPA_MINDEVSIZE >> 1);
699 resv = spa_get_slop_space(dp->dp_spa);
705 if (netfree)
706 resv >>= 1;
707
708 return (space - resv);
709}
710
711boolean_t
712dsl_pool_need_dirty_delay(dsl_pool_t *dp)

--- 422 unchanged lines hidden ---
700 if (netfree)
701 resv >>= 1;
702
703 return (space - resv);
704}
705
706boolean_t
707dsl_pool_need_dirty_delay(dsl_pool_t *dp)

--- 422 unchanged lines hidden ---