RFC autofs4 - update autofs4 to deal with VFS locking change
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest11 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | Subject: [PATCH] vfs: make real_lookup do dentry revalidation with i_mutex heldfs/ | +31 | 0 replies | |
| 2/11 | autofs4 - use macros for active list handlingfs/ fs/ fs/ | +38 | 0 replies | |
| 3/11 | autofs4 - use macros for expiring listfs/ fs/ | +29 | 0 replies | |
| 4/11 | autofs4 - use macro for need mount checkfs/ | +10 | 0 replies | |
| 5/11 | autofs4 - use autofs_info for pending flagfs/ fs/ fs/ | +35 | 0 replies | |
| 6/11 | autofs4 - renamer unhashed to active in autofs4_lookup()fs/ | +10 | 0 replies | |
| 7/11 | autofs4 - cleanup active and expire lookupfs/ | +10 | 0 replies | |
| 8/11 | autofs4 - eliminate d_unhashed in path walk checksfs/ | +3 | 0 replies | |
| 9/11 | autofs4 - rename dentry to active in autofs4_lookup_active()fs/ | +12 | 0 replies | |
| 10/11 | autofs4 - rename dentry to expiring in autofs4_lookup_expiring()fs/ | +12 | 0 replies | |
| 11/11 | autofs4 - always use lookup for lookupfs/ fs/ fs/ +1 more | +330 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 00/11] autofs4 - update autofs4 to deal with VFS locking change
A change to the VFS path walk locking is needed to resolve an issue identified by Sage Weil. This locking change requires significant changes to the autofs4 module to allow it to callback to userspace without introducing a deadlock.
To cope with the change the autofs4 module needs to redirect mount requests from ->d_revalidate() to ->lookup() if the directory inode mutex is held when a callback needs to be done. Note that we cannot redirect these requests when the mutex is not held because, to function correctly, the mutex must be held over both revalidate and lookup.
Of the patches in the series most are cleanups and refactoring done to keep the real change in "autofs4 - always use lookup for lookup" as clean as possible. Unfortuneately, there is still quite a bit left in it.
Also, I need confirmation that the patch that changes the VFS path walk locking is in fact correct, or at least like for like to what will be submitted. I had some difficulty with the original patches that were paosted. The patch in question below is "vfs: make real_lookup do dentry revalidation with i_mutex held".
I've done quite a bit of fairly heavy stress testing of the patch series and they (finally) hold up to it. Although I have also managed to uncover a locking bug in the user space daemon as a result, ;)
---
Ian Kent (10):
autofs4 - always use lookup for lookup
autofs4 - rename dentry to expiring in autofs4_lookup_expiring() autofs4 - rename dentry to active in autofs4_lookup_active() autofs4 - eliminate d_unhashed in path walk checks autofs4 - cleanup active and expire lookup
autofs4 - renamer unhashed to active in autofs4_lookup() autofs4 - use autofs_info for pending flag
autofs4 - use macro for need mount check
autofs4 - use macros for expiring list
autofs4 - use macros for active list handling
Sage Weil (1):
Subject: [PATCH] vfs: make real_lookup do dentry revalidation with i_mutex held
fs/autofs4/autofs_i.h | 38 +++ fs/autofs4/expire.c | 8 - fs/autofs4/inode.c | 2 fs/autofs4/root.c | 616 ++++++++++++++++++++++++++++++++----------------- fs/namei.c | 58 ++--- 5 files changed, 480 insertions(+), 242 deletions(-)
Signature · 1 line
Ian