-
Qian Yingjin authored
When the inode of a PCC cached file in unused state was evicted from icache due to memory pressure or manual icache cleanup (i.e. "echo 3 > /proc/sys/vm/drop_caches"), this file will be detached from PCC also, and all PCC state for this file is cleared. In the current design, PCC only tries to auto attache the file once attached into PCC according to the in-memery PCC state. Thus later IO for the file is not directed to PCC and will trigger the data restore. If this is a not desired result for the user, then we need to try to auto attach file that was never attached into PCC or once attached but detached as a result of shrinking its inode from icache. Although the candidates to try auto attach are increased, but only the file in HSM released state (which can directly get from file layout) will be checked. This bug is easy reproduced on rhel8. It seems that the command "echo 3 > /proc/sys/vm/drop_caches" will drop all unused inodes from icache, but it is not true for rhel7. This patch also adds the check for the input parameter @rwid, which should be non zero value and same as the archive ID. Test-Parameters: clientdistro=el8 testlist=sanity-pcc,sanity-pcc Signed-off-by:
Qian Yingjin <qian@ddn.com> Change-Id: Ibb4c7c624de089766f4a56ef08ff0e2088d2e859 Reviewed-on: https://review.whamcloud.com/36892 Tested-by:
jenkins <devops@whamcloud.com> Reviewed-by:
Andreas Dilger <adilger@whamcloud.com> Reviewed-by:
Li Xi <lixi@ddn.com> Tested-by:
Maloo <maloo@whamcloud.com> Reviewed-by:
Oleg Drokin <green@whamcloud.com>
a5ef2d6e