[LU-15833] Don't use realpath in llapi_search_fsname. Created: 09/May/22  Updated: 28/Mar/23  Resolved: 12/Sep/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.16.0, Lustre 2.15.3

Type: Improvement Priority: Minor
Reporter: Etienne Aujames Assignee: Etienne Aujames
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
Rank (Obsolete): 9223372036854775807

 Description   

llapi_search_fsname() uses to determine the mountpoint of a path and then return its fsname.

realpath() executes lstat() for each component of the path: this means that the client must have a LDLM read lock on every directory in the path.
These operations can be slow when some clients modify parent directories.

We can use st_dev or llapi_get_name to reduce the number of stats.



 Comments   
Comment by Gerrit Updater [ 09/May/22 ]

"Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/47258
Subject: LU-15833 llapi: don't use realpath in llapi_search_fsname()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2c759b6e921e433f3eff9c04270fb58f8eebd0fd

Comment by Peter Jones [ 12/Sep/22 ]

Landed for 2.16

Comment by Gerrit Updater [ 21/Dec/22 ]

"Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49482
Subject: LU-15833 llapi: don't use realpath in llapi_search_fsname()
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 495386a7a373e0abad402ddcc012daeda8003e83

Comment by Gerrit Updater [ 17/Jan/23 ]

"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49649
Subject: LU-15833 llapi: don't use realpath in llapi_search_fsname()
Project: fs/lustre-release
Branch: b2_15
Current Patch Set: 1
Commit: 0d2f682c14ae17fe096f28ffb2191ead06100041

Comment by Gerrit Updater [ 28/Mar/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49649/
Subject: LU-15833 llapi: don't use realpath in llapi_search_fsname()
Project: fs/lustre-release
Branch: b2_15
Current Patch Set:
Commit: 4b3f50d88d18a8c4a37c0de863a098141e2b84ab

Generated at Sat Feb 10 03:21:41 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.