Whamcloud - gitweb
LU-13023 pcc: Incorrect size after re-attach 84/36884/7
authorQian Yingjin <qian@ddn.com>
Wed, 27 Nov 2019 15:28:24 +0000 (23:28 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 3 Dec 2019 18:59:28 +0000 (18:59 +0000)
commit7a810496c2ce970294af7ad5939d43490c1817d7
tree031d21b3c7e400c86ccfc0e30cdb49636f1b54fc
parent5c8b1e87a97bbe7b05f0b8325e98c16a0de1ff4c
LU-13023 pcc: Incorrect size after re-attach

The following test case will result in incorrect size for PCC copy:
- Attach a file with size of s1 (s2 > 0) into PCC;
- Detach this file with --keep option, and the data will retain
  on PCC;
- Truncate this file locally or on an remote client to a new size
  s2 (s2 < s1);
- Re-attach the file again. The size of PCC copy is still s1.

To solve this problem, it need to truncate the size of the PCC copy
to the same size of the Lustre copy which will be HSM released
later after finished the data copy (archive) phase.
This patch also adds the handle for the signal pending when the
attach process is killed by an administrator.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I18f2c883454450bf5dc2f2b3600e2685d8f8f130
Reviewed-on: https://review.whamcloud.com/36884
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>
lustre/llite/pcc.c
lustre/tests/sanity-pcc.sh