[Devel] [PATCH rh7] Resurrect proc fairsched files

Vladimir Davydov vdavydov at virtuozzo.com
Fri Jun 24 03:07:32 PDT 2016


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 86065072a9ca..757dde99ef0f 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
 
-- 
2.1.4



More information about the Devel mailing list