Print this page
Use the LZ4 algorithm to compress metadata when the corresponding feature is enabled

*** 25,34 **** --- 25,35 ---- * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. + * Copyright (c) 2014, Nexenta Systems, Inc. All rights reserved. */ /* * ZFS ioctls. *
*** 2451,2491 **** (void) zfs_ioc_userspace_upgrade(zc); kmem_free(zc, sizeof (zfs_cmd_t)); } break; } - case ZFS_PROP_COMPRESSION: - { - if (intval == ZIO_COMPRESS_LZ4) { - spa_t *spa; - - if ((err = spa_open(dsname, &spa, FTAG)) != 0) - return (err); - - /* - * Setting the LZ4 compression algorithm activates - * the feature. - */ - if (!spa_feature_is_active(spa, - SPA_FEATURE_LZ4_COMPRESS)) { - if ((err = zfs_prop_activate_feature(spa, - SPA_FEATURE_LZ4_COMPRESS)) != 0) { - spa_close(spa, FTAG); - return (err); - } - } - - spa_close(spa, FTAG); - } - /* - * We still want the default set action to be performed in the - * caller, we only performed zfeature settings here. - */ - err = -1; - break; - } - default: err = -1; } return (err); --- 2452,2461 ----