Release 4.11 drivers/xen/xenfs/super.c
/*
* xenfs.c - a filesystem for passing info between the a domain and
* the hypervisor.
*
* 2008-10-07 Alex Zeffertt Replaced /proc/xen/xenbus with xenfs filesystem
* and /proc/xen compatibility mount point.
* Turned xenfs into a loadable module.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/magic.h>
#include <xen/xen.h>
#include <xen/xenbus.h>
#include "xenfs.h"
#include "../privcmd.h"
#include <asm/xen/hypervisor.h>
MODULE_DESCRIPTION("Xen filesystem");
MODULE_LICENSE("GPL");
static ssize_t capabilities_read(struct file *file, char __user *buf,
size_t size, loff_t *off)
{
char *tmp = "";
if (xen_initial_domain())
tmp = "control_d\n";
return simple_read_from_buffer(buf, size, off, tmp, strlen(tmp));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jeremy Fitzhardinge | 55 | 100.00% | 1 | 100.00% |
Total | 55 | 100.00% | 1 | 100.00% |
static const struct file_operations capabilities_file_ops = {
.read = capabilities_read,
.llseek = default_llseek,
};
static int xenfs_fill_super(struct super_block *sb, void *data, int silent)
{
static struct tree_descr xenfs_files[] = {
[2] = { "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
{ "capabilities", &capabilities_file_ops, S_IRUGO },
{ "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR },
{""},
};
static struct tree_descr xenfs_init_files[] = {
[2] = { "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
{ "capabilities", &capabilities_file_ops, S_IRUGO },
{ "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR },
{ "xsd_kva", &xsd_kva_file_ops, S_IRUSR|S_IWUSR},
{ "xsd_port", &xsd_port_file_ops, S_IRUSR|S_IWUSR},
#ifdef CONFIG_XEN_SYMS
{ "xensyms", &xensyms_ops, S_IRUSR},
#endif
{""},
};
return simple_fill_super(sb, XENFS_SUPER_MAGIC,
xen_initial_domain() ? xenfs_init_files : xenfs_files);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Al Viro | 68 | 41.72% | 1 | 12.50% |
Alex Zeffertt | 44 | 26.99% | 1 | 12.50% |
Jeremy Fitzhardinge | 19 | 11.66% | 2 | 25.00% |
Ian Campbell | 16 | 9.82% | 1 | 12.50% |
Boris Ostrovsky | 14 | 8.59% | 1 | 12.50% |
Bastian Blank | 2 | 1.23% | 2 | 25.00% |
Total | 163 | 100.00% | 8 | 100.00% |
static struct dentry *xenfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name,
void *data)
{
return mount_single(fs_type, flags, data, xenfs_fill_super);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Alex Zeffertt | 32 | 86.49% | 1 | 33.33% |
Jeremy Fitzhardinge | 3 | 8.11% | 1 | 33.33% |
Al Viro | 2 | 5.41% | 1 | 33.33% |
Total | 37 | 100.00% | 3 | 100.00% |
static struct file_system_type xenfs_type = {
.owner = THIS_MODULE,
.name = "xenfs",
.mount = xenfs_mount,
.kill_sb = kill_litter_super,
};
MODULE_ALIAS_FS("xenfs");
static int __init xenfs_init(void)
{
if (xen_domain())
return register_filesystem(&xenfs_type);
pr_info("not registering filesystem on non-xen platform\n");
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Alex Zeffertt | 22 | 75.86% | 1 | 20.00% |
Jeremy Fitzhardinge | 5 | 17.24% | 3 | 60.00% |
Joe Perches | 2 | 6.90% | 1 | 20.00% |
Total | 29 | 100.00% | 5 | 100.00% |
static void __exit xenfs_exit(void)
{
if (xen_domain())
unregister_filesystem(&xenfs_type);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Alex Zeffertt | 19 | 95.00% | 1 | 50.00% |
Jeremy Fitzhardinge | 1 | 5.00% | 1 | 50.00% |
Total | 20 | 100.00% | 2 | 100.00% |
module_init(xenfs_init);
module_exit(xenfs_exit);
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Alex Zeffertt | 183 | 44.42% | 1 | 5.56% |
Jeremy Fitzhardinge | 99 | 24.03% | 7 | 38.89% |
Al Viro | 72 | 17.48% | 2 | 11.11% |
Ian Campbell | 16 | 3.88% | 1 | 5.56% |
Boris Ostrovsky | 14 | 3.40% | 1 | 5.56% |
Joe Perches | 9 | 2.18% | 1 | 5.56% |
Bastian Blank | 6 | 1.46% | 2 | 11.11% |
Eric W. Biedermann | 5 | 1.21% | 1 | 5.56% |
Arnd Bergmann | 5 | 1.21% | 1 | 5.56% |
Juergen Gross | 3 | 0.73% | 1 | 5.56% |
Total | 412 | 100.00% | 18 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.