[LU-10824] ll_umount being improper use of cached mountpoint from mount time Created: 17/Mar/18  Updated: 06/Jan/22

Status: Reopened
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.9.0, Lustre 2.10.0, Lustre 2.11.0
Fix Version/s: Upstream

Type: Bug Priority: Major
Reporter: Oleg Drokin Assignee: James A Simmons
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
is related to LU-1882 conf-sanity test_45: umount2: Device ... Resolved
is related to LU-10467 use standard linux wait_event macros Resolved
is related to LU-12511 Prepare lustre for adoption into the ... Open
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Al Viro chimed in complaining about patch from LU-1882 - http://review.whamcloud.com/20061
 
Basically the problem is we cache sbi->ll_mnt.mnt as

»       sbi->ll_mnt.mnt = current->fs->root.mnt;

This is prone to many errors, in particular: did not get reference count, so this mount struct might disappear, it does not take bind mounts into account not mount --move.
Might result in kernel panics in certain conditions.

Overall original patch is trying to "fix" something that's not broken in the kernel

If somebody does stat mountpoint in a tight loop, you will get -EBUSY there.
No matter what. What's more, you might very well get it after some check in
->umount_begin() has told you that at the moment the thing you were trying to
umount was not busy - just before the next stat hits.

The patch needs to be reworked and we just need to add some extra retrying logic in the test framework instead I guess.



 Comments   
Comment by Gerrit Updater [ 18/Aug/18 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/33025
Subject: LU-10824 llite: don't use ll_mnt to get fstype name
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 8ff4d33ad5dffea401b417a1d3052b885d51a621

Comment by Gerrit Updater [ 28/Aug/18 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33025/
Subject: LU-10824 llite: don't use ll_mnt to get fstype name
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5793d80109ac881a1e2a84307a4372f92b97cae0

Comment by Peter Jones [ 28/Aug/18 ]

Landed for 2.12

Comment by James A Simmons [ 28/Aug/18 ]

Need another patch to resolve this completely.

Comment by Gerrit Updater [ 18/Nov/21 ]

"James Simmons <jsimmons@infradead.org>" uploaded a new patch: https://review.whamcloud.com/45608
Subject: LU-10824 llite: remove may_umount() loop
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 30c075f11fea9e12839aa8921868c563db9e1c33

Comment by Gerrit Updater [ 18/Nov/21 ]

"James Simmons <jsimmons@infradead.org>" uploaded a new patch: https://review.whamcloud.com/45609
Subject: LU-10824 llite: make foreign symlinks aware of mount namespaces
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 929a30260415f03f76de9412e424c0cbf4a779e3

Comment by Gerrit Updater [ 06/Jan/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45609/
Subject: LU-10824 llite: make foreign symlinks aware of mount namespaces
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 942b4e118677af587f66ce74a3b25b0eb184678b

Generated at Sat Feb 10 02:38:30 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.