Release 4.7 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 "xenfs.h"
#include "../privcmd.h"
#include "../xenbus/xenbus_comms.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 | 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 | al viro | 68 | 41.72% | 1 | 12.50% |
alex zeffertt | alex zeffertt | 44 | 26.99% | 1 | 12.50% |
jeremy fitzhardinge | jeremy fitzhardinge | 19 | 11.66% | 2 | 25.00% |
ian campbell | ian campbell | 16 | 9.82% | 1 | 12.50% |
boris ostrovsky | boris ostrovsky | 14 | 8.59% | 1 | 12.50% |
bastian blank | 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 | alex zeffertt | 32 | 86.49% | 1 | 33.33% |
jeremy fitzhardinge | jeremy fitzhardinge | 3 | 8.11% | 1 | 33.33% |
al viro | 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 | alex zeffertt | 22 | 75.86% | 1 | 20.00% |
jeremy fitzhardinge | jeremy fitzhardinge | 5 | 17.24% | 3 | 60.00% |
joe perches | 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 | alex zeffertt | 19 | 95.00% | 1 | 50.00% |
jeremy fitzhardinge | 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 | alex zeffertt | 184 | 44.66% | 1 | 5.88% |
jeremy fitzhardinge | jeremy fitzhardinge | 99 | 24.03% | 7 | 41.18% |
al viro | al viro | 72 | 17.48% | 2 | 11.76% |
ian campbell | ian campbell | 16 | 3.88% | 1 | 5.88% |
boris ostrovsky | boris ostrovsky | 14 | 3.40% | 1 | 5.88% |
joe perches | joe perches | 9 | 2.18% | 1 | 5.88% |
bastian blank | bastian blank | 8 | 1.94% | 2 | 11.76% |
eric w. biederman | eric w. biederman | 5 | 1.21% | 1 | 5.88% |
arnd bergmann | arnd bergmann | 5 | 1.21% | 1 | 5.88% |
| Total | 412 | 100.00% | 17 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.