[LU-3299] force lvb_data update after layout change Created: 08/May/13  Updated: 05/Aug/20  Resolved: 18/Jun/13

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

Type: Bug Priority: Blocker
Reporter: CEA Assignee: Jinshan Xiong (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Severity: 3
Epic: client
Rank (Obsolete): 8166

 Description   

When a file is restored the layout lock is first
associated with the released layout and after restore
it has to be associated with the new layout. This patch
forces lvb_data update in ll_layout_fetch() even if one
is present (case for released->normal state change).



 Comments   
Comment by Alex Zhuravlev [ 08/May/13 ]

I think we should stop using LVB for this purpose on the both sides.

Comment by jacques-charles lafoucriere [ 08/May/13 ]

This is to track the bug we found when porting HSM to master (see LU-3280). The patch is at http://review.whamcloud.com/6291
No need to review yet, this is just to keep trace.

Comment by Jodi Levi (Inactive) [ 09/May/13 ]

This is for 2.5

Comment by Jinshan Xiong (Inactive) [ 29/May/13 ]

Hi Alex, what's wrong with using LVB to store layout here? From my understanding, it matches the semantics of LVB very well. Needless to say we have to use LVB_READY bit in ldlm lock.

Comment by Alex Zhuravlev [ 29/May/13 ]

I don't think it matches LVB well... and in my mind LDLM locking should be separated from storage access as much as possible. this gives us possibility to use different locking (or no locking) in different cases.
Like, for example, if I create a directory, hold an exclusive lock on that directory, I can create files in that directory locally, with no LDLM/MDC involved at all - all I need is to be able to get the layout as a regular extended attribute.
and I don't quite see why do we need LVB_READY given the layout can't fit LVB sometimes and we have to use regular xattrget, which is correct and should be used for any size in general. the less special cases, the better.

Comment by Jinshan Xiong (Inactive) [ 29/May/13 ]

and in my mind LDLM locking should be separated from storage access as much as possible

This is actually a very strong requirement. Servers own resources and if we want to cache it on the client, a lock is necessary. Resources are usually a state in persistent storage. For example, the resource of an extent lock is a set of disk blocks the extent covers. Ah maybe what you meant is to not access storage so that they must be in memory cache for DLM code path?

  • all I need is to be able to get the layout as a regular extended attribute.

I agree.

and I don't quite see why do we need LVB_READY given the layout can't fit LVB sometimes and we have to use regular xattrget, which is correct and should be used for any size in general. the less special cases, the better.

This is a good question. I think this is for optimization - the root of all evil. If we could preallocate all LVB buffer with maximum size, then it would fit. We don't do this because we don't want to waste so much memory.

When you're writing if-clause in the code, actually you're having a special case, sigh

Comment by Alex Zhuravlev [ 30/May/13 ]

given frequency of layout changes I tend to think this is baraly visible optimization, to be honest.

Comment by Jodi Levi (Inactive) [ 18/Jun/13 ]

Closing ticket since patch has landed to Master. PLease let me know if additional work is needed and I will reopen the ticket.

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