Whamcloud - gitweb
LU-13881 pcc: comparator support for PCC rules
authorQian Yingjin <qian@ddn.com>
Thu, 6 Aug 2020 08:29:21 +0000 (16:29 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 25 Mar 2021 14:15:53 +0000 (14:15 +0000)
commit14d3d703f4ac195efc26944acf8faec96861456a
tree2ea8cbac338a70dfe766a30b1ba90d5853ca6698
parent871da48984054628ab73c35994baf12e37ab9573
LU-13881 pcc: comparator support for PCC rules

There are increasing requirements for PCC rules to add comparator
support:
- File data larger or smaller than certain threshold should not
  auto cache in PCC (i.e. larger than the capacity of PCC backend
  on a client).
- Users can specify a range of UID/GID/ProjID for auto caching on
  PCC when define a rule;

In addition to the original equal (=) operator, this patch also
adds greater than (>) and less than (<) comparison operators.

The following rule expressions are supported:
- "projid={100}&size>{1M}&size<{500G}"
- "projid>{100}&projid<{110}"
- "uid<{1500}&uid>{1000}"

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I9f024eb6903f5652ba3cf04fa289456803493b2c
Reviewed-on: https://review.whamcloud.com/41920
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/doc/lctl-pcc.8
lustre/llite/namei.c
lustre/llite/pcc.c
lustre/llite/pcc.h
lustre/obdclass/lprocfs_status.c
lustre/tests/sanity-pcc.sh