[LU-11258] lfs hsm_set generates spurious HE_ARCHIVE changelog events Created: 16/Aug/18  Updated: 23/Jun/21  Resolved: 23/Jun/21

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.10.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Olaf Weber Assignee: John Hammond
Resolution: Won't Fix Votes: 0
Labels: HSM, changelog

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

When you run a lfs hsm_set that does not change the hsm state of the file in question, a CL_HSM/HE_ARCHIVE changelog entry is generated.

[root@lustre-client1 tmp]# touch foo
142962 01CREAT 11:40:46.550070582 2018.08.16 0x0 t=[0x240018aa1:0x72:0x0] ef=0xf u=0:0 nid=192.168.131.17@tcp1 p=[0x240016b60:0x3:0x0] foo
142963 11CLOSE 11:40:46.556858619 2018.08.16 0x42 t=[0x240018aa1:0x72:0x0] ef=0xf u=0:0 nid=192.168.131.17@tcp1
[root@lustre-client1 tmp]# lfs hsm_set --exists foo
142964 16HSM   11:43:11.612093202 2018.08.16 0x280 t=[0x240018aa1:0x72:0x0] ef=0xf u=0:0 nid=192.168.131.17@tcp1
142965 11CLOSE 11:43:11.620994771 2018.08.16 0x2 t=[0x240018aa1:0x72:0x0] ef=0xf u=0:0 nid=192.168.131.17@tcp1
[root@lustre-client1 tmp]# lfs hsm_set --exists foo
142966 16HSM   11:43:27.083503844 2018.08.16 0x0 t=[0x240018aa1:0x72:0x0] ef=0xf u=0:0 nid=192.168.131.17@tcp1
142967 11CLOSE 11:43:27.092638243 2018.08.16 0x2 t=[0x240018aa1:0x72:0x0] ef=0xf u=0:0 nid=192.168.131.17@tcp1

The first hsm_set yields a 16HSM entry with flags 0x280, which is HE_STATE and no error. The second yields an entry with flags 0x0, which is HE_ARCHIVE and no error.

Part of the code at issue is mdd_hsm_update_locked() which sets the cl_flags value to include HE_STATE only if the HSM flags changed. If there was no change the default value 0 remains in place, and this happens to correspond to HE_ARCHIVE and no error.

This appears to have been introduced by LU-7264 and so should be limited to 2.10 and later.



 Comments   
Comment by Peter Jones [ 16/Aug/18 ]

John is looking into this

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