mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
Illumos 4924 - LZ4 Compression for metadata
Reviewed by Matthew Ahrens <mahrens@delphix.com> Reviewed by Saso Kiselkov <skiselkov.ml@gmail.com> Approved by: Christopher Siden <christopher.siden@delphix.com> References: https://github.com/illumos/illumos-gate/commit/b8289d2 https://www.illumos.org/issues/3756 Porting notes: The static function zfs_prop_activate_feature() was removed because this change removes the only caller. The function was not removed from Illumos but instead left as dead code. However, to keep gcc happy it was removed from Linux and may be easily restored if needed. Ported by: DHE <git@dehacked.net> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1540
This commit is contained in:
committed by
Brian Behlendorf
parent
ba232d8aea
commit
62bdd5eb7a
+17
-1
@@ -22,7 +22,7 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013 by Delphix. All rights reserved.
|
||||
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013, 2014, Nexenta Systems, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -6209,6 +6209,22 @@ spa_sync_upgrades(spa_t *spa, dmu_tx_t *tx)
|
||||
spa->spa_uberblock.ub_version >= SPA_VERSION_FEATURES) {
|
||||
spa_feature_create_zap_objects(spa, tx);
|
||||
}
|
||||
|
||||
/*
|
||||
* LZ4_COMPRESS feature's behaviour was changed to activate_on_enable
|
||||
* when possibility to use lz4 compression for metadata was added
|
||||
* Old pools that have this feature enabled must be upgraded to have
|
||||
* this feature active
|
||||
*/
|
||||
if (spa->spa_uberblock.ub_version >= SPA_VERSION_FEATURES) {
|
||||
boolean_t lz4_en = spa_feature_is_enabled(spa,
|
||||
SPA_FEATURE_LZ4_COMPRESS);
|
||||
boolean_t lz4_ac = spa_feature_is_active(spa,
|
||||
SPA_FEATURE_LZ4_COMPRESS);
|
||||
|
||||
if (lz4_en && !lz4_ac)
|
||||
spa_feature_incr(spa, SPA_FEATURE_LZ4_COMPRESS, tx);
|
||||
}
|
||||
rrw_exit(&dp->dp_config_rwlock, FTAG);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user