Whamcloud - gitweb
LU-13881 pcc: comparator support for PCC rules 85/39585/20
authorQian Yingjin <qian@ddn.com>
Thu, 6 Aug 2020 08:29:21 +0000 (16:29 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 5 Jun 2024 04:48:06 +0000 (04:48 +0000)
commit3835f4d31e6f0cad8a9fca989f056dde018a1f06
treeb46cb2f62563b72ad574ac29cf3f490854ff5537
parentc74878caa79305f77ba93eaa876bcc433dacc556
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}"

EX-2872 pcc: mtime rule for 'lctl pcc add'

Add an "mtime>N" rule to allow skipping files for PCC-RO auto-attach
if they were created or modified more than N seconds ago.  Otherwise,
it may be that files are added to the PCC cache before they finished
writing, or if they will be modified again quickly after creation.
Was-Change-Id: Ibb99bff5b483717ae6e5b83f82f1bcd86c3ebbe5

This patch disabled sanity-pcc/test_33 on rhel9.3 kernel until the
inconsistent LSOM problem is solved.

EX-bug-id: EX-2872
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I9f024eb6903f5652ba3cf04fa289456803493b2c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/39585
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@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