[LU-13023] PCC: The size of the PCC copy is not truncated to 0 when attach Created: 27/Nov/19  Updated: 04/Dec/19  Resolved: 03/Dec/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.13.0

Type: Bug Priority: Minor
Reporter: Qian Yingjin Assignee: Qian Yingjin
Resolution: Fixed Votes: 0
Labels: PCC

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In the Linux kernel, it seems that dentry_open() with O_TRUNC flag (i.e. Ext4) does not take effect to truncate the size of the PCC copy to zero.

This may result in incorrect size for PCC copy in the following test cases:

  • 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 the size s2 (s2 < s1);
  • re-attach the file again.

This problem is solved by reset the file size of the PCC copy to 0 after open the PCC copy during attach. 



 Comments   
Comment by Gerrit Updater [ 27/Nov/19 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/36884
Subject: LU-13023 pcc: Size not truncated to 0 during attach
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: f0caf43a774eca3ab2afd75c2369aaadd56c8aa1

Comment by Gerrit Updater [ 03/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36884/
Subject: LU-13023 pcc: Incorrect size after re-attach
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 7a810496c2ce970294af7ad5939d43490c1817d7

Comment by Peter Jones [ 03/Dec/19 ]

Landed for 2.13

Generated at Sat Feb 10 02:57:42 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.