[LU-2399] create objects on truncate Created: 17/Jan/11 Updated: 19/Mar/18 Resolved: 19/Mar/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.4.0 |
| Fix Version/s: | Lustre 2.10.0 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Alex Zhuravlev | Assignee: | John Hammond |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Epic/Theme: | ORI-4 | ||||||||
| Story Points: | 3 | ||||||||
| Rank (Obsolete): | 2410 | ||||||||
| Description |
|
OSP tries to address one issue found in LOV/OSC: objid is assigned outside of transaction and this can lead to gaps in objid sequence and leaked OST objects. OSP does this assignment with transaction open. but there is one exception: truncate on a file with no objects created. if later we create OST objects (upon open for write), then MDS sends OST_PUNCH to propagate non-zero size to OST. but we can't do this holding open transaction. so we again have to assign so we have decided to avoid this situation: truncate will be creating OST objects, return newly created LOVEA back to the client and the client will essentially truncate becomes a form of open. this is especially true with |
| Comments |
| Comment by Mikhail Pershin [ 08/Oct/12 ] |
|
ticket was solved and landed, wasn't it? |
| Comment by Andreas Dilger [ 01/Nov/12 ] |
|
Alex, was this fixed in master? |
| Comment by Andreas Dilger [ 27/Nov/12 ] |
|
Alex, was this fixed when LOD landed to master? |
| Comment by Alex Zhuravlev [ 27/Nov/12 ] |
|
sorry, meant to answer on the first question, but .. so I tried to implement this, but met a problem on the client. It was months ago, /* NB: ATTR_SIZE will only be set after this point if the size
I wouldn't mind to change this though. |
| Comment by Johann Lombardi (Inactive) [ 10/Dec/12 ] |
|
TBH, i tend to think we can get rid off this code. Jinshan? |
| Comment by Jinshan Xiong (Inactive) [ 10/Dec/12 ] |
|
Johann, client code will be okay without that piece of code, however I don't know if it will affect SoM. I tend to think it's okay after checking the code. |
| Comment by Alex Zhuravlev [ 10/Dec/12 ] |
|
well, but it won't work with old clients, that's the point - originally we thought we create objects on truncate with no changes on the client side. |
| Comment by Johann Lombardi (Inactive) [ 11/Dec/12 ] |
|
Sure, but if you backport this change to 2.1 (1.8 should be fine, right?), then all configurations with 2.1, 1.8 and 2.4 clients (99% of the 2.4 installations?) won't suffer from the leak issue. There is already a client incompatibility issue with older versions due to EINPROGRESS support. |
| Comment by Alex Zhuravlev [ 11/Dec/12 ] |
|
I'm fine with that. the sooner we have this done, the sooner we can fix this issue and drop very specific bits of the code. |
| Comment by Andreas Dilger [ 15/Oct/13 ] |
|
Prototype patch in http://review.whamcloud.com/5473 |
| Comment by Andreas Dilger [ 11/Dec/13 ] |
|
The 5473 patch was abandoned, and does not implement the object create at file truncate time. This feature would be quite useful for Data-on-MDT to allow applications to specify the file size at create time and then the MDS decides what layout to use based on the specified file size (DOM for files < 1MB, 1 or few stripes for files < 1GB, widely striped for larger files). |
| Comment by Zhenyu Xu [ 09/Mar/18 ] |
|
Yes, truncate now will create enough OST objects to cover the file size . |