mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Pool allocation classes
Allocation Classes add the ability to have allocation classes in a pool that are dedicated to serving specific block categories, such as DDT data, metadata, and small file blocks. A pool can opt-in to this feature by adding a 'special' or 'dedup' top-level VDEV. Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Alek Pinchuk <apinchuk@datto.com> Reviewed-by: Håkan Johansson <f96hajo@chalmers.se> Reviewed-by: Andreas Dilger <andreas.dilger@chamcloud.com> Reviewed-by: DHE <git@dehacked.net> Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed-by: Gregor Kopka <gregor@kopka.net> Reviewed-by: Kash Pande <kash@tripleback.net> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Don Brady <don.brady@delphix.com> Closes #5182
This commit is contained in:
committed by
Brian Behlendorf
parent
cfa37548eb
commit
cc99f275a2
@@ -22,6 +22,8 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2012, 2016 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2017, Intel Corporation.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -463,6 +465,28 @@ vdev_config_generate(spa_t *spa, vdev_t *vd, boolean_t getstats,
|
||||
fnvlist_add_uint64(nv, ZPOOL_CONFIG_REMOVING,
|
||||
vd->vdev_removing);
|
||||
}
|
||||
|
||||
/* zpool command expects alloc class data */
|
||||
if (getstats && vd->vdev_alloc_bias != VDEV_BIAS_NONE) {
|
||||
const char *bias = NULL;
|
||||
|
||||
switch (vd->vdev_alloc_bias) {
|
||||
case VDEV_BIAS_LOG:
|
||||
bias = VDEV_ALLOC_BIAS_LOG;
|
||||
break;
|
||||
case VDEV_BIAS_SPECIAL:
|
||||
bias = VDEV_ALLOC_BIAS_SPECIAL;
|
||||
break;
|
||||
case VDEV_BIAS_DEDUP:
|
||||
bias = VDEV_ALLOC_BIAS_DEDUP;
|
||||
break;
|
||||
default:
|
||||
ASSERT3U(vd->vdev_alloc_bias, ==,
|
||||
VDEV_BIAS_NONE);
|
||||
}
|
||||
fnvlist_add_string(nv, ZPOOL_CONFIG_ALLOCATION_BIAS,
|
||||
bias);
|
||||
}
|
||||
}
|
||||
|
||||
if (vd->vdev_dtl_sm != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user