[LU-16480] Lustre fiemap does not properly handle fm_extent_count=0 Created: 16/Jan/23 Updated: 12/Sep/23 Resolved: 27/Jan/23 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Andrew Perepechko | Assignee: | Andrew Perepechko |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
"fm_extent_count specifies the number of elements in the fm_extents[] array that can be used to return extents. If fm_extent_count is zero, then the fm_extents[] array is ignored (no extents will be returned), and the fm_mapped_extents count will hold the number of extents needed in fm_extents[] to hold the file’s current mapping."
https://www.kernel.org/doc/html/latest/filesystems/fiemap.html
In practice, depending on the state of the kernel thread stack, EINVAL can be returned to userspace even for simple single stripe files.
Details will follow. |
| Comments |
| Comment by Gerrit Updater [ 16/Jan/23 ] |
|
"Andrew Perepechko <andrew.perepechko@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49645 |
| Comment by Gerrit Updater [ 27/Jan/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49645/ |
| Comment by Peter Jones [ 27/Jan/23 ] |
|
Landed for 2.16 |
| Comment by Gerrit Updater [ 07/Sep/23 ] |
|
"Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52308 |