[Devel] [PATCH RHEL7 COMMIT] ve/fairsched: Resurrect proc fairsched files

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jun 24 03:18:40 PDT 2016


The commit is pushed to "branch-rh7-3.10.0-327.18.2.vz7.14.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.18.2.vz7.14.19
------>
commit 97fbb9ebeb80c4698ee3384bf2f7b3bcfab7ded7
Author: Vladimir Davydov <vdavydov at virtuozzo.com>
Date:   Fri Jun 24 14:18:40 2016 +0400

    ve/fairsched: Resurrect proc fairsched files
    
    They are still required by userspace, which checks for their presence.
    Leave them empty.
    
    https://jira.sw.ru/browse/PSBM-48824
    
    Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
---
 kernel/ve/veowner.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/kernel/ve/veowner.c b/kernel/ve/veowner.c
index 8606507..757dde9 100644
--- a/kernel/ve/veowner.c
+++ b/kernel/ve/veowner.c
@@ -36,12 +36,38 @@
 struct proc_dir_entry *proc_vz_dir;
 EXPORT_SYMBOL(proc_vz_dir);
 
+static int proc_fairsched_open(struct inode *inode, struct file *file)
+{
+	return 0;
+}
+
+static ssize_t proc_fairsched_read(struct file *file, char __user *buf,
+				   size_t size, loff_t *ppos)
+{
+	return 0;
+}
+
+static struct file_operations proc_fairsched_operations = {
+	.open		= proc_fairsched_open,
+	.read		= proc_fairsched_read,
+	.llseek		= noop_llseek,
+};
+
 static void prepare_proc(void)
 {
 	proc_vz_dir = proc_mkdir_mode("vz", S_ISVTX | S_IRUGO | S_IXUGO, NULL);
 	if (!proc_vz_dir)
 		panic("Can't create /proc/vz dir\n");
+
+	/* Legacy files. They are not really needed and should be removed
+	 * sooner or later, but leave the stubs for now as they may be required
+	 * by userspace */
+
 	proc_mkdir_mode("container", 0, proc_vz_dir);
+	proc_mkdir_mode("fairsched", 0, proc_vz_dir);
+
+	proc_create("fairsched", S_ISVTX, NULL,	&proc_fairsched_operations);
+	proc_create("fairsched2", S_ISVTX, NULL, &proc_fairsched_operations);
 }
 #endif
 


More information about the Devel mailing list