[Devel] [PATCH RHEL COMMIT] ve/nfsd: disable legacy recovery tracking for containers
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Oct 1 18:40:15 MSK 2021
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after ark-5.14
------>
commit 98fe43b811ba20ea60763b1db7175a611348161c
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date: Fri Oct 1 18:40:14 2021 +0300
ve/nfsd: disable legacy recovery tracking for containers
Look like the initial idea wasn't that good.
Legacy tracker is not supported in a container. But it's selected, if UMH
tracked is unaccessible. And legacy's "init" callback is always failing.
This means, that old "cld" tracker is always skipped, which is not, what
we want.
So, let's disable legacy tracker check in a container at all.
https://jira.sw.ru/browse/PSBM-43468
Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
(cherry-picked from vz8 commit 8842e721373f ("ve/nfsd: disable legacy
recovery tracking for containers"))
Signed-off-by: Nikita Yushchenko <nikita.yushchenko at virtuozzo.com>
---
fs/nfsd/nfs4recover.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index c9aba04bac56..026477c1d071 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -2047,18 +2047,20 @@ nfsd4_client_tracking_init(struct net *net)
if (!status)
return status;
- /*
- * Finally, See if the recoverydir exists and is a directory.
- * If it is, then use the legacy ops.
- */
- nn->client_tracking_ops = &nfsd4_legacy_tracking_ops;
- status = kern_path(nfs4_recoverydir(), LOOKUP_FOLLOW, &path);
- if (!status) {
- status = d_is_dir(path.dentry);
- path_put(&path);
+ if (net_eq(net, &init_net)) {
+ /*
+ * Finally, See if the recoverydir exists and is a directory.
+ * If it is, then use the legacy ops.
+ */
+ nn->client_tracking_ops = &nfsd4_legacy_tracking_ops;
+ status = kern_path(nfs4_recoverydir(), LOOKUP_FOLLOW, &path);
if (!status) {
- status = -EINVAL;
- goto out;
+ status = d_is_dir(path.dentry);
+ path_put(&path);
+ if (!status) {
+ status = -EINVAL;
+ goto out;
+ }
}
}
More information about the Devel
mailing list