[Devel] [PATCH RHEL7 COMMIT] ve/nfsd: disable legacy recovery tracking for containers
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Jan 28 08:00:43 PST 2016
The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.9.29
------>
commit e008ca562c7d29154ebfd7d617ea1dfe8d819285
Author: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
Date: Thu Jan 28 20:00:43 2016 +0400
ve/nfsd: disable legacy recovery tracking for containers
Look like the initial idea wasn't that good.
Lecgay tracker is not supportd 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>
---
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 4c86b18..0577c56 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -1273,17 +1273,19 @@ nfsd4_client_tracking_init(struct net *net)
if (!status)
return status;
- /*
- * 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 = S_ISDIR(path.dentry->d_inode->i_mode);
- path_put(&path);
- if (status)
- goto do_init;
+ if (net_eq(net, &init_net)) {
+ /*
+ * 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 = S_ISDIR(path.dentry->d_inode->i_mode);
+ path_put(&path);
+ if (status)
+ goto do_init;
+ }
}
/* Finally, try to use nfsdcld */
More information about the Devel
mailing list