usr/src/uts/common/fs/zfs/dsl_pool.c
changeset 2082 76b439ec3ac1
parent 1775 e51e26b432c0
child 2199 712a788c2dfd
equal deleted inserted replaced
2081:34f1e4f08632 2082:76b439ec3ac1
   239 	 *
   239 	 *
   240 	 * If we're trying to assess whether it's OK to do a free,
   240 	 * If we're trying to assess whether it's OK to do a free,
   241 	 * cut the reservation in half to allow forward progress
   241 	 * cut the reservation in half to allow forward progress
   242 	 * (e.g. make it possible to rm(1) files from a full pool).
   242 	 * (e.g. make it possible to rm(1) files from a full pool).
   243 	 */
   243 	 */
   244 	space = spa_get_space(dp->dp_spa);
   244 	space = spa_get_dspace(dp->dp_spa);
   245 	resv = MAX(space >> 6, SPA_MINDEVSIZE >> 1);
   245 	resv = MAX(space >> 6, SPA_MINDEVSIZE >> 1);
   246 	if (netfree)
   246 	if (netfree)
   247 		resv >>= 1;
   247 		resv >>= 1;
   248 
   248 
   249 	return (space - resv);
   249 	return (space - resv);