[Devel] [PATCH RHEL7 COMMIT] ve: Print ve_name instead of veid to the kernel log
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Jun 22 05:20:05 PDT 2015
The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.15
------>
commit 9f992bcf7ccbdbb0991751b91a613a6288bb8be5
Author: Vladimir Davydov <vdavydov at parallels.com>
Date: Mon Jun 22 16:20:05 2015 +0400
ve: Print ve_name instead of veid to the kernel log
For UUID-named containers veid is meaningless.
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
drivers/tty/sysrq.c | 4 ++--
fs/namespace.c | 4 ++--
kernel/kmod.c | 4 ++--
kernel/ve/vznetstat/ip_vznetstat.c | 8 ++++----
net/netfilter/nf_conntrack_core.c | 4 ++--
net/netfilter/nf_conntrack_expect.c | 4 ++--
6 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index fe0b813..de29f8e 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -1035,8 +1035,8 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
if (ve_is_super(cur))
__handle_sysrq(c, false);
else if (pnum--)
- printk("SysRq: CT#%u sent '%c' magic key.\n",
- cur->veid, c);
+ printk("SysRq: CT#%s sent '%c' magic key.\n",
+ cur->ve_name, c);
}
return count;
diff --git a/fs/namespace.c b/fs/namespace.c
index 0330418..154746c 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1889,9 +1889,9 @@ again:
goto again;
case 1:
if (*data_pp) {
- ve_printk(VE_LOG_BOTH, KERN_WARNING "VE%u: no allowed "
+ ve_printk(VE_LOG_BOTH, KERN_WARNING "VE%s: no allowed "
"mount options found for device %u:%u\n",
- ve->veid, MAJOR(dev), MINOR(dev));
+ ve->ve_name, MAJOR(dev), MINOR(dev));
err = -EPERM;
} else
err = 0;
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 04948ee..691f430 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -888,8 +888,8 @@ int call_usermodehelper_fns_ve(struct ve_struct *ve,
}
if (wait > UMH_WAIT_EXEC) {
- printk(KERN_ERR "VE#%d: Sleeping call for containers UMH is "
- "not supported\n", ve->veid);
+ printk(KERN_ERR "VE#%s: Sleeping call for containers UMH is "
+ "not supported\n", ve->ve_name);
err = -EINVAL;
goto out_put;
}
diff --git a/kernel/ve/vznetstat/ip_vznetstat.c b/kernel/ve/vznetstat/ip_vznetstat.c
index f9b0aab..ff33dc5 100644
--- a/kernel/ve/vznetstat/ip_vznetstat.c
+++ b/kernel/ve/vznetstat/ip_vznetstat.c
@@ -43,10 +43,10 @@ static unsigned int venet_acct_in_hook(const struct nf_hook_ops *hook,
goto out;
#if VZNS_DEBUG
- printk("%s: in %s, out %s, size %d, in->owner_env=%d\n",
+ printk("%s: in %s, out %s, size %d, in->owner_env=%s\n",
__FUNCTION__, in ? in->name : NULL, out ? out->name : NULL,
venet_acct_skb_size(skb),
- in ? in->nd_net->owner_ve->veid : -1);
+ in ? in->nd_net->owner_ve->ve_name : -1);
#endif
/*
@@ -88,9 +88,9 @@ static unsigned int venet_acct_out_hook(const struct nf_hook_ops *hook,
goto out_hdr_error;
#if VZNS_DEBUG
- printk("%s: in %s, out %s, size %d, out->owner_env=%d\n",
+ printk("%s: in %s, out %s, size %d, out->owner_env=%s\n",
__FUNCTION__, in ? in->name : NULL, out ? out->name : NULL,
- venet_acct_skb_size(skb), out ? out->nd_net->owner_ve->veid : -1);
+ venet_acct_skb_size(skb), out ? out->nd_net->owner_ve->ve_name : -1);
#endif
/*
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index d0b2af5..dc22438 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -695,9 +695,9 @@ __nf_conntrack_alloc(struct net *net, u16 zone,
unlikely(atomic_read(&net->ct.count) > ct_max)) {
if (!early_drop(net, hash_bucket(hash, net))) {
atomic_dec(&net->ct.count);
- net_veboth_ratelimited(KERN_WARNING "VE%u: "
+ net_veboth_ratelimited(KERN_WARNING "VE%s: "
"nf_conntrack table full, dropping packet\n",
- net->owner_ve->veid);
+ net->owner_ve->ve_name);
return ERR_PTR(-ENOMEM);
}
}
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index bfa95fd..42684c8 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -408,9 +408,9 @@ static inline int __nf_ct_expect_check(struct nf_conntrack_expect *expect)
}
if (net->ct.expect_count >= init_net.ct.expect_max) {
- net_veboth_ratelimited(KERN_WARNING "VE%u "
+ net_veboth_ratelimited(KERN_WARNING "VE%s "
"nf_conntrack: expectation table full\n",
- net->owner_ve->veid);
+ net->owner_ve->ve_name);
ret = -EMFILE;
}
out:
More information about the Devel
mailing list