]> git.proxmox.com Git - pve-storage.git/commit - PVE/Storage/RBDPlugin.pm
RBD: disable and enable features depending on kernel version
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 23 Nov 2019 14:37:46 +0000 (15:37 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 23 Nov 2019 14:44:19 +0000 (15:44 +0100)
commit0ef8fb9d4da2d38c6837f7e5ff691180e035da8c
tree0b871bdea792a06f8852e3deb6cf1303309b2443
parent5102900d50f12d77ba1dfcc8e52264baf3e9dfd6
RBD: disable and enable features depending on kernel version

Modern kernel, like 5.3, support all those features ('fast-diff',
'object-map', 'deep-flatten'), so we do not want to disable them
there. 5.0 already supports exclusive-locks, so no need to disable
exclusive locking there.

Further, we also want to profit from new features available, so let's
enable those which can be enabled "live" (i.e., after image creation)
if their available.

While we could also parse the kernel information directly from:
/sys/module/libceph/parameters/supported_features
there's not much advantage to that, features cannot be disabled with
KConfig, their also very dependent of the kernel version booted.
So for us it's enough to check that one.

This only affects container and VMs backed by a storage with KRBD
explicitly enabled. But as the enabling and disabling happens
transparently, it has no effect on the running guest.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Storage/RBDPlugin.pm