cas_cache: IO classification based on request size.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
parent
a93cf22b60
commit
83a3cb693f
@ -545,6 +545,14 @@ static cas_cls_eval_t _cas_cls_file_offset_test(
|
||||
return _cas_cls_numeric_test_u(c, offset);
|
||||
}
|
||||
|
||||
/* Request size test function */
|
||||
static cas_cls_eval_t _cas_cls_request_size_test(
|
||||
struct cas_classifier *cls, struct cas_cls_condition *c,
|
||||
struct cas_cls_io *io, ocf_part_id_t part_id)
|
||||
{
|
||||
return _cas_cls_numeric_test_u(c, CAS_BIO_BISIZE(io->bio));
|
||||
}
|
||||
|
||||
/* Array of condition handlers */
|
||||
static struct cas_cls_condition_handler _handlers[] = {
|
||||
{ "done", _cas_cls_done_test, _cas_cls_generic_ctr },
|
||||
@ -564,6 +572,8 @@ static struct cas_cls_condition_handler _handlers[] = {
|
||||
_cas_cls_generic_dtr },
|
||||
{ "file_offset", _cas_cls_file_offset_test, _cas_cls_numeric_ctr,
|
||||
_cas_cls_generic_dtr },
|
||||
{ "request_size", _cas_cls_request_size_test, _cas_cls_numeric_ctr,
|
||||
_cas_cls_generic_dtr },
|
||||
#ifdef CAS_WLTH_SUPPORT
|
||||
{ "wlth", _cas_cls_wlth_test, _cas_cls_numeric_ctr,
|
||||
_cas_cls_generic_dtr},
|
||||
|
Loading…
Reference in New Issue
Block a user