diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2020-06-04 11:48:19 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2020-06-04 11:48:19 +0300 |
commit | df820f8de4e481222b17f9bcee7b909ae8167529 (patch) | |
tree | 8410725a7cd85f540f59120710b8617c18348670 /Documentation | |
parent | b8e42a651bdee06202ebdd96cff64fdeabd5b1d6 (diff) | |
download | linux-df820f8de4e481222b17f9bcee7b909ae8167529.tar.xz |
ovl: make private mounts longterm
Overlayfs is using clone_private_mount() to create internal mounts for
underlying layers. These are used for operations requiring a path, such as
dentry_open().
Since these private mounts are not in any namespace they are treated as
short term, "detached" mounts and mntput() involves taking the global
mount_lock, which can result in serious cacheline pingpong.
Make these private mounts longterm instead, which trade the penalty on
mntput() for a slightly longer shutdown time due to an added RCU grace
period when putting these mounts.
Introduce a new helper kern_unmount_many() that can take care of multiple
longterm mounts with a single RCU grace period.
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/filesystems/porting.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/filesystems/porting.rst b/Documentation/filesystems/porting.rst index 26c093969573..867036aa90b8 100644 --- a/Documentation/filesystems/porting.rst +++ b/Documentation/filesystems/porting.rst @@ -858,3 +858,10 @@ be misspelled d_alloc_anon(). [should've been added in 2016] stale comment in finish_open() nonwithstanding, failure exits in ->atomic_open() instances should *NOT* fput() the file, no matter what. Everything is handled by the caller. + +--- + +**mandatory** + +clone_private_mount() returns a longterm mount now, so the proper destructor of +its result is kern_unmount() or kern_unmount_array(). |