[LU-13693] lfs getstripe should avoid opening regular files Created: 17/Jun/20 Updated: 04/Dec/21 Resolved: 23/Jun/20 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.14.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | John Hammond | Assignee: | John Hammond |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Severity: | 3 | ||||||||||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||||||||||
| Description |
|
lfs getstripe uses an ioctl on the parent directory to get the file striping but still opens the file to call the OBD_IOC_GETNAME ioctl in get_mds_md_size(). Rather than doing this we should just use a large enough size for the lum buffer. This avoids interfering with existing file locks and leases on the file. |
| Comments |
| Comment by Gerrit Updater [ 18/Jun/20 ] |
|
John L. Hammond (jhammond@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/38979 |
| Comment by Andreas Dilger [ 18/Jun/20 ] |
|
Does it make sense to check in ll_lov_getstripe_ea_info() if the filename is already in the client dcache and get the xattr directly from the client cache, something like:
qstr = QSTR_INIT(filename, strlen(filename));
dchild = d_lookup(dparent, &qstr);
(dparent can be passed from the caller). The benefit of this would depend on whether the file is typically already present on the client when "lfs getstripe" is called or not, but the dcache lookup would be much lower overhead than an RPC (an O(1) lockless hash table lookup for the dcache these days). |
| Comment by Gerrit Updater [ 23/Jun/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38979/ |
| Comment by Peter Jones [ 23/Jun/20 ] |
|
Landed for 2.14 |
| Comment by Gerrit Updater [ 23/Jun/20 ] |
|
John L. Hammond (jhammond@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39159 |
| Comment by Gerrit Updater [ 04/Jul/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39159/ |