[LU-6817] (llite_lib.c:1647:ll_setattr_raw()) [0x200000401:0x342:0x0]HSM set dirty failed: rc2 = -22 Created: 08/Jul/15  Updated: 18/Aug/15  Resolved: 18/Aug/15

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

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: Zhenyu Xu
Resolution: Fixed Votes: 0
Labels: hsm, llite

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Concurrent write and truncates to a file cause clients to try to set HS_DIRTY on the file even if the file was never archived.

# while true; do echo XXX >> f0; done &
# while true; do truncate --size=13 f0; done &

t login: [109280.708508] LustreError: 12321:0:(llite_lib.c:1647:ll_setattr_raw()) [0x200000401:0x1:0x0]HSM set dirty failed: rc2 = -22
[109280.712174] LustreError: 12321:0:(llite_lib.c:1647:ll_setattr_raw()) Skipped 18 previous similar messages
[109314.024737] LustreError: 17287:0:(llite_lib.c:1647:ll_setattr_raw()) [0x200000401:0x1:0x0]HSM set dirty failed: rc2 = -22
[109314.026936] LustreError: 17287:0:(llite_lib.c:1647:ll_setattr_raw()) Skipped 39 previous similar messages


 Comments   
Comment by Bob Glossman (Inactive) [ 08/Jul/15 ]

I'm suddenly seeing a lot of errors like this logged all the time. doesn't require overlapping write/trunc to make it happen as far as I can tell.

This error was introduced by recent commit 6acf93339ad3297f2e5c659f2269c05df6198f74 in master for LU-5823 llite: Remove access of stripe in ll_setattr_raw (I think).

Comment by Peter Jones [ 08/Jul/15 ]

Bobijam

Could you please look into this issue?

Thanks

Peter

Comment by Jinshan Xiong (Inactive) [ 09/Jul/15 ]

This message is harmless. The root cause of this problem is that LLIF_DATA_MODIFIED is used to identify if a file has been restored. Based on the chance of this happening, I would like to fix this problem by:

1. clear LLIF_DATA_MODIFIED before sending MDS_DATA_MODIFIED;

        if (!hsm_import && attr->ia_valid & ATTR_SIZE) {
                /* If we are changing file size, file content is
                 * modified, flag it. */
                attr->ia_valid |= MDS_OPEN_OWNEROVERRIDE;
                op_data->op_bias |= MDS_DATA_MODIFIED;
>>>>>> New code
                ll_file_clear_flag(lli, LLIF_DATA_MODIFIED);

This way it can reduce the chance of this happening.

2. Since it's still a legal race for write and truncate happening on the same time, we should change CERROR of this message to CDEBUG(D_INFO, ...).

Comment by Gerrit Updater [ 09/Jul/15 ]

Bobi Jam (bobijam@hotmail.com) uploaded a new patch: http://review.whamcloud.com/15541
Subject: LU-6817 llite: lower message level for ll_setattr_raw()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: eefae9e4afc12796a39f4cb9b1f1dd33e264ae47

Comment by Gerrit Updater [ 18/Aug/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15541/
Subject: LU-6817 llite: lower message level for ll_setattr_raw()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5291d454d49cd6048b815382fc5647712c277c1d

Comment by Peter Jones [ 18/Aug/15 ]

Landed for 2.8

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