Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

EX-1932 handle softlinks for llapi queries #2325

Merged
merged 4 commits into from
Oct 14, 2020
Merged

EX-1932 handle softlinks for llapi queries #2325

merged 4 commits into from
Oct 14, 2020

Conversation

beevans
Copy link
Contributor

@beevans beevans commented Oct 12, 2020

When constructing an llapi instance from a random path
liblustreapi first resolves that path fully, including
symbolic links. This causes a failure when trying to
get an llapi instance from a symbolic link that lives on
a lustre filesystem (ex /mnt/lustre/symbolic_link)

If the path passed into search_fsname is a link, use
the parent dir instead.

Signed-off-by: Ben Evans beevans@whamcloud.com


This change is Reviewable

When constructing an llapi instance from a random path
liblustreapi first resolves that path fully, including
symbolic links.  This causes a failure when trying to
get an llapi instance from a symbolic link that lives on
a lustre filesystem (ex /mnt/lustre/symbolic_link)

If the path passed into search_fsname is a link, use
the parent dir instead.

Signed-off-by: Ben Evans <beevans@whamcloud.com>
@beevans beevans self-assigned this Oct 12, 2020
liblustreapi/src/lib.rs Outdated Show resolved Hide resolved
Signed-off-by: Ben Evans <beevans@whamcloud.com>
Signed-off-by: Ben Evans <beevans@whamcloud.com>
liblustreapi/src/lib.rs Outdated Show resolved Hide resolved
Signed-off-by: Ben Evans <beevans@whamcloud.com>
@jgrund jgrund self-requested a review October 13, 2020 14:04
@jgrund jgrund merged commit 721afa0 into master Oct 14, 2020
@jgrund jgrund deleted the EX-1932 branch October 14, 2020 13:00
jgrund pushed a commit that referenced this pull request Oct 14, 2020
* EX-1932 handle softlinks for llapi queries

When constructing an llapi instance from a random path
liblustreapi first resolves that path fully, including
symbolic links.  This causes a failure when trying to
get an llapi instance from a symbolic link that lives on
a lustre filesystem (ex /mnt/lustre/symbolic_link)

If the path passed into search_fsname is a link, use
the parent dir instead.

Signed-off-by: Ben Evans <beevans@whamcloud.com>

* Code review fixes

Signed-off-by: Ben Evans <beevans@whamcloud.com>

* Indent code correctly

Signed-off-by: Ben Evans <beevans@whamcloud.com>

* More review comments

Signed-off-by: Ben Evans <beevans@whamcloud.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants