Merge pull request #1083 from robertbaldyga/remove-metadata-layout
Remove "metadata_layout" module parameter
This commit is contained in:
commit
3a8e3cf37c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2021 Intel Corporation
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
|
||||
extern u32 max_writeback_queue_size;
|
||||
extern u32 writeback_queue_unblock_size;
|
||||
extern u32 metadata_layout;
|
||||
extern u32 unaligned_io;
|
||||
extern u32 seq_cut_off_mb;
|
||||
extern u32 use_io_scheduler;
|
||||
@ -1897,7 +1896,6 @@ int cache_mngt_prepare_cache_cfg(struct ocf_mngt_cache_config *cfg,
|
||||
cfg->use_submit_io_fast = !use_io_scheduler;
|
||||
cfg->locked = true;
|
||||
cfg->metadata_volatile = false;
|
||||
cfg->metadata_layout = metadata_layout;
|
||||
|
||||
cfg->backfill.max_queue_size = max_writeback_queue_size;
|
||||
cfg->backfill.queue_unblock_size = writeback_queue_unblock_size;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2021 Intel Corporation
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@ -27,10 +27,6 @@ MODULE_PARM_DESC(use_io_scheduler,
|
||||
"Configure how IO shall be handled. "
|
||||
"0 - in make request function, 1 - in request function");
|
||||
|
||||
u32 metadata_layout = ocf_metadata_layout_default;
|
||||
module_param(metadata_layout, uint, (S_IRUSR | S_IRGRP));
|
||||
MODULE_PARM_DESC(metadata_layout, "Metadata layout, 0 - striping, 1 - sequential");
|
||||
|
||||
u32 unaligned_io = 1;
|
||||
module_param(unaligned_io, uint, (S_IRUSR | S_IRGRP));
|
||||
MODULE_PARM_DESC(unaligned_io,
|
||||
@ -142,12 +138,6 @@ static int __init cas_init_module(void)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (metadata_layout >= ocf_metadata_layout_max) {
|
||||
printk(KERN_ERR OCF_PREFIX_SHORT
|
||||
"Invalid value for metadata_layout parameter\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (unaligned_io != 0 && unaligned_io != 1) {
|
||||
printk(KERN_ERR OCF_PREFIX_SHORT
|
||||
"Invalid value for unaligned_io parameter\n");
|
||||
|
2
ocf
2
ocf
@ -1 +1 @@
|
||||
Subproject commit 9a956f59cd33607cefb1d965c9dfb583e6223a8a
|
||||
Subproject commit be4927f52409c5eb0bcb2078a6e536fd1e9c3cf8
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright(c) 2019-2021 Intel Corporation
|
||||
# Copyright(c) 2019-2022 Intel Corporation
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
@ -254,13 +254,6 @@ class PromotionParametersNhit:
|
||||
return nhit_params
|
||||
|
||||
|
||||
# Specify layout of metadata on SSD
|
||||
class MetadataLayout(Enum):
|
||||
striping = 0
|
||||
sequential = 1
|
||||
DEFAULT = striping
|
||||
|
||||
|
||||
# Specify how IO requests unaligned to 4KiB should be handled
|
||||
class UnalignedIo(Enum):
|
||||
PT = 0 # use PT mode
|
||||
@ -282,14 +275,12 @@ class KernelParameters:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
metadata_layout: MetadataLayout = None,
|
||||
unaligned_io: UnalignedIo = None,
|
||||
use_io_scheduler: UseIoScheduler = None,
|
||||
seq_cut_off_mb: int = None,
|
||||
max_writeback_queue_size: int = None,
|
||||
writeback_queue_unblock_size: int = None
|
||||
):
|
||||
self.metadata_layout = metadata_layout
|
||||
self.unaligned_io = unaligned_io
|
||||
self.use_io_scheduler = use_io_scheduler
|
||||
# Specify default sequential cut off threshold value in MiB
|
||||
@ -302,8 +293,7 @@ class KernelParameters:
|
||||
|
||||
def __eq__(self, other):
|
||||
return (
|
||||
equal_or_default(self.metadata_layout, other.metadata_layout, MetadataLayout.DEFAULT)
|
||||
and equal_or_default(self.unaligned_io, other.unaligned_io, UnalignedIo.DEFAULT)
|
||||
equal_or_default(self.unaligned_io, other.unaligned_io, UnalignedIo.DEFAULT)
|
||||
and equal_or_default(
|
||||
self.use_io_scheduler, other.use_io_scheduler, UseIoScheduler.DEFAULT
|
||||
)
|
||||
@ -324,7 +314,6 @@ class KernelParameters:
|
||||
@classmethod
|
||||
def DEFAULT(cls):
|
||||
return KernelParameters(
|
||||
MetadataLayout.DEFAULT,
|
||||
UnalignedIo.DEFAULT,
|
||||
UseIoScheduler.DEFAULT,
|
||||
cls.seq_cut_off_mb_DEFAULT,
|
||||
@ -336,7 +325,6 @@ class KernelParameters:
|
||||
def read_current_settings():
|
||||
module = "cas_cache"
|
||||
return KernelParameters(
|
||||
MetadataLayout(int(get_kernel_module_parameter(module, "metadata_layout"))),
|
||||
UnalignedIo(int(get_kernel_module_parameter(module, "unaligned_io"))),
|
||||
UseIoScheduler(int(get_kernel_module_parameter(module, "use_io_scheduler"))),
|
||||
int(get_kernel_module_parameter(module, "seq_cut_off_mb")),
|
||||
@ -346,8 +334,6 @@ class KernelParameters:
|
||||
|
||||
def get_parameter_dictionary(self):
|
||||
params = {}
|
||||
if self.metadata_layout not in [None, MetadataLayout.DEFAULT]:
|
||||
params["metadata_layout"] = str(self.metadata_layout.value)
|
||||
if self.unaligned_io not in [None, UnalignedIo.DEFAULT]:
|
||||
params["unaligned_io"] = str(self.unaligned_io.value)
|
||||
if self.use_io_scheduler not in [None, UseIoScheduler.DEFAULT]:
|
||||
|
Loading…
Reference in New Issue
Block a user