From cc99f275a28c43fe450a66a7544f73c4935f7361 Mon Sep 17 00:00:00 2001 From: Don Brady Date: Wed, 5 Sep 2018 19:33:36 -0600 Subject: Pool allocation classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Richard Laager Reviewed-by: Alek Pinchuk Reviewed-by: HÃ¥kan Johansson Reviewed-by: Andreas Dilger Reviewed-by: DHE Reviewed-by: Richard Elling Reviewed-by: Gregor Kopka Reviewed-by: Kash Pande Reviewed-by: Brian Behlendorf Reviewed-by: Matthew Ahrens Signed-off-by: Don Brady Closes #5182 --- include/sys/fs/zfs.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/sys/fs') diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index c8c7cebae..6bbf84346 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -26,6 +26,7 @@ * Copyright (c) 2013, 2017 Joyent, Inc. All rights reserved. * Copyright (c) 2014 Integros [integros.com] * Copyright (c) 2017 Datto Inc. + * Copyright (c) 2017, Intel Corporation. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -181,6 +182,7 @@ typedef enum { ZFS_PROP_KEY_GUID, ZFS_PROP_KEYSTATUS, ZFS_PROP_REMAPTXG, /* not exposed to the user */ + ZFS_PROP_SPECIAL_SMALL_BLOCKS, ZFS_NUM_PROPS } zfs_prop_t; @@ -713,6 +715,7 @@ typedef struct zpool_load_policy { #define ZPOOL_CONFIG_MMP_TXG "mmp_txg" /* not stored on disk */ #define ZPOOL_CONFIG_MMP_HOSTNAME "mmp_hostname" /* not stored on disk */ #define ZPOOL_CONFIG_MMP_HOSTID "mmp_hostid" /* not stored on disk */ +#define ZPOOL_CONFIG_ALLOCATION_BIAS "alloc_bias" /* not stored on disk */ /* * The persistent vdev state is stored as separate values rather than a single @@ -759,6 +762,14 @@ typedef struct zpool_load_policy { #define VDEV_TOP_ZAP_POOL_CHECKPOINT_SM \ "com.delphix:pool_checkpoint_sm" +#define VDEV_TOP_ZAP_ALLOCATION_BIAS \ + "org.zfsonlinux:allocation_bias" + +/* vdev metaslab allocation bias */ +#define VDEV_ALLOC_BIAS_LOG "log" +#define VDEV_ALLOC_BIAS_SPECIAL "special" +#define VDEV_ALLOC_BIAS_DEDUP "dedup" + /* * This is needed in userland to report the minimum necessary device size. */ -- cgit v1.2.3