[LU-11417] Add llapi_layout_get_by_xattr() interface Created: 22/Sep/18 Updated: 19/Feb/19 Resolved: 23/Oct/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.12.0 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | Andreas Dilger |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | easy | ||
| Issue Links: |
|
||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
The code in llapi_layout_get_by_fd() should be abstracted into a new llapi_layout_get_by_xattr() helper function, which is used by the upper layers and can also be used on a "lov" xattr regardless of how it is obtained. That is useful if the xattr has been fetched from some other method, or a tarball or HSM archive, etc. |
| Comments |
| Comment by Andreas Dilger [ 25/Sep/18 ] |
|
In fact, llapi_layout_from_lum() already exists, but it is currently a static internal interface that is passed a "struct lov_user_md" but that often isn't even the real structure type. It would be more useful to have the proposed llapi_layout_get_by_xattr(char *lov_user_md, size_t lum_size) interface as a thin wrapper for the internal interface. |
| Comment by Gerrit Updater [ 25/Sep/18 ] |
|
Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33230 |
| Comment by Gerrit Updater [ 23/Oct/18 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33230/ |
| Comment by Peter Jones [ 23/Oct/18 ] |
|
Landed for 2.12 |