Details
-
Technical task
-
Resolution: Fixed
-
Major
-
Lustre 2.7.0
-
None
-
15365
Description
For remote transaction (only update remote objects in the transaction), the set_attr/set_xattr RPC should not be prepared in declare phase. According to our current transaction/ dt_object_lock framework, the transaction sponsor will start the transaction firstly, then try to acquire related dt_object_lock if needed. That is a general rule, and the LFSCK needs to follow such rule when repair inconsistent linkEA, in spite of local or remote MDT-object.
For linkEA repairing case, before the LFSCK thread obtained dt_object_lock on the target MDT-object, it cannot know whether the MDT-object has linkEA or not, neither invalid or not.
Since the LFSCK cannot hold dt_object_lock before the (remote) transaction start (otherwise there will be potential deadlock), it cannot prepare related RPC for repairing during the declare phase as other normal transactions do.
To resolve the trouble, we should make OSP to prepare related RPC (set_attr/set_xattr/del_xattr) after remote transaction started, and trigger the remote updating when trans_stop. Then the up layer users, such as LFSCK, can follow the general rule to handle trans_start/dt_object_lock for repairing linkEA inconsistency without distinguishing remote MDT-object.