[LU-16320] Pack parent directory layout version in client request Created: 17/Nov/22  Updated: 17/Nov/22

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Lai Siyao Assignee: Lai Siyao
Resolution: Unresolved Votes: 0
Labels: None

Rank (Obsolete): 9223372036854775807

 Description   

If directory layout is changed, client may send request to wrong MDT based on the old layout, e.g. directory split from 2 stripes to 3 stripes, client created a sub file under stripe2 in old layout, but this file should be located on stripe3 in new layout.

To avoid such race, client can pack parent layout version in request, and MDT will compare layout version before processing, if mismatch, return -EAGAIN with a certain flag to client, and client can update directory layout and try again.

Combined with FID map in LU-7607, directory layout change may become opaque to user applications in most cases.



 Comments   
Comment by Andreas Dilger [ 17/Nov/22 ]

Returning EAGAIN might be confusing in some cases. What about EREMOTE?

Comment by Oleg Drokin [ 17/Nov/22 ]

as long as it results in layout refresh and retry it probably does not matter, but since EAGAIN means so many other things, perhaps ESTALE and friend might be a better choice?

EREMOTE might not even be a correct choice because the stale layout could result in an RPC to a correct MDT, but we don't really know on the server, right?

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