[S390] s390_hypfs: Add new attributes
In order to access the data of the hypfs diagnose calls from user space also in binary form, this patch adds two new attributes in debugfs: * z/VM: s390_hypfs/d2fc_bin * LPAR: s390_hypfs/d204_bin Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
cc961d400e
commit
57b28f6631
@@ -46,6 +46,8 @@ static const struct super_operations hypfs_s_ops;
|
||||
/* start of list of all dentries, which have to be deleted on update */
|
||||
static struct dentry *hypfs_last_dentry;
|
||||
|
||||
struct dentry *hypfs_dbfs_dir;
|
||||
|
||||
static void hypfs_update_update(struct super_block *sb)
|
||||
{
|
||||
struct hypfs_sb_info *sb_info = sb->s_fs_info;
|
||||
@@ -468,20 +470,22 @@ static int __init hypfs_init(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (MACHINE_IS_VM) {
|
||||
if (hypfs_vm_init())
|
||||
/* no diag 2fc, just exit */
|
||||
return -ENODATA;
|
||||
} else {
|
||||
if (hypfs_diag_init()) {
|
||||
rc = -ENODATA;
|
||||
goto fail_diag;
|
||||
}
|
||||
hypfs_dbfs_dir = debugfs_create_dir("s390_hypfs", NULL);
|
||||
if (IS_ERR(hypfs_dbfs_dir))
|
||||
return PTR_ERR(hypfs_dbfs_dir);
|
||||
|
||||
if (hypfs_diag_init()) {
|
||||
rc = -ENODATA;
|
||||
goto fail_debugfs_remove;
|
||||
}
|
||||
if (hypfs_vm_init()) {
|
||||
rc = -ENODATA;
|
||||
goto fail_hypfs_diag_exit;
|
||||
}
|
||||
s390_kobj = kobject_create_and_add("s390", hypervisor_kobj);
|
||||
if (!s390_kobj) {
|
||||
rc = -ENOMEM;
|
||||
goto fail_sysfs;
|
||||
goto fail_hypfs_vm_exit;
|
||||
}
|
||||
rc = register_filesystem(&hypfs_type);
|
||||
if (rc)
|
||||
@@ -490,18 +494,22 @@ static int __init hypfs_init(void)
|
||||
|
||||
fail_filesystem:
|
||||
kobject_put(s390_kobj);
|
||||
fail_sysfs:
|
||||
if (!MACHINE_IS_VM)
|
||||
hypfs_diag_exit();
|
||||
fail_diag:
|
||||
fail_hypfs_vm_exit:
|
||||
hypfs_vm_exit();
|
||||
fail_hypfs_diag_exit:
|
||||
hypfs_diag_exit();
|
||||
fail_debugfs_remove:
|
||||
debugfs_remove(hypfs_dbfs_dir);
|
||||
|
||||
pr_err("Initialization of hypfs failed with rc=%i\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void __exit hypfs_exit(void)
|
||||
{
|
||||
if (!MACHINE_IS_VM)
|
||||
hypfs_diag_exit();
|
||||
hypfs_diag_exit();
|
||||
hypfs_vm_exit();
|
||||
debugfs_remove(hypfs_dbfs_dir);
|
||||
unregister_filesystem(&hypfs_type);
|
||||
kobject_put(s390_kobj);
|
||||
}
|
||||
|
Reference in New Issue
Block a user